* face is available.
*/
bool exterior_face_available[GeometryInfo<dim>::faces_per_cell];
+
+ /**
+ * A flag to specify if the current object has been set to a valid
+ * cell.
+ */
+ bool cell_valid;
};
//----------------------------------------------------------------------//
inline
DoFInfoBox<dim, DOFINFO>::DoFInfoBox(const DOFINFO &seed)
:
- cell(seed)
+ cell(seed), cell_valid(true)
{
for (unsigned int i=0; i<GeometryInfo<dim>::faces_per_cell; ++i)
{
inline
DoFInfoBox<dim, DOFINFO>::DoFInfoBox(const DoFInfoBox<dim, DOFINFO> &other)
:
- cell(other.cell)
+ cell(other.cell), cell_valid(other.cell_valid)
{
for (unsigned int i=0; i<GeometryInfo<dim>::faces_per_cell; ++i)
{
inline void
DoFInfoBox<dim, DOFINFO>::reset ()
{
+ cell_valid = false;
for (unsigned int i=0; i<GeometryInfo<dim>::faces_per_cell; ++i)
{
interior_face_available[i] = false;
inline void
DoFInfoBox<dim, DOFINFO>::assemble (ASSEMBLER &assembler) const
{
+ if (!cell_valid)
+ return;
+
assembler.assemble(cell);
for (unsigned int i=0; i<GeometryInfo<dim>::faces_per_cell; ++i)
{
? cell->level_subdomain_id()
: cell->subdomain_id();
- if ((!ignore_subdomain) && (csid == numbers::artificial_subdomain_id))
- return;
-
const bool own_cell = ignore_subdomain || (csid == cell->get_triangulation().locally_owned_subdomain());
dof_info.reset();
+
+ if ((!ignore_subdomain) && (csid == numbers::artificial_subdomain_id))
+ return;
+
dof_info.cell.reinit(cell);
+ dof_info.cell_valid = true;
const bool integrate_cell = (cell_worker != 0);
const bool integrate_boundary = (boundary_worker != 0);
const bool integrate_interior_face = (face_worker != 0);
- dof_info.reset();
-
- dof_info.cell.reinit(cell);
if (integrate_cell)
info.cell.reinit(dof_info.cell);
// Execute this, if cells