From: Wolfgang Bangerth Date: Tue, 21 Jan 2014 06:49:27 +0000 (+0000) Subject: Clear active_fe_index flags on non-active cells since they have no meaning. X-Git-Tag: v8.2.0-rc1~991 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5cd3223e6ac87c8f3fb42a402f8671d50b567481;p=dealii.git Clear active_fe_index flags on non-active cells since they have no meaning. git-svn-id: https://svn.dealii.org/trunk@32273 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index c21e09c334..69ee2024b2 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -84,6 +84,19 @@ inconvenience this causes.

Specific improvements

    +
  1. Changed: It was previously possible to set the + active_fe_index on non-active cells of an hp::DoFHandler. + However, this was prone to mistakes because it may lead to the assumption + that a finite element space out of the ones described by the hp::FECollection + associated with this hp::DoFHandler was actually associated with such + a cell. Since we do not actually distribute degrees of freedom for such + hp::DoFHandler objects on non-active cells, this is not the case. Consequently, + it no longer has any effect to assign active FE indices to non-active cells: + these values are simply reset later on. +
    + (Wolfgang Bangerth, 2014/01/20) +
  2. +
  3. Fixed: The method DoFTools::extract_constant_modes only worked for elements where the constant function 1 is represented by all ones. This is now fixed by querying the element for its constant modes on each cell. diff --git a/deal.II/source/hp/dof_handler.cc b/deal.II/source/hp/dof_handler.cc index 85a37b7aac..84bb3584e9 100644 --- a/deal.II/source/hp/dof_handler.cc +++ b/deal.II/source/hp/dof_handler.cc @@ -2600,6 +2600,14 @@ namespace hp finite_elements = &ff; + // nothing good can come off having active_fe_indices + // on non-active cells, since we do not distribute dofs + // there. kill these + for (cell_iterator cell = begin(); cell != end(); ++cell) + if (cell->has_children()) + cell->set_active_fe_index (default_fe_index); + + // This call ensures that the // active_fe_indices vectors are // initialized correctly.