/// The type of the info objects for faces.
typedef IntegrationInfo<dim, spacedim> FaceInfo;
+
+ /**
+ * A callback function which is
+ * called in the loop over all
+ * cells, after the action on a
+ * cell has been performed and
+ * before the faces are dealt
+ * with.
+ *
+ * In order for this function
+ * to have this effect,
+ * at least either of the
+ * arguments
+ * <tt>boundary_worker</tt> or
+ * <tt>face_worker</tt>
+ * arguments of loop() should
+ * be nonzero. Additionally,
+ * <tt>cells_first</tt> should
+ * be true. If
+ * <tt>cells_first</tt> is
+ * false, this function is
+ * called before any action on
+ * a cell is taken.
+ *
+ * And empty function in this
+ * class, but can be replaced
+ * in other classes given to
+ * loop() instead.
+ *
+ * See loop() and cell_action()
+ * for more details of how this
+ * function can be used.
+ */
+ template <class DOFINFO>
+ void post_cell(const DoFInfoBox<dim, DOFINFO>&);
+
+ /**
+ * A callback function which is
+ * called in the loop over all
+ * cells, after the action on
+ * the faces of a cell has been
+ * performed and before the
+ * cell itself is dealt with
+ * (assumes
+ * <tt>cells_first</tt> is false).
+ *
+ * In order for this function
+ * to have a reasonable effect,
+ * at least either of the
+ * arguments
+ * <tt>boundary_worker</tt> or
+ * <tt>face_worker</tt>
+ * arguments of loop() should
+ * be nonzero. Additionally,
+ * <tt>cells_first</tt> should
+ * be false.
+ *
+ * And empty function in this
+ * class, but can be replaced
+ * in other classes given to
+ * loop() instead.
+ *
+ * See loop() and cell_action()
+ * for more details of how this
+ * function can be used.
+ */
+ template <class DOFINFO>
+ void post_faces(const DoFInfoBox<dim, DOFINFO>&);
template <class WORKER>
void initialize(const WORKER&,
const Mapping<dim, spacedim>& mapping,
const NamedData<MGLevelObject<VECTOR>*>& data,
const BlockInfo* block_info = 0);
-
+
boost::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > cell_data;
boost::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > boundary_data;
boost::shared_ptr<MeshWorker::VectorDataBase<dim, spacedim> > face_data;
subface.initialize_data(p);
neighbor.initialize_data(p);
}
+
+
+ template <int dim, int sdim>
+ template <class DOFINFO>
+ void
+ IntegrationInfoBox<dim,sdim>::post_cell(const DoFInfoBox<dim, DOFINFO>&)
+ {}
+
+
+ template <int dim, int sdim>
+ template <class DOFINFO>
+ void
+ IntegrationInfoBox<dim,sdim>::post_faces(const DoFInfoBox<dim, DOFINFO>&)
+ {}
+
+
}
DEAL_II_NAMESPACE_CLOSE
info.cell.reinit(dof_info.cell);
cell_worker(dof_info.cell, info.cell);
}
+
+ // Call the callback function in
+ // the info box to do
+ // computations between cell and
+ // face action.
+ info.post_cell(dof_info);
if (integrate_interior_face || integrate_boundary)
for (unsigned int face_no=0; face_no < GeometryInfo<ITERATOR::AccessorType::Container::dimension>::faces_per_cell; ++face_no)
}
}
} // faces
+ // Call the callback function in
+ // the info box to do
+ // computations between face and
+ // cell action.
+ info.post_faces(dof_info);
+
// Execute this, if faces
// have to be handled first
if (integrate_cell && !cells_first)
/**
- * The main work function of this namespace. Its action consists of two
- * loops.
- *
- * First, a loop over all cells in the iterator range is performed, in
- * each step updating the CellInfo object, then calling
- * cell_worker() with this object.
- *
- * In the second loop, we walk through all the faces of cells in the
- * iterator range. The functions boundary_worker() and
- * face_worker() are called for each boundary and interior face,
- * respectively. Unilaterally refined interior faces are handled
+ * The main work function of this namespace. It is a loop over all
+ * cells in an iterator range, in which cell_action() is called for
+ * each cell. Unilaterally refined interior faces are handled
* automatically by the loop.
*
+ * Most of the work in this loop is done in cell_action(), whic halso
+ * reeived most of the parameters of this function. See the
+ * documentation there for mor details.
+ *
* If you don't want integration on cells, interior or boundary faces
* to happen, simply pass the Null pointer to one of the function
* arguments.