* to edges, faces, and cells of a triangulation. The concept is
* explained in more detail in connection to @ref Iterators.
*
+ * This class follows mainly the route laid out by the accessor library
+ * declared in the triangulation library (TriaAccessor). It enables
+ * the user to access the degrees of freedom on the lines (there are similar
+ * versions for the DoFs on quads, etc), where the dimension of the underlying
+ * triangulation does not really matter (i.e. this accessor works with the
+ * lines in 1D-, 2D-, etc dimensions).
+ *
* The first template argument of this class refers to the structural
* dimension of the thing accessed: it is 1 for lines, 2 for quads, or
* 3 for hexes. The second argument denotes the type of DoF handler we
* in 2d have access to all the mesh aspects of cells, whereas
* accessors to quads in 3d can only access things that make sense for
* faces.
+ *
+ *
+ * <h3>Usage</h3>
+ *
+ * Usage is best to happen through the typedefs to the various kinds
+ * of iterators provided by the DoFHandler and hp::DoFHandler classes,
+ * since they are more secure to changes in the class naming and
+ * template interface as well as providing easier typing (much less
+ * complicated names!).
*
+ *
+ * <h3>Inheritance</h3>
+ *
+ * If the structural dimension given by the first template argument
+ * equals the dimension of the DoFHandler (given as the second
+ * template argument), then we are obviously dealing with cells,
+ * rather than lower-dimensional objects. In that case, inheritance is
+ * from CellAccessor, to provide access to all the cell specific
+ * information afforded by that class. Otherwise, i.e. for
+ * lower-dimensional objects, inheritance is from TriaObjectAccessor.
+ *
+ * There are classes DoFObjectAccessor<1>, DoFObjectAccessor<2>, and
+ * DoFObjectAccessor<3> derived from the present class that provide
+ * things that are specific to objects of a particular
+ * dimensionality. For example, DoFObjectAccessor<2> allows access to
+ * the DoF iterators pointing to the lines that bound that
+ * quadrilateral, which is obviously something that a line can't
+ * do. Consequently, these few operations are declared in these
+ * derived classes.
+ *
+ * In addition, there is a DoFCellAccessor class that provides the
+ * equivalent to the CellAccessor class.
+ *
* @ingroup dofs
- * @ingroup Accessors
- * @author Wolfgang Bangerth, 1998
+ * @ingroup Accessors
+ * @author Wolfgang Bangerth, 1998, 2006
*/
template <int structdim, class DH>
class DoFAccessor : public DoFObjectAccessor_Inheritance<structdim, DH::dimension>::BaseClass
*/
TriaIterator<DH::dimension,DoFObjectAccessor<structdim,DH> >
child (const unsigned int c) const;
-
- /**
- * Set the index of the
- * <i>i</i>th degree of freedom
- * of this object to @p index.
+
+ /**
+ * Index of the <i>i</i> degree
+ * on the @p vertexth vertex.
*
* The last argument denotes the
* finite element index. For the
* match the result of
* active_fe_index().
*/
- void set_dof_index (const unsigned int i,
- const unsigned int index,
- const unsigned int fe_index = DH::default_fe_index) const;
+ unsigned int vertex_dof_index (const unsigned int vertex,
+ const unsigned int i,
+ const unsigned int fe_index = DH::default_fe_index) const;
/**
- * Index of the <i>i</i> degree
- * on the @p vertexth vertex.
+ * Set the index of the <i>i</i> degree
+ * on the @p vertexth vertex to @p index.
*
* The last argument denotes the
* finite element index. For the
* match the result of
* active_fe_index().
*/
- unsigned int vertex_dof_index (const unsigned int vertex,
- const unsigned int i,
- const unsigned int fe_index = DH::default_fe_index) const;
+ void set_vertex_dof_index (const unsigned int vertex,
+ const unsigned int i,
+ const unsigned int index,
+ const unsigned int fe_index = DH::default_fe_index) const;
/**
- * Set the index of the <i>i</i> degree
- * on the @p vertexth vertex to @p index.
+ * Index of the <i>i</i>th degree
+ * of freedom of this object.
*
* The last argument denotes the
* finite element index. For the
* match the result of
* active_fe_index().
*/
- void set_vertex_dof_index (const unsigned int vertex,
- const unsigned int i,
- const unsigned int index,
- const unsigned int fe_index = DH::default_fe_index) const;
+ unsigned int dof_index (const unsigned int i,
+ const unsigned int fe_index = DH::default_fe_index) const;
+
+ /**
+ * Set the index of the
+ * <i>i</i>th degree of freedom
+ * of this object to @p index.
+ *
+ * The last argument denotes the
+ * finite element index. For the
+ * standard ::DoFHandler class,
+ * this value must be equal to
+ * its default value since that
+ * class only supports the same
+ * finite element on all cells
+ * anyway.
+ *
+ * However, for hp objects
+ * (i.e. the hp::DoFHandler
+ * class), different finite
+ * element objects may be used on
+ * different cells. On faces
+ * between two cells, as well as
+ * vertices, there may therefore
+ * be two sets of degrees of
+ * freedom, one for each of the
+ * finite elements used on the
+ * adjacent cells. In order to
+ * specify which set of degrees
+ * of freedom to work on, the
+ * last argument is used to
+ * disambiguate. Finally, if this
+ * function is called for a cell
+ * object, there can only be a
+ * single set of degrees of
+ * freedom, and fe_index has to
+ * match the result of
+ * active_fe_index().
+ */
+ void set_dof_index (const unsigned int i,
+ const unsigned int index,
+ const unsigned int fe_index = DH::default_fe_index) const;
/**
* Exceptions for child classes
/**
- * Common template for access to the data on a line, quad, hex. Note
- * that this class is only here for documentation purposes, the actual
- * implementation of functions is in classes with specialized template
- * parameters (see @ref DoFObjectAccessor<1,DH>, @ref
- * DoFObjectAccessor<2,DH>, @ref DoFObjectAccessor<3,DH>). In this
- * class here, we only collect all functions which are in the
- * specialized classes for simpler reference. Some functions, however,
- * might be missing in the specialized classes, such as @p quad in the
- * accessors for lines and quads, etc.
- *
- * This class follows mainly the route laid out by the accessor library
- * declared in the triangulation library (TriaAccessor). It enables
- * the user to access the degrees of freedom on the lines (there are similar
- * versions for the DoFs on quads, etc), where the dimension of the underlying
- * triangulation does not really matter (i.e. this accessor works with the
- * lines in 1D-, 2D-, etc dimensions).
- *
- *
- * <h3>Usage</h3>
- *
- * The DoFDimensionInfo classes inherited by the DoFHandler classes
- * declare typedefs to iterators using the accessors declared in this class
- * hierarchy tree. Usage is best to happen through these typedefs, since they
- * are more secure to changes in the class naming and template interface as well
- * as they provide easier typing (much less complicated names!).
- *
- *
- * <h3>Notes about the class hierarchy structure</h3>
- *
- * See the report on this subject, which is available from the general
- * documentation directory.
+ * Closure class. Unused, but necessary for some template constructs.
+ * @ingroup dofs
+ * @ingroup Accessors
+ */
+template <class DH>
+class DoFObjectAccessor<0, DH> : public DoFAccessor<0, DH>
+{
+ public:
+ /**
+ * Extract dimension from DH.
+ */
+ static const unsigned int dim = DH::dimension;
+
+ typedef void AccessorData;
+
+ /**
+ * Constructor. Should never be called
+ * and thus throws an error.
+ */
+ DoFObjectAccessor (Triangulation<dim> *,
+ const int,
+ const int,
+ const AccessorData *)
+ {
+ Assert (false, ExcInternalError());
+ }
+};
+
+
+
+/**
+ * Grant access to those aspects of degrees of freedom located on
+ * quads that are dimension specific. See the DoFAccessor class for
+ * more information.
*
* @ingroup dofs
* @ingroup Accessors
- * @author Wolfgang Bangerth, 1998; Guido Kanschat, 1999
+ * @author Wolfgang Bangerth, 1998, 2006
*/
-template <int celldim, class DH>
-class DoFObjectAccessor : public DoFAccessor<celldim, DH>
+template <class DH>
+class DoFObjectAccessor<1, DH> : public DoFAccessor<1,DH>
{
public:
/**
static const unsigned int dim = DH::dimension;
/**
- * Data type passed by the iterator class.
+ * Declare the data type that this accessor
+ * class expects to get passed from the
+ * iterator classes.
*/
typedef DH AccessorData;
* Declare base class as a local typedef
* for simpler access.
*/
- typedef TriaObjectAccessor<celldim,dim> BaseClass;
-
+ typedef DoFAccessor<1,DH> BaseClass;
/**
- * Default constructor. Unused, thus
+ * Default constructor, unused thus
* not implemented.
*/
DoFObjectAccessor ();
-
+
/**
* Constructor. The @p local_data
* argument is assumed to be a pointer
* to a DoFHandler object.
*/
- DoFObjectAccessor (const Triangulation<dim> *tria,
+ DoFObjectAccessor (const Triangulation<DH::dimension> *tria,
const int level,
const int index,
- const AccessorData *local_data);
-
- /**
- * Index of the <i>i</i>th degree
- * of freedom of this object.
+ const AccessorData *local_data);
+
+ /**
+ * Return the indices of the dofs of this
+ * object in the standard ordering: dofs
+ * on vertex 0, dofs on vertex 1, etc,
+ * dofs on line 0, dofs on line 1, etc,
+ * dofs on quad 0, etc.
+ *
+ * The vector has to have the
+ * right size before being passed
+ * to this function.
+ *
+ * This function is most often
+ * used on active objects (edges,
+ * faces, cells). It can be used
+ * on non-active objects as well
+ * (i.e. objects that have
+ * children), but only if the
+ * finite element under
+ * consideration has degrees of
+ * freedom exclusively on
+ * vertices. Otherwise, the
+ * function doesn't make much
+ * sense, since for example
+ * inactive edges do not have
+ * degrees of freedom associated
+ * with them at all.
*
* The last argument denotes the
* finite element index. For the
* freedom, and fe_index has to
* match the result of
* active_fe_index().
+ *
+ * For cells, there is only a
+ * single possible finite element
+ * index (namely the one for that
+ * cell, returned by
+ * <code>cell-@>active_fe_index</code>. Consequently,
+ * the derived DoFCellAccessor
+ * class has an overloaded
+ * version of this function that
+ * calls the present function
+ * with
+ * <code>cell-@>active_fe_index</code>
+ * as last argument.
*/
- unsigned int dof_index (const unsigned int i,
- const unsigned int fe_index = DH::default_fe_index) const;
+ void get_dof_indices (std::vector<unsigned int> &dof_indices,
+ const unsigned int fe_index = DH::default_fe_index) const;
+};
+
+
+/**
+ * Grant access to those aspects of degrees of freedom located on
+ * quads that are dimension specific. See the DoFAccessor class for
+ * more information.
+ *
+ * @ingroup dofs
+ * @ingroup Accessors
+ * @author Wolfgang Bangerth, 1998, 2006
+ */
+template <class DH>
+class DoFObjectAccessor<2, DH> : public DoFAccessor<2,DH>
+{
+ public:
+ /**
+ * Extract dimension from DH.
+ */
+ static const unsigned int dim = DH::dimension;
+
+ /**
+ * Declare the data type that this accessor
+ * class expects to get passed from the
+ * iterator classes.
+ */
+ typedef DH AccessorData;
+
+ /**
+ * Declare base class as a local typedef
+ * for simpler access.
+ */
+ typedef DoFAccessor<2,DH> BaseClass;
+
+ /**
+ * Default constructor, unused thus
+ * not implemented.
+ */
+ DoFObjectAccessor ();
+ /**
+ * Constructor. The @p local_data
+ * argument is assumed to be a pointer
+ * to a DoFHandler object.
+ */
+ DoFObjectAccessor (const Triangulation<DH::dimension> *tria,
+ const int level,
+ const int index,
+ const AccessorData *local_data);
+
/**
* Return the indices of the dofs of this
* object in the standard ordering: dofs
const unsigned int fe_index = DH::default_fe_index) const;
/**
- * Pointer to the <i>i</i>th line
- * bounding this Object.
+ * Return a pointer to the @p ith line
+ * bounding this @p Quad.
*/
- TriaIterator<dim,DoFObjectAccessor<1, DH> >
+ TriaIterator<DH::dimension,DoFObjectAccessor<1, DH> >
line (const unsigned int i) const;
-
- /**
- * Pointer to the <i>i</i>th quad
- * bounding this Object.
- */
- TriaIterator<dim,DoFObjectAccessor<2, DH> >
- quad (const unsigned int i) const;
};
/**
- * Closure class.
+ * Grant access to those aspects of degrees of freedom located on
+ * hexes that are dimension specific. See the DoFAccessor class for
+ * more information.
+ *
* @ingroup dofs
* @ingroup Accessors
+ * @author Wolfgang Bangerth, 1998, 2006
*/
template <class DH>
-class DoFObjectAccessor<0, DH> : public DoFAccessor<0, DH>
-{
- public:
- /**
- * Extract dimension from DH.
- */
- static const unsigned int dim = DH::dimension;
-
- typedef void AccessorData;
-
- /**
- * Constructor. Should never be called
- * and thus throws an error.
- */
- DoFObjectAccessor (Triangulation<dim> *,
- const int,
- const int,
- const AccessorData *)
- {
- Assert (false, ExcInternalError());
- }
-};
-
-
-/**
- * Access to the degrees of freedom located on lines.
- * This class follows mainly the route laid out by the accessor library
- * declared in the triangulation library (TriaAccessor). It enables
- * the user to access the degrees of freedom on the lines (there are similar
- * versions for the DoFs on quads, etc), where the dimension of the underlying
- * triangulation does not really matter (i.e. this accessor works with the
- * lines in 1D-, 2D-, etc dimensions).
- *
- *
- * <h3>Usage</h3>
- *
- * The DoFDimensionInfo classes inherited by the DoFHandler classes
- * declare typedefs to iterators using the accessors declared in this class
- * hierarchy tree. Usage is best to happens through these typedefs, since they
- * are more secure to changes in the class naming and template interface as well
- * as they provide easier typing (much less complicated names!).
- *
- *
- * <h3>Notes about the class hierarchy structure</h3>
- *
- * Inheritance from <tt>DoFObjectAccessor_Inheritance<1,dim>::BaseClass</tt> yields
- * inheritance from <tt>CellAccessor<1></tt> if <tt>dim==1</tt> and from
- * <tt>TriaObjectAccessor<1,dim></tt> for all other @p dim values. Thus, an object
- * of this class shares all features of cells in one dimension, but behaves
- * like an ordinary line in all other cases.
- *
- * @ingroup dofs
- * @ingroup Accessors
- * @author Wolfgang Bangerth, 1998
- */
-template <class DH>
-class DoFObjectAccessor<1, DH> : public DoFAccessor<1,DH>
-{
- public:
- /**
- * Extract dimension from DH.
- */
- static const unsigned int dim = DH::dimension;
-
- /**
- * Declare the data type that this accessor
- * class expects to get passed from the
- * iterator classes.
- */
- typedef DH AccessorData;
-
- /**
- * Declare base class as a local typedef
- * for simpler access.
- */
- typedef DoFAccessor<1,DH> BaseClass;
-
- /**
- * Default constructor, unused thus
- * not implemented.
- */
- DoFObjectAccessor ();
-
- /**
- * Constructor. The @p local_data
- * argument is assumed to be a pointer
- * to a DoFHandler object.
- */
- DoFObjectAccessor (const Triangulation<DH::dimension> *tria,
- const int level,
- const int index,
- const AccessorData *local_data);
-
- /**
- * Index of the <i>i</i>th degree
- * of freedom of this object.
- *
- * The last argument denotes the
- * finite element index. For the
- * standard ::DoFHandler class,
- * this value must be equal to
- * its default value since that
- * class only supports the same
- * finite element on all cells
- * anyway.
- *
- * However, for hp objects
- * (i.e. the hp::DoFHandler
- * class), different finite
- * element objects may be used on
- * different cells. On faces
- * between two cells, as well as
- * vertices, there may therefore
- * be two sets of degrees of
- * freedom, one for each of the
- * finite elements used on the
- * adjacent cells. In order to
- * specify which set of degrees
- * of freedom to work on, the
- * last argument is used to
- * disambiguate. Finally, if this
- * function is called for a cell
- * object, there can only be a
- * single set of degrees of
- * freedom, and fe_index has to
- * match the result of
- * active_fe_index().
- */
- unsigned int dof_index (const unsigned int i,
- const unsigned int fe_index = DH::default_fe_index) const;
-
- /**
- * Set the index of the
- * <i>i</i>th degree of freedom
- * of this object to @p index.
- *
- * The last argument denotes the
- * finite element index. For the
- * standard ::DoFHandler class,
- * this value must be equal to
- * its default value since that
- * class only supports the same
- * finite element on all cells
- * anyway.
- *
- * However, for hp objects
- * (i.e. the hp::DoFHandler
- * class), different finite
- * element objects may be used on
- * different cells. On faces
- * between two cells, as well as
- * vertices, there may therefore
- * be two sets of degrees of
- * freedom, one for each of the
- * finite elements used on the
- * adjacent cells. In order to
- * specify which set of degrees
- * of freedom to work on, the
- * last argument is used to
- * disambiguate. Finally, if this
- * function is called for a cell
- * object, there can only be a
- * single set of degrees of
- * freedom, and fe_index has to
- * match the result of
- * active_fe_index().
- */
- void set_dof_index (const unsigned int i,
- const unsigned int index,
- const unsigned int fe_index = DH::default_fe_index) const;
-
- /**
- * Return the indices of the dofs of this
- * object in the standard ordering: dofs
- * on vertex 0, dofs on vertex 1, etc,
- * dofs on line 0, dofs on line 1, etc,
- * dofs on quad 0, etc.
- *
- * The vector has to have the
- * right size before being passed
- * to this function.
- *
- * This function is most often
- * used on active objects (edges,
- * faces, cells). It can be used
- * on non-active objects as well
- * (i.e. objects that have
- * children), but only if the
- * finite element under
- * consideration has degrees of
- * freedom exclusively on
- * vertices. Otherwise, the
- * function doesn't make much
- * sense, since for example
- * inactive edges do not have
- * degrees of freedom associated
- * with them at all.
- *
- * The last argument denotes the
- * finite element index. For the
- * standard ::DoFHandler class,
- * this value must be equal to
- * its default value since that
- * class only supports the same
- * finite element on all cells
- * anyway.
- *
- * However, for hp objects
- * (i.e. the hp::DoFHandler
- * class), different finite
- * element objects may be used on
- * different cells. On faces
- * between two cells, as well as
- * vertices, there may therefore
- * be two sets of degrees of
- * freedom, one for each of the
- * finite elements used on the
- * adjacent cells. In order to
- * specify which set of degrees
- * of freedom to work on, the
- * last argument is used to
- * disambiguate. Finally, if this
- * function is called for a cell
- * object, there can only be a
- * single set of degrees of
- * freedom, and fe_index has to
- * match the result of
- * active_fe_index().
- *
- * For cells, there is only a
- * single possible finite element
- * index (namely the one for that
- * cell, returned by
- * <code>cell-@>active_fe_index</code>. Consequently,
- * the derived DoFCellAccessor
- * class has an overloaded
- * version of this function that
- * calls the present function
- * with
- * <code>cell-@>active_fe_index</code>
- * as last argument.
- */
- void get_dof_indices (std::vector<unsigned int> &dof_indices,
- const unsigned int fe_index = DH::default_fe_index) const;
-};
-
-
-/**
- * Grant access to the degrees of freedom located on quads.
- *
- * @ingroup dofs
- * @ingroup Accessors
- */
-template <class DH>
-class DoFObjectAccessor<2, DH> : public DoFAccessor<2,DH>
-{
- public:
- /**
- * Extract dimension from DH.
- */
- static const unsigned int dim = DH::dimension;
-
- /**
- * Declare the data type that this accessor
- * class expects to get passed from the
- * iterator classes.
- */
- typedef DH AccessorData;
-
- /**
- * Declare base class as a local typedef
- * for simpler access.
- */
- typedef DoFAccessor<2,DH> BaseClass;
-
- /**
- * Default constructor, unused thus
- * not implemented.
- */
- DoFObjectAccessor ();
-
- /**
- * Constructor. The @p local_data
- * argument is assumed to be a pointer
- * to a DoFHandler object.
- */
- DoFObjectAccessor (const Triangulation<DH::dimension> *tria,
- const int level,
- const int index,
- const AccessorData *local_data);
-
- /**
- * Index of the <i>i</i>th degree
- * of freedom of this object.
- *
- * The last argument denotes the
- * finite element index. For the
- * standard ::DoFHandler class,
- * this value must be equal to
- * its default value since that
- * class only supports the same
- * finite element on all cells
- * anyway.
- *
- * However, for hp objects
- * (i.e. the hp::DoFHandler
- * class), different finite
- * element objects may be used on
- * different cells. On faces
- * between two cells, as well as
- * vertices, there may therefore
- * be two sets of degrees of
- * freedom, one for each of the
- * finite elements used on the
- * adjacent cells. In order to
- * specify which set of degrees
- * of freedom to work on, the
- * last argument is used to
- * disambiguate. Finally, if this
- * function is called for a cell
- * object, there can only be a
- * single set of degrees of
- * freedom, and fe_index has to
- * match the result of
- * active_fe_index().
- */
- unsigned int dof_index (const unsigned int i,
- const unsigned int fe_index = DH::default_fe_index) const;
-
- /**
- * Set the index of the
- * <i>i</i>th degree of freedom
- * of this object to @p index.
- *
- * The last argument denotes the
- * finite element index. For the
- * standard ::DoFHandler class,
- * this value must be equal to
- * its default value since that
- * class only supports the same
- * finite element on all cells
- * anyway.
- *
- * However, for hp objects
- * (i.e. the hp::DoFHandler
- * class), different finite
- * element objects may be used on
- * different cells. On faces
- * between two cells, as well as
- * vertices, there may therefore
- * be two sets of degrees of
- * freedom, one for each of the
- * finite elements used on the
- * adjacent cells. In order to
- * specify which set of degrees
- * of freedom to work on, the
- * last argument is used to
- * disambiguate. Finally, if this
- * function is called for a cell
- * object, there can only be a
- * single set of degrees of
- * freedom, and fe_index has to
- * match the result of
- * active_fe_index().
- */
- void set_dof_index (const unsigned int i,
- const unsigned int index,
- const unsigned int fe_index = DH::default_fe_index) const;
-
- /**
- * Return the indices of the dofs of this
- * object in the standard ordering: dofs
- * on vertex 0, dofs on vertex 1, etc,
- * dofs on line 0, dofs on line 1, etc,
- * dofs on quad 0, etc.
- *
- * The vector has to have the
- * right size before being passed
- * to this function.
- *
- * This function is most often
- * used on active objects (edges,
- * faces, cells). It can be used
- * on non-active objects as well
- * (i.e. objects that have
- * children), but only if the
- * finite element under
- * consideration has degrees of
- * freedom exclusively on
- * vertices. Otherwise, the
- * function doesn't make much
- * sense, since for example
- * inactive edges do not have
- * degrees of freedom associated
- * with them at all.
- *
- * The last argument denotes the
- * finite element index. For the
- * standard ::DoFHandler class,
- * this value must be equal to
- * its default value since that
- * class only supports the same
- * finite element on all cells
- * anyway.
- *
- * However, for hp objects
- * (i.e. the hp::DoFHandler
- * class), different finite
- * element objects may be used on
- * different cells. On faces
- * between two cells, as well as
- * vertices, there may therefore
- * be two sets of degrees of
- * freedom, one for each of the
- * finite elements used on the
- * adjacent cells. In order to
- * specify which set of degrees
- * of freedom to work on, the
- * last argument is used to
- * disambiguate. Finally, if this
- * function is called for a cell
- * object, there can only be a
- * single set of degrees of
- * freedom, and fe_index has to
- * match the result of
- * active_fe_index().
- *
- * For cells, there is only a
- * single possible finite element
- * index (namely the one for that
- * cell, returned by
- * <code>cell-@>active_fe_index</code>. Consequently,
- * the derived DoFCellAccessor
- * class has an overloaded
- * version of this function that
- * calls the present function
- * with
- * <code>cell-@>active_fe_index</code>
- * as last argument.
- */
- void get_dof_indices (std::vector<unsigned int> &dof_indices,
- const unsigned int fe_index = DH::default_fe_index) const;
-
- /**
- * Return a pointer to the @p ith line
- * bounding this @p Quad.
- */
- TriaIterator<DH::dimension,DoFObjectAccessor<1, DH> >
- line (const unsigned int i) const;
-};
-
-
-/**
- * Grant access to the degrees of freedom located on hexes.
- *
- * @ingroup dofs
- * @ingroup Accessors
- */
-template <class DH>
-class DoFObjectAccessor<3, DH> : public DoFAccessor<3,DH>
+class DoFObjectAccessor<3, DH> : public DoFAccessor<3,DH>
{
public:
/**
const int index,
const AccessorData *local_data);
-
- /**
- * Index of the <i>i</i>th degree
- * of freedom of this object.
- *
- * The last argument denotes the
- * finite element index. For the
- * standard ::DoFHandler class,
- * this value must be equal to
- * its default value since that
- * class only supports the same
- * finite element on all cells
- * anyway.
- *
- * However, for hp objects
- * (i.e. the hp::DoFHandler
- * class), different finite
- * element objects may be used on
- * different cells. On faces
- * between two cells, as well as
- * vertices, there may therefore
- * be two sets of degrees of
- * freedom, one for each of the
- * finite elements used on the
- * adjacent cells. In order to
- * specify which set of degrees
- * of freedom to work on, the
- * last argument is used to
- * disambiguate. Finally, if this
- * function is called for a cell
- * object, there can only be a
- * single set of degrees of
- * freedom, and fe_index has to
- * match the result of
- * active_fe_index().
- */
- unsigned int dof_index (const unsigned int i,
- const unsigned int fe_index = DH::default_fe_index) const;
-
- /**
- * Set the index of the
- * <i>i</i>th degree of freedom
- * of this object to @p index.
- *
- * The last argument denotes the
- * finite element index. For the
- * standard ::DoFHandler class,
- * this value must be equal to
- * its default value since that
- * class only supports the same
- * finite element on all cells
- * anyway.
- *
- * However, for hp objects
- * (i.e. the hp::DoFHandler
- * class), different finite
- * element objects may be used on
- * different cells. On faces
- * between two cells, as well as
- * vertices, there may therefore
- * be two sets of degrees of
- * freedom, one for each of the
- * finite elements used on the
- * adjacent cells. In order to
- * specify which set of degrees
- * of freedom to work on, the
- * last argument is used to
- * disambiguate. Finally, if this
- * function is called for a cell
- * object, there can only be a
- * single set of degrees of
- * freedom, and fe_index has to
- * match the result of
- * active_fe_index().
- */
- void set_dof_index (const unsigned int i,
- const unsigned int index,
- const unsigned int fe_index = DH::default_fe_index) const;
-
/**
* Return the indices of the dofs of this
* object in the standard ordering: dofs
template <int structdim, class DH>
+inline
void
DoFAccessor<structdim,DH>::set_dof_handler (DH *dh)
{
template <int structdim, class DH>
+inline
void
DoFAccessor<structdim,DH>::copy_from (const DoFAccessor<structdim,DH> &a)
{
}
+
template <int structdim, class DH>
inline
bool
template <int structdim, class DH>
-void DoFAccessor<structdim, DH>::set_vertex_dof_index (const unsigned int vertex,
- const unsigned int i,
- const unsigned int index,
- const unsigned int fe_index) const
+inline
+void
+DoFAccessor<structdim, DH>::set_vertex_dof_index (const unsigned int vertex,
+ const unsigned int i,
+ const unsigned int index,
+ const unsigned int fe_index) const
{
this->dof_handler->set_vertex_dof_index (this->vertex_index(vertex),
fe_index,
+template <int dim, class DH>
+inline
+unsigned int
+DoFAccessor<dim,DH>::dof_index (const unsigned int i,
+ const unsigned int fe_index) const
+{
+ // access the respective DoF. the
+ // last argument disambiguates
+ // between the functions of same
+ // name in the DoFLevel hierarchy,
+ // to make sure we get at lines,
+ // quads, or hexes
+ return this->dof_handler->levels[this->present_level]
+ ->get_dof_index (*this->dof_handler,
+ this->present_index,
+ fe_index,
+ i,
+ internal::StructuralDimension<dim>());
+}
+
+
+
+template <int dim, class DH>
+inline
+void
+DoFAccessor<dim,DH>::set_dof_index (const unsigned int i,
+ const unsigned int index,
+ const unsigned int fe_index) const
+{
+ // access the respective DoF. the
+ // last argument disambiguates
+ // between the functions of same
+ // name in the DoFLevel hierarchy,
+ // to make sure we get at lines,
+ // quads, or hexes
+ this->dof_handler->levels[this->present_level]
+ ->set_dof_index (*this->dof_handler,
+ this->present_index,
+ fe_index,
+ i,
+ index,
+ internal::StructuralDimension<dim>());
+}
+
+
/*------------------------- Functions: DoFObjectAccessor<1,dim> -----------------------*/
-template <class DH>
-inline
-unsigned int
-DoFObjectAccessor<1,DH>::dof_index (const unsigned int i,
- const unsigned int fe_index) const
-{
- return this->dof_handler->levels[this->present_level]
- ->get_line_dof_index (*this->dof_handler,
- this->present_index,
- fe_index,
- i);
-}
-
-
-
-template <class DH>
-inline
-void
-DoFObjectAccessor<1,DH>::set_dof_index (const unsigned int i,
- const unsigned int index,
- const unsigned int fe_index) const
-{
- this->dof_handler->levels[this->present_level]
- ->set_line_dof_index (*this->dof_handler,
- this->present_index,
- fe_index,
- i,
- index);
-}
-
-
template <class DH>
inline
-template <class DH>
-inline
-unsigned int
-DoFObjectAccessor<2,DH>::dof_index (const unsigned int i,
- const unsigned int fe_index) const
-{
- return this->dof_handler->levels[this->present_level]
- ->get_quad_dof_index (*this->dof_handler,
- this->present_index,
- fe_index,
- i);
-}
-
-
-
-template <class DH>
-inline
-void
-DoFObjectAccessor<2,DH>::set_dof_index (const unsigned int i,
- const unsigned int index,
- const unsigned int fe_index) const
-{
- this->dof_handler->levels[this->present_level]
- ->set_quad_dof_index (*this->dof_handler,
- this->present_index,
- fe_index,
- i,
- index);
-}
-
-
-
template <class DH>
inline
void
-template <class DH>
-inline
-unsigned int
-DoFObjectAccessor<3,DH>::dof_index (const unsigned int i,
- const unsigned int fe_index) const
-{
- return this->dof_handler->levels[this->present_level]
- ->get_hex_dof_index (*this->dof_handler,
- this->present_index,
- fe_index,
- i);
-}
-
-
-
-template <class DH>
-inline
-void
-DoFObjectAccessor<3,DH>::set_dof_index (const unsigned int i,
- const unsigned int index,
- const unsigned int fe_index) const
-{
- this->dof_handler->levels[this->present_level]
- ->set_hex_dof_index (*this->dof_handler,
- this->present_index,
- fe_index,
- i,
- index);
-}
-
-
-
template <class DH>
inline
void
namespace internal
{
+
+ template <int structdim>
+ struct StructuralDimension
+ {};
+
+
/**
* A namespace for internal data structures of the DoFHandler group of classes.
*
* through the DoFAccessor::set_dof_index() and
* DoFAccessor::dof_index() functions or similar functions of derived
* classes that in turn access the member variables using the
- * DoFLevel<1>::get_line_dof_index(), corresponding setter functions,
+ * DoFLevel<1>::get_dof_index(), corresponding setter functions,
* and similar functions in the DoFLevel<2> and DoFLevel<3>
* classes. Knowledge of the actual data format is therefore
* encapsulated to the present hierarchy of classes as well as the
* ::DoFHandler class.
+ *
+ * The DoFLevel<dim> classes all have functions get_dof_index() and
+ * set_dof_index(). Since they have the same name, it is necessary to
+ * disambiguate which one we want to call when accessing line or quad
+ * DoFs, for example. To this end, they take an additional argument of
+ * type internal::StructuralDimension<dim> where the template argument
+ * indicates the structural dimension of the object accessed, i.e. 1
+ * for lines, 2 for quads, etc. Using this trick, it is possible to
+ * write the functions DoFAccessor<structdim,spacedim>::dof_index()
+ * completely general, without having to specialize for the space
+ * dimension or the dimension of the object we access.
*
* @ingroup dofs
* @author Wolfgang Bangerth, 1998, 2006
* share the DoFAccessor
* class hierarchy between hp
* and non-hp classes.
+ *
+ * For the meaning of the
+ * last argument, see the
+ * general documentation of
+ * the
+ * internal::DoFHandler::DoFLevel
+ * class.
*/
template <int dim>
void
- set_line_dof_index (const ::DoFHandler<dim> &dof_handler,
- const unsigned int line_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index);
+ set_dof_index (const ::DoFHandler<dim> &dof_handler,
+ const unsigned int line_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<1> dummy);
/**
* Return the global index of
* share the DoFAccessor
* class hierarchy between hp
* and non-hp classes.
+ *
+ * For the meaning of the
+ * last argument, see the
+ * general documentation of
+ * the
+ * internal::DoFHandler::DoFLevel
+ * class.
*/
template <int dim>
unsigned int
- get_line_dof_index (const ::DoFHandler<dim> &dof_handler,
- const unsigned int line_index,
- const unsigned int fe_index,
- const unsigned int local_index) const;
+ get_dof_index (const ::DoFHandler<dim> &dof_handler,
+ const unsigned int line_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<1> dummy) const;
/**
* Determine an estimate for the
* share the DoFAccessor
* class hierarchy between hp
* and non-hp classes.
+ *
+ * For the meaning of the
+ * last argument, see the
+ * general documentation of
+ * the
+ * internal::DoFHandler::DoFLevel
+ * class.
*/
template <int dim>
void
- set_quad_dof_index (const ::DoFHandler<dim> &dof_handler,
- const unsigned int quad_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index);
+ set_dof_index (const ::DoFHandler<dim> &dof_handler,
+ const unsigned int quad_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<2> dummy);
/**
* Return the global index of
* share the DoFAccessor
* class hierarchy between hp
* and non-hp classes.
+ *
+ * For the meaning of the
+ * last argument, see the
+ * general documentation of
+ * the
+ * internal::DoFHandler::DoFLevel
+ * class.
*/
template <int dim>
unsigned int
- get_quad_dof_index (const ::DoFHandler<dim> &dof_handler,
- const unsigned int quad_index,
- const unsigned int fe_index,
- const unsigned int local_index) const;
+ get_dof_index (const ::DoFHandler<dim> &dof_handler,
+ const unsigned int quad_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<2> dummy) const;
+
+ /**
+ * Import the respective
+ * functions from the base
+ * class.
+ */
+ using DoFLevel<1>::set_dof_index;
+ using DoFLevel<1>::get_dof_index;
/**
* Determine an estimate for the
* share the DoFAccessor
* class hierarchy between hp
* and non-hp classes.
+ *
+ * For the meaning of the
+ * last argument, see the
+ * general documentation of
+ * the
+ * internal::DoFHandler::DoFLevel
+ * class.
*/
template <int dim>
void
- set_hex_dof_index (const ::DoFHandler<dim> &dof_handler,
- const unsigned int hex_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index);
+ set_dof_index (const ::DoFHandler<dim> &dof_handler,
+ const unsigned int hex_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<3> dummy);
/**
* Return the global index of
* share the DoFAccessor
* class hierarchy between hp
* and non-hp classes.
+ *
+ * For the meaning of the
+ * last argument, see the
+ * general documentation of
+ * the
+ * internal::DoFHandler::DoFLevel
+ * class.
*/
template <int dim>
unsigned int
- get_hex_dof_index (const ::DoFHandler<dim> &dof_handler,
- const unsigned int hex_index,
- const unsigned int fe_index,
- const unsigned int local_index) const;
+ get_dof_index (const ::DoFHandler<dim> &dof_handler,
+ const unsigned int hex_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<3> dummy) const;
+
+ /**
+ * Import the respective
+ * functions from the base
+ * class.
+ */
+ using DoFLevel<2>::set_dof_index;
+ using DoFLevel<2>::get_dof_index;
/**
* Determine an estimate for the
#include <base/config.h>
+#include <dofs/dof_levels.h>
#include <fe/fe_collection.h>
#include <vector>
*
* The things we store here is very similar to what is stored in the
* internal::DoFHandler::DoFLevel class hierarchy (see there for more
- * information, in particular on the layout of the class
- * hierarchy). There are two main differences, discussed in the
- * following subsections. In addition to the data already stored by
- * the internal::DoFHandler::DoFLevel classes, we also have to store
- * which finite element each cell uses. This is done in the
- * DoFLevel<0> class, where for each cell we have an entry within the
- * active_fe_indices field for each cell.
+ * information, in particular on the layout of the class hierarchy,
+ * and the use of file names and dummy arguments). There are two main
+ * differences, discussed in the following subsections. In addition to
+ * the data already stored by the internal::DoFHandler::DoFLevel
+ * classes, we also have to store which finite element each cell
+ * uses. This is done in the DoFLevel<0> class, where for each cell we
+ * have an entry within the active_fe_indices field for each cell.
*
*
* <h4>Offset computations</h4>
* the internal::hp::DoFLevel
* class template for more
* information.
+ *
+ * For the meaning of the
+ * last argument, see the
+ * general documentation of
+ * the
+ * internal::DoFHandler::DoFLevel
+ * class.
*/
template <int dim>
void
- set_line_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
- const unsigned int line_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index);
+ set_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
+ const unsigned int line_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<1> dummy);
/**
* Return the global index of
* the internal::hp::DoFLevel
* class template for more
* information.
+ *
+ * For the meaning of the
+ * last argument, see the
+ * general documentation of
+ * the
+ * internal::DoFHandler::DoFLevel
+ * class.
*/
template <int dim>
unsigned int
- get_line_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
- const unsigned int line_index,
- const unsigned int fe_index,
- const unsigned int local_index) const;
+ get_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
+ const unsigned int line_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<1> dummy) const;
/**
* Determine an estimate for the
* the internal::hp::DoFLevel
* class template for more
* information.
+ *
+ * For the meaning of the
+ * last argument, see the
+ * general documentation of
+ * the
+ * internal::DoFHandler::DoFLevel
+ * class.
*/
template <int dim>
void
- set_quad_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
- const unsigned int quad_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index);
+ set_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
+ const unsigned int quad_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<2> dummy);
/**
* Return the global index of
* the internal::hp::DoFLevel
* class template for more
* information.
- */
+ *
+ * For the meaning of the
+ * last argument, see the
+ * general documentation of
+ * the
+ * internal::DoFHandler::DoFLevel
+ * class.
+ */
template <int dim>
unsigned int
- get_quad_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
- const unsigned int quad_index,
- const unsigned int fe_index,
- const unsigned int local_index) const;
-
+ get_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
+ const unsigned int quad_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<2> dummy) const;
+
+ /**
+ * Import the respective
+ * functions from the base
+ * class.
+ */
+ using DoFLevel<1>::set_dof_index;
+ using DoFLevel<1>::get_dof_index;
+
/**
* Determine an estimate for the
* memory consumption (in bytes)
* the internal::hp::DoFLevel
* class template for more
* information.
+ *
+ * For the meaning of the
+ * last argument, see the
+ * general documentation of
+ * the
+ * internal::DoFHandler::DoFLevel
+ * class.
*/
template <int dim>
void
- set_hex_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
- const unsigned int hex_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index);
+ set_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
+ const unsigned int hex_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<3> dummy);
/**
* Return the global index of
* the internal::hp::DoFLevel
* class template for more
* information.
- */
+ *
+ * For the meaning of the
+ * last argument, see the
+ * general documentation of
+ * the
+ * internal::DoFHandler::DoFLevel
+ * class.
+ */
template <int dim>
unsigned int
- get_hex_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
- const unsigned int hex_index,
- const unsigned int fe_index,
- const unsigned int local_index) const;
+ get_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
+ const unsigned int hex_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<3> dummy) const;
+
+ /**
+ * Import the respective
+ * functions from the base
+ * classes.
+ */
+ using DoFLevel<2>::set_dof_index;
+ using DoFLevel<2>::get_dof_index;
/**
* Determine an estimate for the
template <int dim>
unsigned int
DoFLevel<1>::
- get_line_dof_index (const ::DoFHandler<dim> &dof_handler,
- const unsigned int line_index,
- const unsigned int fe_index,
- const unsigned int local_index) const
+ get_dof_index (const ::DoFHandler<dim> &dof_handler,
+ const unsigned int line_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<1> /*dummy*/) const
{
Assert (fe_index == ::DoFHandler<dim>::default_fe_index,
ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
template <int dim>
void
DoFLevel<1>::
- set_line_dof_index (const ::DoFHandler<dim> &dof_handler,
- const unsigned int line_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index)
+ set_dof_index (const ::DoFHandler<dim> &dof_handler,
+ const unsigned int line_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<1> /*dummy*/)
{
Assert (fe_index == ::DoFHandler<dim>::default_fe_index,
ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
template <int dim>
unsigned int
DoFLevel<2>::
- get_quad_dof_index (const ::DoFHandler<dim> &dof_handler,
- const unsigned int quad_index,
- const unsigned int fe_index,
- const unsigned int local_index) const
+ get_dof_index (const ::DoFHandler<dim> &dof_handler,
+ const unsigned int quad_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<2> /*dummy*/) const
{
Assert (fe_index == ::DoFHandler<dim>::default_fe_index,
ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
template <int dim>
void
DoFLevel<2>::
- set_quad_dof_index (const ::DoFHandler<dim> &dof_handler,
- const unsigned int quad_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index)
+ set_dof_index (const ::DoFHandler<dim> &dof_handler,
+ const unsigned int quad_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<2> /*dummy*/)
{
Assert (fe_index == ::DoFHandler<dim>::default_fe_index,
ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
template <int dim>
unsigned int
DoFLevel<3>::
- get_hex_dof_index (const ::DoFHandler<dim> &dof_handler,
- const unsigned int hex_index,
- const unsigned int fe_index,
- const unsigned int local_index) const
+ get_dof_index (const ::DoFHandler<dim> &dof_handler,
+ const unsigned int hex_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<3> /*dummy*/) const
{
Assert (fe_index == ::DoFHandler<dim>::default_fe_index,
ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
template <int dim>
void
DoFLevel<3>::
- set_hex_dof_index (const ::DoFHandler<dim> &dof_handler,
- const unsigned int hex_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index)
+ set_dof_index (const ::DoFHandler<dim> &dof_handler,
+ const unsigned int hex_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<3> /*dummy*/)
{
Assert (fe_index == ::DoFHandler<dim>::default_fe_index,
ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
template
unsigned int
DoFLevel<1>::
- get_line_dof_index (const ::DoFHandler<deal_II_dimension> &dof_handler,
- const unsigned int line_index,
- const unsigned int fe_index,
- const unsigned int local_index) const;
+ get_dof_index (const ::DoFHandler<deal_II_dimension> &dof_handler,
+ const unsigned int line_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<1> dummy) const;
template
void
DoFLevel<1>::
- set_line_dof_index (const ::DoFHandler<deal_II_dimension> &dof_handler,
- const unsigned int line_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index);
+ set_dof_index (const ::DoFHandler<deal_II_dimension> &dof_handler,
+ const unsigned int line_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<1> dummy);
#if deal_II_dimension >= 2
template
unsigned int
DoFLevel<2>::
- get_quad_dof_index (const ::DoFHandler<deal_II_dimension> &dof_handler,
- const unsigned int quad_index,
- const unsigned int fe_index,
- const unsigned int local_index) const;
+ get_dof_index (const ::DoFHandler<deal_II_dimension> &dof_handler,
+ const unsigned int quad_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<2> dummy) const;
template
void
DoFLevel<2>::
- set_quad_dof_index (const ::DoFHandler<deal_II_dimension> &dof_handler,
- const unsigned int quad_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index);
+ set_dof_index (const ::DoFHandler<deal_II_dimension> &dof_handler,
+ const unsigned int quad_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<2> dummy);
#endif
template
unsigned int
DoFLevel<3>::
- get_hex_dof_index (const ::DoFHandler<deal_II_dimension> &dof_handler,
- const unsigned int hex_index,
- const unsigned int fe_index,
- const unsigned int local_index) const;
+ get_dof_index (const ::DoFHandler<deal_II_dimension> &dof_handler,
+ const unsigned int hex_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<3> dummy) const;
template
void
DoFLevel<3>::
- set_hex_dof_index (const ::DoFHandler<deal_II_dimension> &dof_handler,
- const unsigned int hex_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index);
+ set_dof_index (const ::DoFHandler<deal_II_dimension> &dof_handler,
+ const unsigned int hex_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<3> dummy);
#endif
template <int dim>
unsigned int
DoFLevel<1>::
- get_line_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
- const unsigned int line_index,
- const unsigned int fe_index,
- const unsigned int local_index) const
+ get_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
+ const unsigned int line_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<1> /*dummy*/) const
{
Assert (fe_index != ::hp::DoFHandler<dim>::default_fe_index,
ExcMessage ("You need to specify a FE index when working "
template <int dim>
void
DoFLevel<1>::
- set_line_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
- const unsigned int line_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index)
+ set_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
+ const unsigned int line_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<1> /*dummy*/)
{
Assert (fe_index != ::hp::DoFHandler<dim>::default_fe_index,
ExcMessage ("You need to specify a FE index when working "
template <int dim>
unsigned int
DoFLevel<2>::
- get_quad_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
- const unsigned int quad_index,
- const unsigned int fe_index,
- const unsigned int local_index) const
+ get_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
+ const unsigned int quad_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<2> /*dummy*/) const
{
Assert (dim >= 2, ExcMessage ("You can only access quads in 2d or higher"));
Assert (fe_index != ::hp::DoFHandler<dim>::default_fe_index,
template <int dim>
void
DoFLevel<2>::
- set_quad_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
- const unsigned int quad_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index)
+ set_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
+ const unsigned int quad_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<2> /*dummy*/)
{
Assert (dim >= 2, ExcMessage ("You can only access quads in 2d or higher"));
Assert (fe_index != ::hp::DoFHandler<dim>::default_fe_index,
template <int dim>
unsigned int
DoFLevel<3>::
- get_hex_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
- const unsigned int hex_index,
- const unsigned int fe_index,
- const unsigned int local_index) const
+ get_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
+ const unsigned int hex_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<3> /*dummy*/) const
{
Assert (dim >= 3, ExcMessage ("You can only access hexs in 3d or higher"));
Assert (fe_index != ::hp::DoFHandler<dim>::default_fe_index,
template <int dim>
void
DoFLevel<3>::
- set_hex_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
- const unsigned int hex_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index)
+ set_dof_index (const ::hp::DoFHandler<dim> &dof_handler,
+ const unsigned int hex_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<3> /*dummy*/)
{
Assert (dim >= 3, ExcMessage ("You can only access hexs in 3d or higher"));
Assert (fe_index != ::hp::DoFHandler<dim>::default_fe_index,
template
unsigned int
DoFLevel<1>::
- get_line_dof_index (const ::hp::DoFHandler<deal_II_dimension> &dof_handler,
- const unsigned int line_index,
- const unsigned int fe_index,
- const unsigned int local_index) const;
+ get_dof_index (const ::hp::DoFHandler<deal_II_dimension> &dof_handler,
+ const unsigned int line_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<1> dummy) const;
template
void
DoFLevel<1>::
- set_line_dof_index (const ::hp::DoFHandler<deal_II_dimension> &dof_handler,
- const unsigned int line_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index);
+ set_dof_index (const ::hp::DoFHandler<deal_II_dimension> &dof_handler,
+ const unsigned int line_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<1> dummy);
#if deal_II_dimension >= 2
template
unsigned int
DoFLevel<2>::
- get_quad_dof_index (const ::hp::DoFHandler<deal_II_dimension> &dof_handler,
- const unsigned int quad_index,
- const unsigned int fe_index,
- const unsigned int local_index) const;
+ get_dof_index (const ::hp::DoFHandler<deal_II_dimension> &dof_handler,
+ const unsigned int quad_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<2> dummy) const;
template
void
DoFLevel<2>::
- set_quad_dof_index (const ::hp::DoFHandler<deal_II_dimension> &dof_handler,
- const unsigned int quad_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index);
+ set_dof_index (const ::hp::DoFHandler<deal_II_dimension> &dof_handler,
+ const unsigned int quad_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<2> dummy);
#endif
template
unsigned int
DoFLevel<3>::
- get_hex_dof_index (const ::hp::DoFHandler<deal_II_dimension> &dof_handler,
- const unsigned int hex_index,
- const unsigned int fe_index,
- const unsigned int local_index) const;
+ get_dof_index (const ::hp::DoFHandler<deal_II_dimension> &dof_handler,
+ const unsigned int hex_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ internal::StructuralDimension<3> dummy) const;
template
void
DoFLevel<3>::
- set_hex_dof_index (const ::hp::DoFHandler<deal_II_dimension> &dof_handler,
- const unsigned int hex_index,
- const unsigned int fe_index,
- const unsigned int local_index,
- const unsigned int global_index);
+ set_dof_index (const ::hp::DoFHandler<deal_II_dimension> &dof_handler,
+ const unsigned int hex_index,
+ const unsigned int fe_index,
+ const unsigned int local_index,
+ const unsigned int global_index,
+ internal::StructuralDimension<3> dummy);
#endif
}
unsigned int MGDoFObjectAccessor<1, dim>::mg_dof_index (const unsigned int i) const
{
return this->mg_dof_handler->mg_levels[this->present_level]
- ->get_line_dof_index(*this->dof_handler,
- this->present_index,
- 0,
- i);
+ ->get_dof_index(*this->dof_handler,
+ this->present_index,
+ 0,
+ i,
+ internal::StructuralDimension<1>());
}
const unsigned int index) const
{
this->mg_dof_handler->mg_levels[this->present_level]
- ->set_line_dof_index(*this->dof_handler,
- this->present_index,
- 0,
- i,
- index);
+ ->set_dof_index(*this->dof_handler,
+ this->present_index,
+ 0,
+ i,
+ index,
+ internal::StructuralDimension<1>());
}
unsigned int MGDoFObjectAccessor<2, dim>::mg_dof_index (const unsigned int i) const
{
return this->mg_dof_handler->mg_levels[this->present_level]
- ->get_quad_dof_index(*this->dof_handler,
- this->present_index,
- 0,
- i);
+ ->get_dof_index(*this->dof_handler,
+ this->present_index,
+ 0,
+ i,
+ internal::StructuralDimension<2>());
}
const unsigned int index) const
{
this->mg_dof_handler->mg_levels[this->present_level]
- ->set_quad_dof_index(*this->dof_handler,
- this->present_index,
- 0,
- i,
- index);
+ ->set_dof_index(*this->dof_handler,
+ this->present_index,
+ 0,
+ i,
+ index,
+ internal::StructuralDimension<2>());
}
unsigned int MGDoFObjectAccessor<3, dim>::mg_dof_index (const unsigned int i) const
{
return this->mg_dof_handler->mg_levels[this->present_level]
- ->get_hex_dof_index(*this->dof_handler,
- this->present_index,
- 0,
- i);
+ ->get_dof_index(*this->dof_handler,
+ this->present_index,
+ 0,
+ i,
+ internal::StructuralDimension<3>());
}
const unsigned int index) const
{
this->mg_dof_handler->mg_levels[this->present_level]
- ->set_hex_dof_index(*this->dof_handler,
- this->present_index,
- 0,
- i,
- index);
+ ->set_dof_index(*this->dof_handler,
+ this->present_index,
+ 0,
+ i,
+ index,
+ internal::StructuralDimension<3>());
}