endc = end ();
for (; cell != endc; ++cell)
{
- // Look if the cell got children during
- // refinement
+ // Look if the cell got children during refinement by
+ // checking whether it has children now but didn't have
+ // children before refinement (the has_children array is
+ // set in pre-refinement action)
+ //
// Note: Although one level is added to
// the DoFHandler levels, when the
// triangulation got one, for the buffer
if (cell->has_children () &&
!(*has_children [cell->level ()])[cell->index ()])
{
- // Set active_fe_index in children to the
- // same value as in the parent cell.
+ // Set active_fe_index in children to the same value
+ // as in the parent cell. we can't access the
+ // active_fe_index in the parent cell any more through
+ // cell->active_fe_index() since that function is not
+ // allowed for inactive cells, but we can access this
+ // information from the DoFLevels directly
for (unsigned int i = 0; i < cell->n_children(); ++i)
- cell->child (i)->set_active_fe_index (cell->active_fe_index ());
+ cell->child (i)->set_active_fe_index
+ (levels[cell->level()]->active_fe_index (cell->index()));
}
}
}