]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Small changes and doc update.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 5 May 1998 08:53:03 +0000 (08:53 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 5 May 1998 08:53:03 +0000 (08:53 +0000)
git-svn-id: https://svn.dealii.org/trunk@247 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/fe.h
deal.II/deal.II/include/fe/fe_lib.lagrange.h
deal.II/deal.II/include/fe/fe_update_flags.h
deal.II/deal.II/include/fe/fe_values.h

index ea4ab81732b817a532e10fdb186c1bdf73dd44f2..09a9dba0f24739d6932e0ced20d0b50bae294158 100644 (file)
@@ -572,8 +572,8 @@ class FiniteElement : public FiniteElementBase<dim> {
                                      * elements.
                                      *
                                      * This function is more or less an
-                                     * interface to the #FEValues# class and
-                                     * should not be used by users unless
+                                     * interface to the #FEFaceValues# class
+                                     * and should not be used by users unless
                                      * absolutely needed.
                                      */
     virtual void fill_fe_face_values (const DoFHandler<dim>::cell_iterator &cell,
@@ -592,6 +592,34 @@ class FiniteElement : public FiniteElementBase<dim> {
                                      const bool           compute_normal_vectors,
                                      const Boundary<dim> &boundary) const;
 
+                                    /**
+                                     * This function does almost the same as
+                                     * the above one, with the difference that
+                                     * it considers the restriction of a finite
+                                     * element to a subface (the child of a
+                                     * face) rather than to a face. The number
+                                     * of the subface in the face is given by
+                                     * the #subface_no# parameter. The meaning
+                                     * of the other parameters is the same as
+                                     * for the #fill_fe_face_values# function.
+                                     *
+                                     * Since the usage of ansatz points on
+                                     * subfaces is not useful, it is excluded
+                                     * from the interface to this function.
+                                     *
+                                     * Like for the #fill_fe_face_values#
+                                     * function, there is a default
+                                     * implementation, using the
+                                     * #fill_fe_values# function. There may
+                                     * be better and more efficient solutions
+                                     * for a special finite element, which is
+                                     * why this function is made virtual.
+                                     *
+                                     * This function is more or less an
+                                     * interface to the #FESubfaceValues# class
+                                     * and should not be used by users unless
+                                     * absolutely needed.
+                                     */                                       
     virtual void fill_fe_subface_values (const DoFHandler<dim>::cell_iterator &cell,
                                         const unsigned int           face_no,
                                         const unsigned int           subface_no,
@@ -663,6 +691,23 @@ class FiniteElement : public FiniteElementBase<dim> {
                                     const vector<Point<dim-1> > &unit_points,
                                     vector<double>      &face_jacobi_determinants) const =0;
 
+                                    /**
+                                     * Does the same as the above function,
+                                     * except that it computes the Jacobi
+                                     * determinant of the transformation from
+                                     * the unit face to the subface of #face#
+                                     * with number #subface_no#.
+                                     *
+                                     * The function needs not take special care
+                                     * about boundary approximation, since it
+                                     * must not be called for faces at the
+                                     * boundary.
+                                     */
+    virtual void get_subface_jacobians (const DoFHandler<dim>::face_iterator &face,
+                                       const unsigned int           subface_no,
+                                       const vector<Point<dim-1> > &unit_points,
+                                       vector<double>      &face_jacobi_determinants) const =0;
+
                                     /**
                                      * Compute the normal vectors to the cell
                                      * at the quadrature points. See the
@@ -681,7 +726,23 @@ class FiniteElement : public FiniteElementBase<dim> {
                                     const Boundary<dim>         &boundary,
                                     const vector<Point<dim-1> > &unit_points,
                                     vector<Point<dim> >         &normal_vectors) const =0;
-    
+
+                                    /**
+                                     * Does the same as the above function,
+                                     * except that it refers to the
+                                     * subface #subface_no# of the given face.
+                                     *
+                                     * The function needs not take special care
+                                     * about boundary approximation, since it
+                                     * must not be called for faces at the
+                                     * boundary.
+                                     */
+    virtual void get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+                                    const unsigned int           face_no,
+                                    const unsigned int           subface_no,
+                                    const vector<Point<dim-1> > &unit_points,
+                                    vector<Point<dim> >         &normal_vectors) const =0;
+
                                     /**
                                      * Exception
                                      */
@@ -690,6 +751,10 @@ class FiniteElement : public FiniteElementBase<dim> {
                                      * Exception
                                      */
     DeclException0 (ExcNotImplemented);
+                                    /**
+                                     * Exception
+                                     */
+    DeclException0 (ExcBoundaryFaceUsed);
 };
 
 
index b340857559608e505f879519c018ced731a7ee55..1ffbf129b9539ee990e3b939b045cf99da2ca844 100644 (file)
@@ -78,6 +78,9 @@ class FELinear : public FiniteElement<dim> {
                                     /**
                                      * Refer to the base class for detailed
                                      * information on this function.
+                                     *
+                                     * In two spatial dimensions, this function
+                                     * simply returns the length of the face.
                                      */
     virtual void get_face_jacobians (const DoFHandler<dim>::face_iterator &face,
                                     const Boundary<dim>         &boundary,
@@ -85,6 +88,22 @@ class FELinear : public FiniteElement<dim> {
                                     vector<double>      &face_jacobi_determinants) const;
 
                                     /**
+                                     * Refer to the base class for detailed
+                                     * information on this function.
+                                     *
+                                     * In two spatial dimensions, this function
+                                     * simply returns half the length of the
+                                     * whole face.
+                                     */
+    virtual void get_subface_jacobians (const DoFHandler<dim>::face_iterator &face,
+                                       const unsigned int           subface_no,
+                                       const vector<Point<dim-1> > &unit_points,
+                                       vector<double>      &face_jacobi_determinants) const;
+
+                                    /**
+                                     * Return the normal vectors to the
+                                     * face with number #face_no# of #cell#.
+                                     *
                                      * For linear finite elements, this function
                                      * is particularly simple since all normal
                                      * vectors are equal and can easiliy be
@@ -100,6 +119,27 @@ class FELinear : public FiniteElement<dim> {
                                     const Boundary<dim>         &boundary,
                                     const vector<Point<dim-1> > &unit_points,
                                     vector<Point<dim> >         &normal_vectors) const;    
+
+                                    /**
+                                     * Return the normal vectors to the
+                                     * subface with number #subface_no# of
+                                     * the face with number #face_no# of #cell#.
+                                     *
+                                     * For linear finite elements, this function
+                                     * is particularly simple since all normal
+                                     * vectors are equal and can easiliy be
+                                     * computed from the direction of the face
+                                     * without using the transformation (Jacobi)
+                                     * matrix, at least for two dimensions.
+                                     *
+                                     * Refer to the base class for detailed
+                                     * information on this function.
+                                     */
+    virtual void get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+                                    const unsigned int           face_no,
+                                    const unsigned int           subface_no,
+                                    const vector<Point<dim-1> > &unit_points,
+                                    vector<Point<dim> >         &normal_vectors) const;    
 };
 
 
@@ -167,6 +207,15 @@ class FEQuadratic : public FiniteElement<dim> {
                                     const vector<Point<dim-1> > &unit_points,
                                     vector<double>      &face_jacobi_determinants) const;
 
+                                    /**
+                                     * Refer to the base class for detailed
+                                     * information on this function.
+                                     */
+    virtual void get_subface_jacobians (const DoFHandler<dim>::face_iterator &face,
+                                       const unsigned int           subface_no,
+                                       const vector<Point<dim-1> > &unit_points,
+                                       vector<double>      &face_jacobi_determinants) const;
+
                                     /**
                                      * Refer to the base class for detailed
                                      * information on this function.
@@ -176,6 +225,16 @@ class FEQuadratic : public FiniteElement<dim> {
                                     const Boundary<dim>         &boundary,
                                     const vector<Point<dim-1> > &unit_points,
                                     vector<Point<dim> >         &normal_vectors) const;    
+
+                                    /**
+                                     * Refer to the base class for detailed
+                                     * information on this function.
+                                     */
+    virtual void get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+                                    const unsigned int           subface_no,
+                                    const unsigned int           face_no,
+                                    const vector<Point<dim-1> > &unit_points,
+                                    vector<Point<dim> >         &normal_vectors) const;    
 };
 
 
@@ -243,6 +302,15 @@ class FECubic : public FiniteElement<dim> {
                                     const vector<Point<dim-1> > &unit_points,
                                     vector<double>      &face_jacobi_determinants) const;
 
+                                    /**
+                                     * Refer to the base class for detailed
+                                     * information on this function.
+                                     */
+    virtual void get_subface_jacobians (const DoFHandler<dim>::face_iterator &face,
+                                       const unsigned int           subface_no,
+                                       const vector<Point<dim-1> > &unit_points,
+                                       vector<double>      &face_jacobi_determinants) const;
+
                                     /**
                                      * Refer to the base class for detailed
                                      * information on this function.
@@ -252,6 +320,16 @@ class FECubic : public FiniteElement<dim> {
                                     const Boundary<dim>         &boundary,
                                     const vector<Point<dim-1> > &unit_points,
                                     vector<Point<dim> >         &normal_vectors) const;    
+
+                                    /**
+                                     * Refer to the base class for detailed
+                                     * information on this function.
+                                     */
+    virtual void get_normal_vectors (const DoFHandler<dim>::cell_iterator &cell,
+                                    const unsigned int           subface_no,
+                                    const unsigned int           face_no,
+                                    const vector<Point<dim-1> > &unit_points,
+                                    vector<Point<dim> >         &normal_vectors) const;    
 };
 
 
