this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
- Assert (i < this->dof_handler->get_fe().size (),
- ExcIndexRange(i, 0, this->dof_handler->get_fe().size ()));
this->dof_handler->levels[this->present_level]
->active_fe_indices[this->present_index] = i;
}
this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
- Assert (i < this->dof_handler->get_fe().size (),
- ExcIndexRange(i, 0, this->dof_handler->get_fe().size ()));
this->dof_handler->levels[this->present_level]
->active_fe_indices[this->present_index] = i;
}
this->dof_handler->levels[this->present_level]->active_fe_indices.size (),
ExcIndexRange (this->present_index, 0,
this->dof_handler->levels[this->present_level]->active_fe_indices.size ()));
- Assert (i < this->dof_handler->get_fe().size (),
- ExcIndexRange(i, 0, this->dof_handler->get_fe().size ()));
this->dof_handler->levels[this->present_level]
->active_fe_indices[this->present_index] = i;
}
int,
<< "The given list of new dof indices is not consecutive: "
<< "the index " << arg1 << " does not exist.");
-
+ /**
+ * Exception
+ */
+ DeclException2 (ExcInvalidFEIndex,
+ int, int,
+ << "The mesh contains a cell with an active_fe_index of "
+ << arg1 << ", but the finite element collection only has "
+ << arg2 << " elements");
+
protected:
/**
Assert (tria->n_levels() > 0, ExcInvalidTriangulation());
finite_elements = &ff;
-
+
+ // up front make sure that the fe
+ // collection is large enough to
+ // cover all fe indices presently
+ // in use on the mesh
+ for (active_cell_iterator cell = begin_active(); cell != end(); ++cell)
+ Assert (cell->active_fe_index() < finite_elements->size(),
+ ExcInvalidFEIndex (cell->active_fe_index(),
+ finite_elements->size()));
+
+
// This call ensures that the
// active_fe_indices vectors are
// initialized correctly.