]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Modify the handling of the number of dofs in the finite element classes. This change...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 14 Jan 1999 09:53:52 +0000 (09:53 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 14 Jan 1999 09:53:52 +0000 (09:53 +0000)
git-svn-id: https://svn.dealii.org/trunk@728 0785d39b-7218-0410-832d-ea1e28bc413d

14 files changed:
deal.II/deal.II/include/fe/fe.h
deal.II/deal.II/include/fe/fe_lib.criss_cross.h
deal.II/deal.II/include/fe/fe_lib.dg.h
deal.II/deal.II/include/fe/fe_lib.lagrange.h
deal.II/deal.II/include/fe/fe_linear_mapping.h
deal.II/deal.II/source/fe/fe.cc
deal.II/deal.II/source/fe/fe_lib.criss_cross.cc
deal.II/deal.II/source/fe/fe_lib.cubic.cc
deal.II/deal.II/source/fe/fe_lib.dg.cc
deal.II/deal.II/source/fe/fe_lib.dg.constant.cc
deal.II/deal.II/source/fe/fe_lib.linear.cc
deal.II/deal.II/source/fe/fe_lib.quadratic.cc
deal.II/deal.II/source/fe/fe_lib.quartic.cc
deal.II/deal.II/source/fe/fe_linear_mapping.cc

index 79726a139d6e250051d9af613d50ac8d5ccbcf41..cf482fe16fc9b7d82eff7b83691b811421c83385 100644 (file)
@@ -78,12 +78,14 @@ struct FiniteElementData<1> {
                                      */
     FiniteElementData (const unsigned int dofs_per_vertex,
                       const unsigned int dofs_per_line,
-                      const unsigned int n_transform_functions) :
-                   dofs_per_vertex(dofs_per_vertex),
-                   dofs_per_line(dofs_per_line),
-                   dofs_per_face(dofs_per_vertex),
-                   total_dofs (2*dofs_per_vertex+dofs_per_line),
-                   n_transform_functions(n_transform_functions) {};
+                      const unsigned int n_transform_functions);
+
+                                    /**
+                                     * Another frequently used useful
+                                     * constructor, copying the data from
+                                     * another object.
+                                     */
+    FiniteElementData (const FiniteElementData<1> &fe_data);
 
                                     /**
                                      * Comparison operator. It is not clear to
@@ -165,16 +167,14 @@ struct FiniteElementData<2> {
     FiniteElementData (const unsigned int dofs_per_vertex,
                       const unsigned int dofs_per_line,
                       const unsigned int dofs_per_quad,
-                      const unsigned int n_transform_functions) :
-                   dofs_per_vertex(dofs_per_vertex),
-                   dofs_per_line(dofs_per_line),
-                   dofs_per_quad(dofs_per_quad),
-                   dofs_per_face(2*dofs_per_vertex+
-                                 dofs_per_line),
-                   total_dofs (4*dofs_per_vertex+
-                               4*dofs_per_line+
-                               dofs_per_quad),
-                   n_transform_functions (n_transform_functions) {};
+                      const unsigned int n_transform_functions);
+
+                                    /**
+                                     * Another frequently used useful
+                                     * constructor, copying the data from
+                                     * another object.
+                                     */
+    FiniteElementData (const FiniteElementData<2> &fe_data);
 
                                     /**
                                      * Comparison operator. It is not clear to
@@ -224,14 +224,9 @@ struct FiniteElementBase :
                                      * Construct an object of this type.
                                      * You have to set the
                                      * matrices explicitely after calling
-                                     * this base class' constructor. For
-                                     * #dim==1#, #dofs_per_quad# must be
-                                     * zero.
+                                     * this base class' constructor.
                                      */
-    FiniteElementBase (const unsigned int dofs_per_vertex,
-                      const unsigned int dofs_per_line,
-                      const unsigned int dofs_per_quad,
-                      const unsigned int n_transform_functions);
+    FiniteElementBase (const FiniteElementData<dim> &fe_data);
     
                                     /**
                                      * Return a readonly reference to the
@@ -570,6 +565,28 @@ struct FiniteElementBase :
  *   the assumption does not hold, then the distribution has to happen
  *   with all nodes on the small and the large cells. This is not
  *   implemented in the #DoFHandler# class as of now.
+ * \end{itemize}
+ *
+ * On a more general note, a concrete finite element class, derived from
+ * the #FiniteElement# class needs to fulfill at least the following criteria:
+ * \begin{itemize}
+ * \item Overload and define all pure virtual functions;
+ * \item If a finite element is to be used as part of a composed finite
+ *   element, such as the #FESystem# of the #FEMixed# classes, it has
+ *   to provide a \textit{static} function namend #get_fe_data#, which
+ *   returns the data which also is stored in the #FiniteElementData# object
+ *   at the bottom of the class hierarchy. This function needs to be static,
+ *   since its output is needed at the time of construction of the composed
+ *   finite element, at which time the subobjects denoting the parts of the
+ *   composed element are not yet constructed. You need to make sure that
+ *   each element has such a function; the composed elements have no way
+ *   to make sure that the function is not inherited from a base class.
+ *   You may only use an inherited such function, if the result would be
+ *   the same.
+ *
+ *   It is also a good idea to use the output of this function to construct
+ *   the base class #FiniteElement# of a concrete element.
+ * \end{itemize}
  *
  * @author Wolfgang Bangerth, 1998
  */
@@ -579,14 +596,7 @@ class FiniteElement : public FiniteElementBase<dim> {
                                     /**
                                      * Constructor
                                      */
-    FiniteElement (const unsigned int dofs_per_vertex,
-                  const unsigned int dofs_per_line,
-                  const unsigned int dofs_per_quad,
-                  const unsigned int n_transform_functions) :
-                   FiniteElementBase<dim> (dofs_per_vertex,
-                                           dofs_per_line,
-                                           dofs_per_quad,
-                                           n_transform_functions) {};
+    FiniteElement (const FiniteElementData<dim> &fe_data);
 
                                     /**
                                      * Destructor. Only declared to have a
index 6e7d2c493195be41918fed3ef8d20d1c8baf8666..1ffb9a07dc0994803c8a7b42fd550b84ea7bf251 100644 (file)
@@ -170,6 +170,20 @@ class FECrissCross : public FiniteElement<dim> {
                                      */
     FECrissCross ();
 
+                                    /**
+                                     * Declare a static function which returns
+                                     * the number of degrees of freedom per
+                                     * vertex, line, face, etc. This function
+                                     * is used by the constructors, but is
+                                     * mainly needed for the composed finite
+                                     * elements, which assemble a FE object
+                                     * from several other FEs. See the
+                                     * documentation for the #FiniteElement#
+                                     * class for more information on this
+                                     * subject.
+                                     */
+    static const FiniteElementData<dim> get_fe_data ();
+    
                                     /**
                                      * Return the value of the #i#th shape
                                      * function at point #p# on the unit cell.
index db1ab4c585afd8536bb52c865be464c87792be8a..c1e38e6e27c87f63d6d6dc855fc0ec5e1a78051a 100644 (file)
@@ -24,7 +24,21 @@ class FEDGConstant : public FELinearMapping<dim> {
                                    */
     FEDGConstant ();
 
-                                  /**
+                                    /**
+                                     * Declare a static function which returns
+                                     * the number of degrees of freedom per
+                                     * vertex, line, face, etc. This function
+                                     * is used by the constructors, but is
+                                     * mainly needed for the composed finite
+                                     * elements, which assemble a FE object
+                                     * from several other FEs. See the
+                                     * documentation for the #FiniteElement#
+                                     * class for more information on this
+                                     * subject.
+                                     */
+    static const FiniteElementData<dim> get_fe_data ();
+
+                                    /**
                                    * Return the value of the #i#th shape
                                    * function at point #p# on the unit cell.
                                    */
@@ -130,6 +144,21 @@ class FEDGLinear : public FELinear<dim>{
                                      * Constructor
                                      */
     FEDGLinear();
+
+                                    /**
+                                     * Declare a static function which returns
+                                     * the number of degrees of freedom per
+                                     * vertex, line, face, etc. This function
+                                     * is used by the constructors, but is
+                                     * mainly needed for the composed finite
+                                     * elements, which assemble a FE object
+                                     * from several other FEs. See the
+                                     * documentation for the #FiniteElement#
+                                     * class for more information on this
+                                     * subject.
+                                     */
+    static const FiniteElementData<dim> get_fe_data ();
+
                                     /**
                                      * This function returns an error since the
                                      * correct use of the restriction
@@ -169,6 +198,21 @@ class FEDGQuadraticSub : public FEQuadraticSub<dim>{
                                      * Constructor
                                      */
     FEDGQuadraticSub();
+
+                                    /**
+                                     * Declare a static function which returns
+                                     * the number of degrees of freedom per
+                                     * vertex, line, face, etc. This function
+                                     * is used by the constructors, but is
+                                     * mainly needed for the composed finite
+                                     * elements, which assemble a FE object
+                                     * from several other FEs. See the
+                                     * documentation for the #FiniteElement#
+                                     * class for more information on this
+                                     * subject.
+                                     */
+    static const FiniteElementData<dim> get_fe_data ();
+
                                     /**
                                      * This function returns an error since the
                                      * correct use of the restriction
@@ -209,6 +253,21 @@ class FEDGCubicSub : public FECubicSub<dim>{
                                      * Constructor
                                      */
     FEDGCubicSub();
+
+                                    /**
+                                     * Declare a static function which returns
+                                     * the number of degrees of freedom per
+                                     * vertex, line, face, etc. This function
+                                     * is used by the constructors, but is
+                                     * mainly needed for the composed finite
+                                     * elements, which assemble a FE object
+                                     * from several other FEs. See the
+                                     * documentation for the #FiniteElement#
+                                     * class for more information on this
+                                     * subject.
+                                     */
+    static const FiniteElementData<dim> get_fe_data ();
+
                                     /**
                                      * This function returns an error since the
                                      * correct use of the restriction
@@ -248,6 +307,21 @@ class FEDGQuarticSub : public FEQuarticSub<dim>{
                                      * Constructor
                                      */
     FEDGQuarticSub();
+
+                                    /**
+                                     * Declare a static function which returns
+                                     * the number of degrees of freedom per
+                                     * vertex, line, face, etc. This function
+                                     * is used by the constructors, but is
+                                     * mainly needed for the composed finite
+                                     * elements, which assemble a FE object
+                                     * from several other FEs. See the
+                                     * documentation for the #FiniteElement#
+                                     * class for more information on this
+                                     * subject.
+                                     */
+    static const FiniteElementData<dim> get_fe_data ();
+
                                     /**
                                      * This function returns an error since the
                                      * correct use of the restriction
index fc3a28d62414f3068bd9ad40e30542f05e91d571..60b5abac828536fe081367fdb08e721f63694243 100644 (file)
@@ -45,6 +45,20 @@ class FELinear : public FELinearMapping<dim> {
                                      */
     FELinear (const int);
   public:
+
+                                    /**
+                                     * Declare a static function which returns
+                                     * the number of degrees of freedom per
+                                     * vertex, line, face, etc. This function
+                                     * is used by the constructors, but is
+                                     * mainly needed for the composed finite
+                                     * elements, which assemble a FE object
+                                     * from several other FEs. See the
+                                     * documentation for the #FiniteElement#
+                                     * class for more information on this
+                                     * subject.
+                                     */
+    static const FiniteElementData<dim> get_fe_data ();
     
                                     /**
                                      * Return the value of the #i#th shape
@@ -144,7 +158,22 @@ class FEQuadraticSub : public FELinearMapping<dim> {
                                      * #FEDGQuadraticSub#.
                                      */
     FEQuadraticSub (const int);
+    
   public:
+                                    /**
+                                     * Declare a static function which returns
+                                     * the number of degrees of freedom per
+                                     * vertex, line, face, etc. This function
+                                     * is used by the constructors, but is
+                                     * mainly needed for the composed finite
+                                     * elements, which assemble a FE object
+                                     * from several other FEs. See the
+                                     * documentation for the #FiniteElement#
+                                     * class for more information on this
+                                     * subject.
+                                     */
+    static const FiniteElementData<dim> get_fe_data ();
+
                                     /**
                                      * Return the value of the #i#th shape
                                      * function at point #p# on the unit cell.
@@ -246,6 +275,7 @@ class FECubicSub : public FELinearMapping<dim> {
                                      * Constructor
                                      */
     FECubicSub ();
+
   protected:
                                     /**
                                      * Constructor that is called by the
@@ -258,8 +288,22 @@ class FECubicSub : public FELinearMapping<dim> {
                                      * #FEDGCubicSub#.
                                      */
     FECubicSub (const int);
+
   public:
 
+                                    /**
+                                     * Declare a static function which returns
+                                     * the number of degrees of freedom per
+                                     * vertex, line, face, etc. This function
+                                     * is used by the constructors, but is
+                                     * mainly needed for the composed finite
+                                     * elements, which assemble a FE object
+                                     * from several other FEs. See the
+                                     * documentation for the #FiniteElement#
+                                     * class for more information on this
+                                     * subject.
+                                     */
+    static const FiniteElementData<dim> get_fe_data ();
 
                                     /**
                                      * Return the value of the #i#th shape
@@ -363,6 +407,7 @@ class FEQuarticSub : public FELinearMapping<dim> {
                                      * Constructor
                                      */
     FEQuarticSub ();
+
   protected:
                                     /**
                                      * Constructor that is called by the
@@ -375,7 +420,23 @@ class FEQuarticSub : public FELinearMapping<dim> {
                                      * #FEDGQuarticSub#.
                                      */
     FEQuarticSub (const int);
+
   public:
+
+                                    /**
+                                     * Declare a static function which returns
+                                     * the number of degrees of freedom per
+                                     * vertex, line, face, etc. This function
+                                     * is used by the constructors, but is
+                                     * mainly needed for the composed finite
+                                     * elements, which assemble a FE object
+                                     * from several other FEs. See the
+                                     * documentation for the #FiniteElement#
+                                     * class for more information on this
+                                     * subject.
+                                     */
+    static const FiniteElementData<dim> get_fe_data ();
+
                                     /**
                                      * Return the value of the #i#th shape
                                      * function at point #p# on the unit cell.
index 0b0af49d049eceeb2b66e317af20c18e1214ed98..68250cd016ac0a5b81401fa245ee65cb45f780a0 100644 (file)
@@ -22,15 +22,13 @@ class FELinearMapping : public FiniteElement<dim> {
   public:
                                     /**
                                      * Constructor. Simply passes through
-                                     * its arguments to the base class.
+                                     * its arguments to the base class. For
+                                     * one space dimension, #dofs_per_quad#
+                                     * shall be zero.
                                      */
     FELinearMapping (const unsigned int dofs_per_vertex,
                     const unsigned int dofs_per_line,
-                    const unsigned int dofs_per_quad=0) :
-                   FiniteElement<dim> (dofs_per_vertex,
-                                       dofs_per_line,
-                                       dofs_per_quad,
-                                       GeometryInfo<dim>::vertices_per_cell) {};
+                    const unsigned int dofs_per_quad=0);
 
                                     /**
                                      * Return the value of the #i#th shape
@@ -146,6 +144,11 @@ class FELinearMapping : public FiniteElement<dim> {
                                 const dFMatrix         &shape_values_transform,
                                 const vector<vector<Tensor<1,dim> > > &shape_grad_transform,
                                 const Boundary<dim> &boundary) const;
+
+                                    /**
+                                     * Exception
+                                     */
+    DeclException0 (ExcInvalidData);
 };
 
 
index 7fe883f092edd593e8f4736bb554ffdd5e417b91..91a527b74ddec40c5671a5f3c1c29f19295f6f5b 100644 (file)
@@ -27,6 +27,28 @@ FiniteElementData<1>::FiniteElementData () :
 
 
 
+FiniteElementData<1>::FiniteElementData (const unsigned int dofs_per_vertex,
+                                        const unsigned int dofs_per_line,
+                                        const unsigned int n_transform_functions) :
+               dofs_per_vertex(dofs_per_vertex),
+               dofs_per_line(dofs_per_line),
+               dofs_per_face(dofs_per_vertex),
+               total_dofs (2*dofs_per_vertex+dofs_per_line),
+               n_transform_functions(n_transform_functions)
+{};
+
+
+
+FiniteElementData<1>::FiniteElementData (const FiniteElementData<1> &fe_data) :
+               dofs_per_vertex(fe_data.dofs_per_vertex),
+               dofs_per_line(fe_data.dofs_per_line),
+               dofs_per_face(fe_data.dofs_per_face),
+               total_dofs (fe_data.total_dofs),
+               n_transform_functions(fe_data.n_transform_functions)
+{};
+
+
+
 bool FiniteElementData<1>::operator== (const FiniteElementData<1> &f) const {
   return ((dofs_per_vertex == f.dofs_per_vertex) &&
          (dofs_per_line == f.dofs_per_line) &&
@@ -52,6 +74,34 @@ FiniteElementData<2>::FiniteElementData () :
 
 
 
+FiniteElementData<2>::FiniteElementData (const unsigned int dofs_per_vertex,
+                                        const unsigned int dofs_per_line,
+                                        const unsigned int dofs_per_quad,
+                                        const unsigned int n_transform_functions) :
+               dofs_per_vertex(dofs_per_vertex),
+               dofs_per_line(dofs_per_line),
+               dofs_per_quad(dofs_per_quad),
+               dofs_per_face(2*dofs_per_vertex+
+                             dofs_per_line),
+               total_dofs (4*dofs_per_vertex+
+                           4*dofs_per_line+
+                           dofs_per_quad),
+               n_transform_functions (n_transform_functions)
+{};
+
+
+
+FiniteElementData<2>::FiniteElementData (const FiniteElementData<2> &fe_data) :
+               dofs_per_vertex(fe_data.dofs_per_vertex),
+               dofs_per_line(fe_data.dofs_per_line),
+               dofs_per_quad(fe_data.dofs_per_quad),
+               dofs_per_face(fe_data.dofs_per_face),
+               total_dofs (fe_data.total_dofs),
+               n_transform_functions (fe_data.n_transform_functions)
+{};
+
+
+
 bool FiniteElementData<2>::operator== (const FiniteElementData<2> &f) const {
   return ((dofs_per_vertex == f.dofs_per_vertex) &&
          (dofs_per_line == f.dofs_per_line) &&
@@ -69,16 +119,9 @@ bool FiniteElementData<2>::operator== (const FiniteElementData<2> &f) const {
 #if deal_II_dimension == 1
 
 template <>
-FiniteElementBase<1>::FiniteElementBase (const unsigned int dofs_per_vertex,
-                                        const unsigned int dofs_per_line,
-                                        const unsigned int dofs_per_quad,
-                                        const unsigned int n_transform_funcs) :
-               FiniteElementData<1> (dofs_per_vertex,
-                                     dofs_per_line,
-                                     n_transform_funcs)
+FiniteElementBase<1>::FiniteElementBase (const FiniteElementData<1> &fe_data) :
+               FiniteElementData<1> (fe_data)
 {
-  Assert (dofs_per_quad==0, ExcInternalError());
-
   const unsigned int dim=1;
   for (unsigned int i=0; i<GeometryInfo<dim>::children_per_cell; ++i) 
     {
@@ -95,14 +138,8 @@ FiniteElementBase<1>::FiniteElementBase (const unsigned int dofs_per_vertex,
 #if deal_II_dimension == 2
 
 template <>
-FiniteElementBase<2>::FiniteElementBase (const unsigned int dofs_per_vertex,
-                                        const unsigned int dofs_per_line,
-                                        const unsigned int dofs_per_quad,
-                                        const unsigned int n_transform_funcs) :
-               FiniteElementData<2> (dofs_per_vertex,
-                                     dofs_per_line,
-                                     dofs_per_quad,
-                                     n_transform_funcs)
+FiniteElementBase<2>::FiniteElementBase (const FiniteElementData<2> &fe_data) :
+               FiniteElementData<2> (fe_data)
 {
   const unsigned int dim=2;
   for (unsigned int i=0; i<GeometryInfo<dim>::children_per_cell; ++i) 
@@ -162,6 +199,13 @@ bool FiniteElementBase<dim>::operator == (const FiniteElementBase<dim> &f) const
 
 /*------------------------------- FiniteElement ----------------------*/
 
+
+template <int dim>
+FiniteElement<dim>::FiniteElement (const FiniteElementData<dim> &fe_data) :
+               FiniteElementBase<dim> (fe_data) {};
+
+
+
 #if deal_II_dimension == 1
 
 // declare this function to be explicitely specialized before first use
index de29c860edc3dd913d9cf9b7213a07f38aba5d13..adb3e7e29b899260b82e9c9caf49f0a5c2af8ad9 100644 (file)
 
 #if deal_II_dimension == 1
 
+// declare explicit instantiation
+template <>
+const FiniteElementData<1> FECrissCross<1>::get_fe_data ();
+
+
+
 template <>
 FECrissCross<1>::FECrissCross () :
-               FiniteElement<1> (0,0,0,0)
+               FiniteElement<1> (get_fe_data ())
 {
   Assert (false, ExcNotUseful());
 };
 
 
 
+template <>
+const FiniteElementData<1>
+FECrissCross<1>::get_fe_data () {
+                                  // return more or less invalid data
+  return FiniteElementData<1> (0,0,0);
+};
+
+
+
 template <>
 double FECrissCross<1>::shape_value (const unsigned int, const Point<1> &) const {
   Assert (false, ExcNotUseful());
@@ -456,9 +471,14 @@ void FECrissCross<1>::fill_fe_values (const DoFHandler<1>::cell_iterator &,
 
 #if deal_II_dimension == 2
 
+// declare explicit instantiation
+template <>
+const FiniteElementData<2> FECrissCross<2>::get_fe_data ();
+
+
 template <>
 FECrissCross<2>::FECrissCross () :
-               FiniteElement<2> (1,0,1,5)
+               FiniteElement<2> (get_fe_data ())
 {
   interface_constraints(0,0) = 1./2.;
   interface_constraints(0,1) = 1./2.;
@@ -508,6 +528,15 @@ FECrissCross<2>::FECrissCross () :
 
 
 
+template <>
+const FiniteElementData<2>
+FECrissCross<2>::get_fe_data () {
+  return FiniteElementData<2> (1,0,1,5);
+};
+
+
+
+
 template <>
 inline
 double FECrissCross<2>::shape_value (const unsigned int i,
index ad15a4653d1c82e6f453da6d09039bacba0d8de0..0384f217f633f852622b3820bbc008cb93996da0 100644 (file)
@@ -36,6 +36,14 @@ FECubicSub<1>::FECubicSub (const int) :
 
 
 
+template <>
+const FiniteElementData<1>
+FECubicSub<1>::get_fe_data () {
+  return FiniteElementData<1> (1, 2, GeometryInfo<1>::vertices_per_cell);
+};
+
+
+
 template <>
 void FECubicSub<1>::initialize_matrices () {
   
@@ -274,6 +282,14 @@ FECubicSub<2>::FECubicSub (const int) :
 
 
 
+template <>
+const FiniteElementData<2>
+FECubicSub<2>::get_fe_data () {
+  return FiniteElementData<2> (1, 2, 4, GeometryInfo<2>::vertices_per_cell);
+};
+
+
+
 template <>
 void FECubicSub<2>::initialize_matrices () {
   prolongation[0](0,0) = 1.0;
index bf0d9454d15f0a87a776819c591288b70dd21284..0b8eb817c0023dfc6b4132bf4e4a7401ca77196a 100644 (file)
@@ -26,6 +26,104 @@ FEDGQuarticSub<dim>::FEDGQuarticSub():
 
 
 
+#if deal_II_dimension == 1
+
+template <>
+const FiniteElementData<1>
+FEDGLinear<1>::get_fe_data () {
+                                  // no dofs at the vertices, all in the
+                                  // interior of the line
+  return FiniteElementData<1> (0,
+                              FELinear<1>::get_fe_data().total_dofs,
+                              FELinear<1>::get_fe_data().n_transform_functions);
+};
+
+
+template <>
+const FiniteElementData<1>
+FEDGQuadraticSub<1>::get_fe_data () {
+                                  // no dofs at the vertices, all in the
+                                  // interior of the line
+  return FiniteElementData<1> (0,
+                              FEQuadraticSub<1>::get_fe_data().total_dofs,
+                              FEQuadraticSub<1>::get_fe_data().n_transform_functions);
+};
+
+
+template <>
+const FiniteElementData<1>
+FEDGCubicSub<1>::get_fe_data () {
+                                  // no dofs at the vertices, all in the
+                                  // interior of the line
+  return FiniteElementData<1> (0,
+                              FECubicSub<1>::get_fe_data().total_dofs,
+                              FECubicSub<1>::get_fe_data().n_transform_functions);
+};
+
+
+template <>
+const FiniteElementData<1>
+FEDGQuarticSub<1>::get_fe_data () {
+                                  // no dofs at the vertices, all in the
+                                  // interior of the line
+  return FiniteElementData<1> (0,
+                              FEQuarticSub<1>::get_fe_data().total_dofs,
+                              FEQuarticSub<1>::get_fe_data().n_transform_functions);
+};
+
+#endif
+
+
+
+#if deal_II_dimension == 2
+
+template <>
+const FiniteElementData<2>
+FEDGLinear<2>::get_fe_data () {
+                                  // no dofs at the vertices or lines, all in the
+                                  // interior of the line
+  return FiniteElementData<2> (0, 0,
+                              FELinear<2>::get_fe_data().total_dofs,
+                              FELinear<2>::get_fe_data().n_transform_functions);
+};
+
+
+template <>
+const FiniteElementData<2>
+FEDGQuadraticSub<2>::get_fe_data () {
+                                  // no dofs at the vertices or lines, all in the
+                                  // interior of the line
+  return FiniteElementData<2> (0, 0,
+                              FEQuadraticSub<2>::get_fe_data().total_dofs,
+                              FEQuadraticSub<2>::get_fe_data().n_transform_functions);
+};
+
+
+template <>
+const FiniteElementData<2>
+FEDGCubicSub<2>::get_fe_data () {
+                                  // no dofs at the vertices or lines, all in the
+                                  // interior of the line
+  return FiniteElementData<2> (0, 0,
+                              FECubicSub<2>::get_fe_data().total_dofs,
+                              FECubicSub<2>::get_fe_data().n_transform_functions);
+};
+
+
+template <>
+const FiniteElementData<2>
+FEDGQuarticSub<2>::get_fe_data () {
+                                  // no dofs at the vertices or lines, all in the
+                                  // interior of the line
+  return FiniteElementData<2> (0, 0,
+                              FEQuarticSub<2>::get_fe_data().total_dofs,
+                              FEQuarticSub<2>::get_fe_data().n_transform_functions);
+};
+
+#endif
+
+
+
 template <int dim>
 const dFMatrix & 
 FEDGLinear<dim>::restrict (const unsigned int child) const {
index e42c6b7a87283ebe9ecfd74cbcc0e375b0332d15..aab9dcf5a3f2b5d8fc68699bb6c8c599568a701e 100644 (file)
@@ -42,6 +42,14 @@ FEDGConstant<1>::FEDGConstant () :
 };
 
 
+template <>
+const FiniteElementData<1>
+FEDGConstant<1>::get_fe_data () {
+  return FiniteElementData<1> (0, 1, GeometryInfo<1>::vertices_per_cell);
+};
+
+
+
 template <>
 void FEDGConstant<1>::get_face_support_points (const typename DoFHandler<1>::face_iterator &,
                                          const Boundary<1>  &,
@@ -79,9 +87,19 @@ FEDGConstant<2>::FEDGConstant () :
   prolongation[3](0,0) = 1.0;
 };
 
-#endif
 
 
+template <>
+const FiniteElementData<2>
+FEDGConstant<2>::get_fe_data () {
+  return FiniteElementData<2> (0, 0, 1, GeometryInfo<2>::vertices_per_cell);
+};
+
+
+
+
+#endif
+
 
 
 
index c0ad349751c1ef444ab544ae2dcde350db978aa6..374efcce55bc5e9e20165f1094d033e591db84d7 100644 (file)
@@ -37,6 +37,14 @@ FELinear<1>::FELinear (const int) :
 
 
 
+template <>
+const FiniteElementData<1>
+FELinear<1>::get_fe_data () {
+  return FiniteElementData<1> (1, 0, GeometryInfo<1>::vertices_per_cell);
+};
+
+
+
 
 template <>
 void FELinear<1>::initialize_matrices () {
@@ -187,6 +195,14 @@ FELinear<2>::FELinear (const int) :
 
 
 
+template <>
+const FiniteElementData<2>
+FELinear<2>::get_fe_data () {
+  return FiniteElementData<2> (1, 0, 0, GeometryInfo<2>::vertices_per_cell);
+};
+
+
+
 template <>
 void FELinear<2>::initialize_matrices () {
   restriction[0](0,0) = 1.0;
index 89a40fc3435283c9aed8f5e7ea569295262a0677..3a982635d89f7ddf90900e4bb9cfb65b65757e98 100644 (file)
@@ -33,6 +33,14 @@ FEQuadraticSub<1>::FEQuadraticSub (const int) :
 
 
 
+template <>
+const FiniteElementData<1>
+FEQuadraticSub<1>::get_fe_data () {
+  return FiniteElementData<1> (1, 1, GeometryInfo<1>::vertices_per_cell);
+};
+
+
+
 template <>
 void FEQuadraticSub<1>::initialize_matrices () {
 /*
@@ -259,6 +267,14 @@ FEQuadraticSub<2>::FEQuadraticSub (const int) :
 
 
 
+template <>
+const FiniteElementData<2>
+FEQuadraticSub<2>::get_fe_data () {
+  return FiniteElementData<2> (1, 1, 1, GeometryInfo<2>::vertices_per_cell);
+};
+
+
+
 template <>
 void FEQuadraticSub<2>::initialize_matrices () {
 /*
index 1656f834f18ddef48a0f6c857c28b4b1e5d94a48..d084d0f618a68254970be655ab3a411d84e2dfcc 100644 (file)
@@ -31,6 +31,15 @@ FEQuarticSub<1>::FEQuarticSub (const int) :
 };
 
 
+
+template <>
+const FiniteElementData<1>
+FEQuarticSub<1>::get_fe_data () {
+  return FiniteElementData<1> (1, 3, GeometryInfo<1>::vertices_per_cell);
+};
+
+
+
 template <>
 void FEQuarticSub<1>::initialize_matrices () {
   prolongation[0](0,0) = 1.0;
@@ -259,6 +268,14 @@ FEQuarticSub<2>::FEQuarticSub (const int) :
 
 
 
+template <>
+const FiniteElementData<2>
+FEQuarticSub<2>::get_fe_data () {
+  return FiniteElementData<2> (1, 3, 9, GeometryInfo<2>::vertices_per_cell);
+};
+
+
+
 template <>
 void FEQuarticSub<2>::initialize_matrices () {
   prolongation[0](0,0) = 1.0;
index eb0dd4c6d5a6ebe07d53d22ac77d3e618e5dbb78..19eb9d4314f51408fb6c9965b421e79207765438 100644 (file)
 
 /*---------------------------- FELinearMapping ----------------------------------*/
 
+
+
 #if deal_II_dimension == 1
 
+template <>
+FELinearMapping<1>::FELinearMapping (const unsigned int dofs_per_vertex,
+                                    const unsigned int dofs_per_line,
+                                    const unsigned int dofs_per_quad) :
+               FiniteElement<1> (FiniteElementData<1> (dofs_per_vertex,
+                                                       dofs_per_line,
+                                                       GeometryInfo<1>::vertices_per_cell))
+{
+  Assert (dofs_per_quad==0, ExcInvalidData());
+};
+
+
+
 template <>
 inline
 double
@@ -121,6 +136,18 @@ void FELinearMapping<1>::fill_fe_values (const DoFHandler<1>::cell_iterator &cel
 
 #if deal_II_dimension == 2
 
+template <>
+FELinearMapping<2>::FELinearMapping (const unsigned int dofs_per_vertex,
+                                    const unsigned int dofs_per_line,
+                                    const unsigned int dofs_per_quad) :
+               FiniteElement<2> (FiniteElementData<2> (dofs_per_vertex,
+                                                       dofs_per_line,
+                                                       dofs_per_quad,
+                                                       GeometryInfo<2>::vertices_per_cell))
+{};
+
+
+
 template <>
 inline
 double

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.