]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add fe_index to functions that need to distinguish between different finite elements...
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 27 Apr 2006 16:03:55 +0000 (16:03 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 27 Apr 2006 16:03:55 +0000 (16:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@12924 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_accessor.h
deal.II/deal.II/include/dofs/dof_accessor.templates.h
deal.II/deal.II/source/dofs/dof_accessor.cc

index 80f0967a7cfa391d413421a4562df0bb178ac79d..88bb9bd59be0669352e03b4f94ac532f5ab58909 100644 (file)
@@ -296,30 +296,159 @@ class DoFObjectAccessor : public DoFAccessor<DH>,
                                     /**
                                      * Index of the <i>i</i>th degree
                                      * of freedom of this object.
-                                     */
-    unsigned int dof_index (const unsigned int i) const;
+                                     *
+                                     * 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.
+                                     * 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 int index) const;
+                       const unsigned int index,
+                       const unsigned int fe_index = DH::default_fe_index) const;
 
                                     /**
                                      * Index of the <i>i</i> degree
                                      * on the @p vertexth vertex.
+                                     *
+                                     * 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 vertex_dof_index (const unsigned int vertex,
-                                  const unsigned int i) const;
+                                  const unsigned int i,
+                                  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.
+                                     *
+                                     * 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_vertex_dof_index (const unsigned int vertex,
                               const unsigned int i,
-                              const unsigned int index) const;
+                              const unsigned int index,
+                              const unsigned int fe_index = DH::default_fe_index) const;
 
                                     /**
                                      * Return the indices of the dofs of this
@@ -570,32 +699,161 @@ class DoFObjectAccessor<1, DH> :
                       const AccessorData       *local_data);
     
                                     /**
-                                     * Return the index of the @p ith degree
-                                     * of freedom of this line.
-                                     */
-    unsigned int dof_index (const unsigned int i) const;
+                                     * 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 @p ith degree
-                                     * of freedom of this line to @p index.
+                                     * 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;
+                       const unsigned int index,
+                       const unsigned int fe_index = DH::default_fe_index) const;
 
                                     /**
-                                     * Return the index of the @p ith degree
+                                     * Index of the <i>i</i> degree
                                      * on the @p vertexth vertex.
+                                     *
+                                     * 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 vertex_dof_index (const unsigned int vertex,
-                                  const unsigned int i) const;
+                                  const unsigned int i,
+                                  const unsigned int fe_index = DH::default_fe_index) const;
 
                                     /**
-                                     * Set the index of the @p ith degree
+                                     * 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
+                                     * 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_vertex_dof_index (const unsigned int vertex,
                               const unsigned int i,
-                              const unsigned int index) const;
+                              const unsigned int index,
+                              const unsigned int fe_index = DH::default_fe_index) const;
 
                                     /**
                                      * Return the indices of the dofs of this
@@ -772,32 +1030,161 @@ class DoFObjectAccessor<2, DH> :
                       const AccessorData       *local_data);
     
                                     /**
-                                     * Return the index of the @p ith degree
-                                     * of freedom of this quad.
-                                     */
-    unsigned int dof_index (const unsigned int i) const;
+                                     * 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 @p ith degree
-                                     * of freedom of this quad to @p index.
+                                     * 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;
+                       const unsigned int index,
+                       const unsigned int fe_index = DH::default_fe_index) const;
 
                                     /**
-                                     * Return the index of the @p ith degree
+                                     * Index of the <i>i</i> degree
                                      * on the @p vertexth vertex.
+                                     *
+                                     * 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 vertex_dof_index (const unsigned int vertex,
-                                  const unsigned int i) const;
+                                  const unsigned int i,
+                                  const unsigned int fe_index = DH::default_fe_index) const;
 
                                     /**
-                                     * Set the index of the @p ith degree
+                                     * 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
+                                     * 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_vertex_dof_index (const unsigned int vertex,
                               const unsigned int i,
-                              const unsigned int index) const;
+                              const unsigned int index,
+                              const unsigned int fe_index = DH::default_fe_index) const;
 
                                     /**
                                      * Return the indices of the dofs of this
@@ -982,33 +1369,163 @@ class DoFObjectAccessor<3, DH> :
                       const int                 index,
                       const AccessorData       *local_data);
     
+
                                     /**
-                                     * Return the index of the @p ith degree
-                                     * of freedom of this hex.
-                                     */
-    unsigned int dof_index (const unsigned int i) const;
+                                     * 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 @p ith degree
-                                     * of freedom of this hex to @p index.
+                                     * 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;
+                       const unsigned int index,
+                       const unsigned int fe_index = DH::default_fe_index) const;
 
                                     /**
-                                     * Return the index of the @p ith degree
+                                     * Index of the <i>i</i> degree
                                      * on the @p vertexth vertex.
+                                     *
+                                     * 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 vertex_dof_index (const unsigned int vertex,
-                                  const unsigned int i) const;
+                                  const unsigned int i,
+                                  const unsigned int fe_index = DH::default_fe_index) const;
 
                                     /**
-                                     * Set the index of the @p ith degree
+                                     * 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
+                                     * 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_vertex_dof_index (const unsigned int vertex,
                               const unsigned int i,
-                              const unsigned int index) const;
+                              const unsigned int index,
+                              const unsigned int fe_index = DH::default_fe_index) const;
 
                                     /**
                                      * Return the indices of the dofs of this
@@ -1549,21 +2066,27 @@ DoFCellAccessor<DoFHandler<3> >::face (const unsigned int i) const;
 
 template <>
 void DoFObjectAccessor<1,hp::DoFHandler<1> >::set_dof_index (const unsigned int,
+                                                            const unsigned int,
                                                             const unsigned int) const;
 template <>
 void DoFObjectAccessor<1,hp::DoFHandler<2> >::set_dof_index (const unsigned int,
+                                                            const unsigned int,
                                                             const unsigned int) const;
 template <>
 void DoFObjectAccessor<1,hp::DoFHandler<3> >::set_dof_index (const unsigned int,
+                                                            const unsigned int,
                                                             const unsigned int) const;
 template <>
 void DoFObjectAccessor<2,hp::DoFHandler<2> >::set_dof_index (const unsigned int,
+                                                            const unsigned int,
                                                             const unsigned int) const;
 template <>
 void DoFObjectAccessor<2,hp::DoFHandler<3> >::set_dof_index (const unsigned int,
+                                                            const unsigned int,
                                                             const unsigned int) const;
 template <>
 void DoFObjectAccessor<3,hp::DoFHandler<3> >::set_dof_index (const unsigned int,
+                                                            const unsigned int,
                                                             const unsigned int) const;
 
 
index 9552b1007d3b9b0dc20821503e48fcd01f69b1a7..66983c758b59db36ee4e5dc244f2c1de23f66eb0 100644 (file)
@@ -39,7 +39,8 @@ DoFAccessor<DH>::DoFAccessor ()
 
 template <class DH>
 inline
-DoFAccessor<DH>::DoFAccessor (const DH *dof_handler) :
+DoFAccessor<DH>::DoFAccessor (const DH *dof_handler)
+               :
                dof_handler(const_cast<DH*>(dof_handler))
 {}
 
@@ -382,8 +383,11 @@ DoFObjectAccessor<3,DH>::operator != (const DoFObjectAccessor<3,DH> &a) const
 template <>
 inline
 unsigned int
-DoFObjectAccessor<1,DoFHandler<1> >::dof_index (const unsigned int i) const
+DoFObjectAccessor<1,DoFHandler<1> >::dof_index (const unsigned int i,
+                                               const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<1>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
@@ -404,8 +408,11 @@ template <>
 inline
 unsigned int
 DoFObjectAccessor<1,DoFHandler<1> >::vertex_dof_index (const unsigned int vertex,
-                                                      const unsigned int i) const
+                                                      const unsigned int i,
+                                                      const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<1>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
@@ -465,8 +472,11 @@ DoFObjectAccessor<1,DoFHandler<1> >::get_dof_indices (std::vector<unsigned int>
 template <>
 inline
 unsigned int
-DoFObjectAccessor<1,DoFHandler<2> >::dof_index (const unsigned int i) const
+DoFObjectAccessor<1,DoFHandler<2> >::dof_index (const unsigned int i,
+                                               const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<2>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
@@ -487,8 +497,11 @@ template <>
 inline
 unsigned int
 DoFObjectAccessor<1,DoFHandler<2> >::vertex_dof_index (const unsigned int vertex,
-                                                      const unsigned int i) const
+                                                      const unsigned int i,
+                                                      const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<2>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
@@ -548,8 +561,11 @@ DoFObjectAccessor<1,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int>
 template <>
 inline
 unsigned int
-DoFObjectAccessor<1,DoFHandler<3> >::dof_index (const unsigned int i) const
+DoFObjectAccessor<1,DoFHandler<3> >::dof_index (const unsigned int i,
+                                               const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<3>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
@@ -570,8 +586,11 @@ template <>
 inline
 unsigned int
 DoFObjectAccessor<1,DoFHandler<3> >::vertex_dof_index (const unsigned int vertex,
-                                                      const unsigned int i) const
+                                                      const unsigned int i,
+                                                      const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<3>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("DoFHandler not initialized"));
 
@@ -633,8 +652,11 @@ DoFObjectAccessor<1,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
 template <>
 inline
 unsigned int
-DoFObjectAccessor<2,DoFHandler<2> >::dof_index (const unsigned int i) const
+DoFObjectAccessor<2,DoFHandler<2> >::dof_index (const unsigned int i,
+                                               const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<2>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
          DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
                                   // make sure a FE has been selected
@@ -656,8 +678,11 @@ template <>
 inline
 unsigned int
 DoFObjectAccessor<2,DoFHandler<2> >::vertex_dof_index (const unsigned int vertex,
-                                                      const unsigned int i) const
+                                                      const unsigned int i,
+                                                      const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<2>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
          DoFAccessor<DoFHandler<2> >::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
@@ -725,8 +750,11 @@ DoFObjectAccessor<2,DoFHandler<2> >::get_dof_indices (std::vector<unsigned int>
 template <>
 inline
 unsigned int
-DoFObjectAccessor<2,DoFHandler<3> >::dof_index (const unsigned int i) const
+DoFObjectAccessor<2,DoFHandler<3> >::dof_index (const unsigned int i,
+                                               const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<3>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
                                   // make sure a FE has been selected
@@ -748,8 +776,11 @@ template <>
 inline
 unsigned int
 DoFObjectAccessor<2,DoFHandler<3> >::vertex_dof_index (const unsigned int vertex,
-                                                      const unsigned int i) const
+                                                      const unsigned int i,
+                                                      const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<3>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
@@ -822,8 +853,11 @@ DoFObjectAccessor<2,DoFHandler<3> >::get_dof_indices (std::vector<unsigned int>
 template <>
 inline
 unsigned int
-DoFObjectAccessor<3,DoFHandler<3> >::dof_index (const unsigned int i) const
+DoFObjectAccessor<3,DoFHandler<3> >::dof_index (const unsigned int i,
+                                               const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<3>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
                                   // make sure a FE has been selected
@@ -845,8 +879,11 @@ template <>
 inline
 unsigned int
 DoFObjectAccessor<3,DoFHandler<3> >::vertex_dof_index (const unsigned int vertex,
-                                                      const unsigned int i) const
+                                                      const unsigned int i,
+                                                      const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<3>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   Assert (this->dof_handler != 0,
          DoFAccessor<DoFHandler<3> >::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
@@ -923,8 +960,11 @@ template <>
 inline
 unsigned int
 DoFObjectAccessor<1,hp::DoFHandler<1> >::vertex_dof_index (const unsigned int vertex,
-                                                          const unsigned int i) const
+                                                          const unsigned int i,
+                                                          const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<1>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("hp::DoFHandler not initialized"));
 
@@ -946,8 +986,11 @@ template <>
 inline
 unsigned int
 DoFObjectAccessor<1,hp::DoFHandler<2> >::vertex_dof_index (const unsigned int vertex,
-                                                          const unsigned int i) const
+                                                          const unsigned int i,
+                                                          const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<2>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("hp::DoFHandler not initialized"));
 
@@ -968,8 +1011,11 @@ template <>
 inline
 unsigned int
 DoFObjectAccessor<1,hp::DoFHandler<3> >::vertex_dof_index (const unsigned int vertex,
-                                                          const unsigned int i) const
+                                                          const unsigned int i,
+                                                          const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (static_cast<unsigned int>(this->present_level) < this->dof_handler->levels.size(),
           ExcMessage ("hp::DoFHandler not initialized"));
 
@@ -990,8 +1036,11 @@ template <>
 inline
 unsigned int
 DoFObjectAccessor<2,hp::DoFHandler<2> >::vertex_dof_index (const unsigned int vertex,
-                                                          const unsigned int i) const
+                                                          const unsigned int i,
+                                                          const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<2>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (this->dof_handler != 0,
          DoFAccessor<hp::DoFHandler<2> >::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
@@ -1014,8 +1063,11 @@ template <>
 inline
 unsigned int
 DoFObjectAccessor<2,hp::DoFHandler<3> >::vertex_dof_index (const unsigned int vertex,
-                                                          const unsigned int i) const
+                                                          const unsigned int i,
+                                                          const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (this->dof_handler != 0,
          DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
@@ -1038,8 +1090,11 @@ template <>
 inline
 unsigned int
 DoFObjectAccessor<3,hp::DoFHandler<3> >::vertex_dof_index (const unsigned int vertex,
-                                                          const unsigned int i) const
+                                                          const unsigned int i,
+                                                          const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (this->dof_handler != 0,
          DoFAccessor<hp::DoFHandler<3> >::ExcInvalidObject());
   Assert (&this->dof_handler->get_fe() != 0,
@@ -1062,8 +1117,12 @@ DoFObjectAccessor<3,hp::DoFHandler<3> >::vertex_dof_index (const unsigned int ve
 template <>
 inline
 unsigned int
-DoFObjectAccessor<1,hp::DoFHandler<1> >::dof_index (const unsigned int i) const
+DoFObjectAccessor<1,hp::DoFHandler<1> >::dof_index (const unsigned int i,
+                                                   const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<1>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
+
                                   // since the exception classes are
                                   // from a template dependent base
                                   // class, we have to fully qualify
@@ -1143,8 +1202,11 @@ DoFObjectAccessor<1,hp::DoFHandler<1> >::get_dof_indices (std::vector<unsigned i
 template <>
 inline
 unsigned int
-DoFObjectAccessor<1,hp::DoFHandler<2> >::dof_index (const unsigned int i) const
+DoFObjectAccessor<1,hp::DoFHandler<2> >::dof_index (const unsigned int i,
+                                                   const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<2>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
                                   // since the exception classes are
                                   // from a template dependent base
                                   // class, we have to fully qualify
@@ -1220,8 +1282,11 @@ DoFObjectAccessor<1,hp::DoFHandler<2> >::get_dof_indices (std::vector<unsigned i
 template <>
 inline
 unsigned int
-DoFObjectAccessor<1,hp::DoFHandler<3> >::dof_index (const unsigned int i) const
+DoFObjectAccessor<1,hp::DoFHandler<3> >::dof_index (const unsigned int i,
+                                                   const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
                                   // since the exception classes are
                                   // from a template dependent base
                                   // class, we have to fully qualify
@@ -1298,8 +1363,11 @@ template <>
 inline
 void
 DoFObjectAccessor<1,hp::DoFHandler<1> >::set_dof_index (const unsigned int i,
-                                                       const unsigned int index) const
+                                                       const unsigned int index,
+                                                       const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<1>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   typedef DoFAccessor<hp::DoFHandler<1> > BaseClass;
 
   Assert (this->dof_handler != 0,
@@ -1334,8 +1402,11 @@ template <>
 inline
 void
 DoFObjectAccessor<1, hp::DoFHandler<2> >::set_dof_index (const unsigned int i,
-                                                        const unsigned int index) const
+                                                        const unsigned int index,
+                                                        const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<2>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   typedef DoFAccessor<hp::DoFHandler<2> > BaseClass;
 
   Assert (this->dof_handler != 0,
@@ -1370,8 +1441,11 @@ template <>
 inline
 void
 DoFObjectAccessor<1, hp::DoFHandler<3> >::set_dof_index (const unsigned int i,
-                                                        const unsigned int index) const
+                                                        const unsigned int index,
+                                                        const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   typedef DoFAccessor<hp::DoFHandler<3> > BaseClass;
 
   Assert (this->dof_handler != 0,
@@ -1403,8 +1477,11 @@ DoFObjectAccessor<1, hp::DoFHandler<3> >::set_dof_index (const unsigned int i,
 
 template <>
 inline
-unsigned int DoFObjectAccessor<2,hp::DoFHandler<2> >::dof_index (const unsigned int i) const
+unsigned int DoFObjectAccessor<2,hp::DoFHandler<2> >::dof_index (const unsigned int i,
+                                                                const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<2>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   typedef DoFAccessor<hp::DoFHandler<2> > BaseClass;
 
   Assert (this->dof_handler != 0,
@@ -1437,8 +1514,11 @@ unsigned int DoFObjectAccessor<2,hp::DoFHandler<2> >::dof_index (const unsigned
 
 template <>
 inline
-unsigned int DoFObjectAccessor<2,hp::DoFHandler<3> >::dof_index (const unsigned int i) const
+unsigned int DoFObjectAccessor<2,hp::DoFHandler<3> >::dof_index (const unsigned int i,
+                                                                const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   typedef DoFAccessor<hp::DoFHandler<3> > BaseClass;
 
   Assert (this->dof_handler != 0,
@@ -1469,8 +1549,11 @@ template <>
 inline
 void
 DoFObjectAccessor<2, hp::DoFHandler<2> >::set_dof_index (const unsigned int i,
-                                                        const unsigned int index) const
+                                                        const unsigned int index,
+                                                        const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<2>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   typedef DoFAccessor<hp::DoFHandler<2> > BaseClass;
 
   Assert (this->dof_handler != 0,
@@ -1505,8 +1588,11 @@ template <>
 inline
 void
 DoFObjectAccessor<2, hp::DoFHandler<3> >::set_dof_index (const unsigned int i,
-                                                        const unsigned int index) const
+                                                        const unsigned int index,
+                                                        const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   typedef DoFAccessor<hp::DoFHandler<3> > BaseClass;
 
   Assert (this->dof_handler != 0,
@@ -1632,8 +1718,11 @@ DoFObjectAccessor<2,hp::DoFHandler<3> >::get_dof_indices (std::vector<unsigned i
 template <>
 inline
 unsigned int
-DoFObjectAccessor<3,hp::DoFHandler<3> >::dof_index (const unsigned int i) const
+DoFObjectAccessor<3,hp::DoFHandler<3> >::dof_index (const unsigned int i,
+                                                   const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   typedef DoFAccessor<hp::DoFHandler<3> > BaseClass;
 
   Assert (this->dof_handler != 0,
@@ -1668,8 +1757,11 @@ template <>
 inline
 void
 DoFObjectAccessor<3, hp::DoFHandler<3> >::set_dof_index (const unsigned int i,
-                                                        const unsigned int index) const
+                                                        const unsigned int index,
+                                                        const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   typedef DoFAccessor<hp::DoFHandler<3> > BaseClass;
     
   Assert (this->dof_handler != 0,
index 49ea3e727769c53174f5d5634d42ae817e1162b5..d31c0147c340ce091a13cccfcb6ff77da325a4a5 100644 (file)
 
 template <class DH>
 void DoFObjectAccessor<1, DH>::set_dof_index (const unsigned int i,
-                                              const unsigned int index) const
+                                              const unsigned int index,
+                                             const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<1>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   typedef DoFAccessor<DH> BaseClass;
 
   Assert (this->dof_handler != 0,
@@ -61,9 +64,12 @@ void DoFObjectAccessor<1, DH>::set_dof_index (const unsigned int i,
 template <class DH>
 void DoFObjectAccessor<1, DH>::set_vertex_dof_index (const unsigned int vertex,
                                                      const unsigned int i,
-                                                     const unsigned int index) const
+                                                     const unsigned int index,
+                                             const unsigned int fe_index) const
 
 {
+  Assert (fe_index == DoFHandler<1>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
                                   // since the exception classes are
                                   // from a template dependent base
                                   // class, we have to fully qualify
@@ -166,8 +172,11 @@ DoFObjectAccessor<1,DH>::set_dof_values (const Vector<number> &local_values,
 
 template <class DH>
 void DoFObjectAccessor<2, DH>::set_dof_index (const unsigned int i,
-                                              const unsigned int index) const
+                                              const unsigned int index,
+                                             const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<1>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   typedef DoFAccessor<DH> BaseClass;
 
   Assert (this->dof_handler != 0,
@@ -189,8 +198,11 @@ template <class DH>
 void
 DoFObjectAccessor<2, DH>::set_vertex_dof_index (const unsigned int vertex,
                                                 const unsigned int i,
-                                                const unsigned int index) const
+                                                const unsigned int index,
+                                             const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<1>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   typedef DoFAccessor<DH> BaseClass;
 
   Assert (this->dof_handler != 0,
@@ -293,8 +305,11 @@ DoFObjectAccessor<2,DH>::set_dof_values (const Vector<number> &local_values,
 
 template <class DH>
 void DoFObjectAccessor<3, DH>::set_dof_index (const unsigned int i,
-                                              const unsigned int index) const
+                                              const unsigned int index,
+                                             const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<1>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   typedef DoFAccessor<DH> BaseClass;
 
   Assert (this->dof_handler != 0,
@@ -315,8 +330,11 @@ void DoFObjectAccessor<3, DH>::set_dof_index (const unsigned int i,
 template <class DH>
 void DoFObjectAccessor<3, DH>::set_vertex_dof_index (const unsigned int vertex,
                                                      const unsigned int i,
-                                                     const unsigned int index) const
+                                                     const unsigned int index,
+                                             const unsigned int fe_index) const
 {
+  Assert (fe_index == DoFHandler<1>::default_fe_index,
+         ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects"));
   typedef DoFAccessor<DH> BaseClass;
 
   Assert (this->dof_handler != 0,
@@ -430,24 +448,33 @@ DoFObjectAccessor<3,DH>::set_dof_values (const Vector<number> &local_values,
 template <>
 void DoFObjectAccessor<1, hp::DoFHandler<1> >::set_vertex_dof_index (const unsigned int /*vertex*/,
                                                                      const unsigned int /*i*/,
