From b88b080940c07ed9d2b39f421331eeab1c8fb04b Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 21 Jan 2014 06:49:27 +0000 Subject: [PATCH] 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 --- deal.II/doc/news/changes.h | 13 +++++++++++++ deal.II/source/hp/dof_handler.cc | 8 ++++++++ 2 files changed, 21 insertions(+) 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. -- 2.39.5