index 1a464f28783182218cbf4bde637c480226708600..f333d9d5329b145a65093315df7efef79266c2b0 100644 (file)
@@ -46,6 +46,11 @@ enum UpdateFlags {
                                        * Compute the points on the real cell
                                        * on which the ansatz functions are
                                        * located.
+                                       *
+                                       * Giving this flag to the
+                                       * #FESubfaceValues# class will result
+                                       * in an error, since ansatz points are
+                                       * not useful in that case.
                                        */
       update_ansatz_points = 16,
                                       /**
@@ -53,6 +58,11 @@ enum UpdateFlags {
                                        * to the face relative to this cell.
                                        * This flag is only evaluated by
                                        * the #FEFaceValues# class.
+                                       *
+                                       * Giving this flag to the
+                                       * #FEValues# class will result in
+                                       * an error, since normal vectors are
+                                       * not useful in that case.
                                        */
       update_normal_vectors = 32
 };
index 3a527f1e22c74da6d9fabc0537aa33b31faefc0b..b69eb9ba88eb13d8a166ae866bf12f468741ba8b 100644 (file)
@@ -897,6 +897,17 @@ class FEFaceValues : public FEFaceValuesBase<dim> {
   quadrature points on the unit cell, which are stored in the
   #unit_quadrature_points# array. Note that #1<<(dim-1)# is the number of
   subfaces per face.
+
+  One subtle problem is that if a face is at the boundary, then computation
+  of subfaces may be a bit tricky, since we do not know whether the user
+  intends to better approximate the boundary by the subfaces or only wants
+  to have the subfaces be one part of the mother face. However, it is hardly
+  conceivable what someone wants when using this class for faces at the
+  boundary, in the end this class was invented to facilitate integration
+  along faces with cells of different refinement levels on both sides,
+  integration along the boundary of the domain is better done through
+  the #FEFaceValues# class. For this reason, calling #reinit# with a
+  boundary face will result in an error.
   
   @author Wolfgang Bangerth, 1998
   */
@@ -947,6 +958,11 @@ class FESubfaceValues : public FEFaceValuesBase<dim> {
                 const unsigned int                    subface_no,
                 const FiniteElement<dim>             &fe,
                 const Boundary<dim>                  &boundary);
+
+                                    /**
+                                     * Exception
+                                     */
+    DeclException0 (ExcReinitCalledWithBoundaryFace);
 };
 
 

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.