]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Provide nth_active_fe_index.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 27 Jul 2006 16:22:17 +0000 (16:22 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 27 Jul 2006 16:22:17 +0000 (16:22 +0000)
git-svn-id: https://svn.dealii.org/trunk@13449 0785d39b-7218-0410-832d-ea1e28bc413d

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

index e0e20a2cb466d92dc98b7533d0163d8aaa9b44be..7636d1657026481b890d94d7f80392e019ef014e 100644 (file)
@@ -270,7 +270,7 @@ class DoFAccessor : public DoFObjectAccessor_Inheritance<structdim, DH::dimensio
 
                                     /**
                                      * Set the index of the <i>i</i> degree
-                                     * on the @p vertexth vertex to @p index.
+                                     * on the @p vertex-th vertex to @p index.
                                      *
                                      * The last argument denotes the
                                      * finite element index. For the
@@ -409,28 +409,43 @@ class DoFAccessor : public DoFObjectAccessor_Inheritance<structdim, DH::dimensio
     unsigned int
     n_active_fe_indices () const;
 
-                                     /**
-                                      * Check whether a given finite
-                                      * element index is used on the
-                                      * present object or not.
-                                      *
-                                      * For non-hp DoFHandler objects,
-                                      * only a zero index may be used,
-                                      * since only a single finite
-                                      * element can ever be active,
-                                      * and the answer is then @p
-                                      * true. On the other hand, for
-                                      * hp::DoFHandler objects,
-                                      * several fe indices may be used
-                                      * on the same object (except for
-                                      * a cell, where only a single
-                                      * finite element can be active
-                                      * at any given time).
-                                      */
+                                    /**
+                                     * Return the @p n-th active fe
+                                     * index on this object. For
+                                     * cells and all non-hp objects,
+                                     * there is only a single active
+                                     * fe index, so the argument must
+                                     * be equal to zero. For
+                                     * lower-dimensional hp objects,
+                                     * there are
+                                     * n_active_fe_indices() active
+                                     * finite elements, and this
+                                     * function can be queried for
+                                     * their indices.
+                                     */
+    unsigned int
+    nth_active_fe_index (const unsigned int n) const;
+    
+                                    /**
+                                     * Return true if the finite
+                                     * element with given index is
+                                     * active on the present
+                                     * object. For non-hp DoF
+                                     * accessors, this is of course
+                                     * the case only if @p fe_index
+                                     * equals zero. For cells, it is
+                                     * the case if @p fe_index equals
+                                     * active_fe_index() of this
+                                     * cell. For faces and other
+                                     * lower-dimensional objects,
+                                     * there may be more than one @p
+                                     * fe_index that are active on
+                                     * any given object (see
+                                     * n_active_fe_indices()).
+                                     */
     bool
     fe_index_is_active (const unsigned int fe_index) const;
 
-
                                      /**
                                      * Exceptions for child classes
                                      *
index 9ad16c3df17bf7c61a6a3b263cff654fd346f82d..d65f16ad4b2e6e221f4c5a09223b357b03d0c676 100644 (file)
@@ -230,6 +230,20 @@ DoFAccessor<dim,DH>::n_active_fe_indices () const
 
 
 
+template <int dim, class DH>
+inline
+unsigned int
+DoFAccessor<dim,DH>::nth_active_fe_index (const unsigned int n) const
+{
+                                  // access the respective DoF
+  return this->dof_handler
+    ->template nth_active_fe_index<dim> (this->present_level,
+                                        this->present_index,
+                                        n);
+}
+
+
+
 template <int dim, class DH>
 inline
 bool
@@ -243,7 +257,6 @@ DoFAccessor<dim,DH>::fe_index_is_active (const unsigned int fe_index) const
 }
 
 
-
 /*------------------------- Functions: DoFObjectAccessor<1,dim> -----------------------*/
 
 

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.