-                                                                     const unsigned int /*index*/) const
+                                                                     const unsigned int /*index*/,
+                                             const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<1>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (false, ExcInternalError());
 }
 
 template <>
 void DoFObjectAccessor<1, hp::DoFHandler<2> >::set_vertex_dof_index (const unsigned int /*vertex*/,
                                                                      const unsigned int /*i*/,
-                                                                     const unsigned int /*index*/) const
+                                                                     const unsigned int /*index*/,
+                                             const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<2>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (false, ExcInternalError());
 }
 
 template <>
 void DoFObjectAccessor<1, hp::DoFHandler<3> >::set_vertex_dof_index (const unsigned int /*vertex*/,
                                                                      const unsigned int /*i*/,
-                                                                     const unsigned int /*index*/) const
+                                                                     const unsigned int /*index*/,
+                                             const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (false, ExcInternalError());
 }
 
@@ -516,16 +543,22 @@ DoFObjectAccessor<1,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/
 template <>
 void DoFObjectAccessor<2, hp::DoFHandler<2> >::set_vertex_dof_index (const unsigned int /*vertex*/,
                                                                      const unsigned int /*i*/,
-                                                                     const unsigned int /*index*/) const
+                                                                     const unsigned int /*index*/,
+                                             const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<2>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (false, ExcInternalError());
 }
 
 template <>
 void DoFObjectAccessor<2, hp::DoFHandler<3> >::set_vertex_dof_index (const unsigned int /*vertex*/,
                                                                      const unsigned int /*i*/,
-                                                                     const unsigned int /*index*/) const
+                                                                     const unsigned int /*index*/,
+                                             const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (false, ExcInternalError());
 }
 
@@ -576,8 +609,11 @@ DoFObjectAccessor<2,hp::DoFHandler<3> >::set_dof_values (const Vector<number> &/
 template <>
 void DoFObjectAccessor<3, hp::DoFHandler<3> >::set_vertex_dof_index (const unsigned int /*vertex*/,
                                                                      const unsigned int /*i*/,
-                                                                     const unsigned int /*index*/) const
+                                                                     const unsigned int /*index*/,
+                                             const unsigned int fe_index) const
 {
+  Assert (fe_index != hp::DoFHandler<3>::default_fe_index,
+         ExcMessage ("You need to specify a FE index when working with hp DoFHandlers"));
   Assert (false, ExcInternalError());
 }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.