]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Documentation and style changes.
authorMarkus Buerg <buerg@math.tamu.edu>
Tue, 8 Jun 2010 16:00:35 +0000 (16:00 +0000)
committerMarkus Buerg <buerg@math.tamu.edu>
Tue, 8 Jun 2010 16:00:35 +0000 (16:00 +0000)
git-svn-id: https://svn.dealii.org/trunk@21178 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe_q_hierarchical.h
deal.II/deal.II/source/fe/fe_q_hierarchical.cc

index 4c8c6bc0332e486f1f3a557c3ec765a8f17f81c6..27a1d66d37bf26e5f8cccb4f8418dc1cdc519e59 100644 (file)
@@ -47,6 +47,10 @@ template <int dim, int spacedim> class MappingQ;
  * Future work will involve writing projection--interpolation operators
  * that can interpolate onto the higher order bubble functions.
  *
+ * The various constraint, prolongation, and restriction matrices are 
+ * now available in all dimensions for all degrees @p p, currently up to 
+ * order 19.
+ *
  * The constructor of this class takes the degree @p p of this finite
  * element.
  *
@@ -265,6 +269,64 @@ class FE_Q_Hierarchical : public FE_Poly<TensorProductPolynomials<dim>,dim>
     virtual bool has_support_on_face (const unsigned int shape_index,
                                      const unsigned int face_index) const;
 
+                                    /**
+                                     * @name Functions to support hp
+                                     * @{
+                                     */
+
+                     /**
+                      * Return whether this element
+                      * implements its hanging node
+                      * constraints in the new way,
+                                     * which has to be used to make
+                                     * elements "hp compatible".
+                                      *
+                                     * For the FE_Q_Hierarchical class the
+                                     * result is always true (independent of
+                                     * the degree of the element), as it
+                                     * implements the complete set of
+                                     * functions necessary for hp capability.
+                      */
+    virtual bool hp_constraints_are_implemented () const;
+
+                                    /**
+                                     * If, on a vertex, several
+                                     * finite elements are active,
+                                     * the hp code first assigns the
+                                     * degrees of freedom of each of
+                                     * these FEs different global
+                                     * indices. It then calls this
+                                     * function to find out which of
+                                     * them should get identical
+                                     * values, and consequently can
+                                     * receive the same global DoF
+                                     * index. This function therefore
+                                     * returns a list of identities
+                                     * between DoFs of the present
+                                     * finite element object with the
+                                     * DoFs of @p fe_other, which is
+                                     * a reference to a finite
+                                     * element object representing
+                                     * one of the other finite
+                                     * elements active on this
+                                     * particular vertex. The
+                                     * function computes which of the
+                                     * degrees of freedom of the two
+                                     * finite element objects are
+                                     * equivalent, and returns a list
+                                     * of pairs of global dof indices
+                                     * in @p identities. The first
+                                     * index of each pair denotes one
+                                     * of the vertex dofs of the
+                                     * present element, whereas the
+                                     * second is the corresponding
+                                     * index of the other finite
+                                     * element.
+                                     */
+    virtual
+    std::vector<std::pair<unsigned int, unsigned int> >
+    hp_vertex_dof_identities (const FiniteElement<dim> &fe_other) const;
+
                                     /**
                                      * Determine an estimate for the
                                      * memory consumption (in bytes)
index c00a74f4507f81fc9b692d234ab7f10ec066410f..8d311766a8e4bdebdb9f83910cf90d33cb3cb6c2 100644 (file)
@@ -12,6 +12,7 @@
 //---------------------------------------------------------------------------
 
 #include <fe/fe_q_hierarchical.h>
+#include <fe/fe_nothing.h>
 
 #include <cmath>
 #include <sstream>
@@ -120,6 +121,49 @@ FE_Q_Hierarchical<dim>::clone() const
 }
 
 
+
+template <int dim>
+bool
+FE_Q_Hierarchical<dim>::hp_constraints_are_implemented () const
+{
+  return true;
+}
+
+
+template <int dim>
+std::vector<std::pair<unsigned int, unsigned int> >
+FE_Q_Hierarchical<dim>::
+hp_vertex_dof_identities (const FiniteElement<dim> &fe_other) const
+{
+                                  // we can presently only compute
+                                  // these identities if both FEs are
+                                  // FE_Q_Hierarchicals or if the other
+                                  // one is an FE_Nothing. in the first
+                                  // case, there should be exactly one
+                                  // single DoF of each FE at a
+                                  // vertex, and they should have
+                                  // identical value
+  if (dynamic_cast<const FE_Q_Hierarchical<dim>*>(&fe_other) != 0)
+    {
+      return
+       std::vector<std::pair<unsigned int, unsigned int> >
+       (1, std::make_pair (0U, 0U));
+    }
+  else if (dynamic_cast<const FE_Nothing<dim>*>(&fe_other) != 0)
+    {
+                                      // the FE_Nothing has no
+                                      // degrees of freedom, so there
+                                      // are no equivalencies to be
+                                      // recorded
+      return std::vector<std::pair<unsigned int, unsigned int> > ();
+    }
+  else
+    {
+      Assert (false, ExcNotImplemented());
+      return std::vector<std::pair<unsigned int, unsigned int> > ();
+    }
+}
+
 //---------------------------------------------------------------------------
 // Auxiliary functions
 //---------------------------------------------------------------------------

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.