]> https://gitweb.dealii.org/ - dealii.git/commitdiff
make update_once and update_each private, since they are only used by FEValues friends
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Tue, 13 Nov 2007 16:37:35 +0000 (16:37 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Tue, 13 Nov 2007 16:37:35 +0000 (16:37 +0000)
git-svn-id: https://svn.dealii.org/trunk@15490 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/fe/mapping.h
deal.II/deal.II/include/fe/mapping_cartesian.h
deal.II/deal.II/include/fe/mapping_q.h
deal.II/deal.II/include/fe/mapping_q1.h

index 8f5016af4dafbecc998281a8d81300369532ebbe..a15317d5dce45c3a6ade35d820917ad62e91b118 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+//    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -26,6 +26,7 @@ DEAL_II_NAMESPACE_OPEN
 
 template <int dim> class Quadrature;
 template <int dim> class FEValuesData;
+template <int dim> class FEValuesBase;
 template <int dim> class FEValues;
 template <int dim> class FEFaceValues;
 template <int dim> class FESubfaceValues;
@@ -330,31 +331,6 @@ class Mapping : public Subscriptor
                              const unsigned int                 offset,
                             const VectorSlice<std::vector<Tensor<2,dim> > > output,
                             const typename Mapping<dim>::InternalDataBase &internal) const = 0;
-    
-                                    /**
-                                     * Indicate fields to be updated
-                                     * in the constructor of
-                                     * FEValues. Especially,
-                                     * fields not asked for by
-                                     * FEValues, but computed
-                                     * for efficiency reasons will be
-                                     * notified here.
-                                     *
-                                     * Refer to the same function in
-                                     * FiniteElement for
-                                     * further information.
-                                     *
-                                     * Example: refer to the same
-                                     * function in MappingQ1.
-                                     */
-    virtual UpdateFlags update_once (const UpdateFlags) const = 0;
-    
-                                    /**
-                                     * The same as @p update_once,
-                                     * but for the flags to be updated for
-                                     * each grid cell.
-                                     */
-    virtual UpdateFlags update_each (const UpdateFlags) const = 0;
 
                                      /**
                                       * Return a pointer to a copy of the
@@ -379,6 +355,28 @@ class Mapping : public Subscriptor
 
   private:
     
+                                    /**
+                                     * Indicate fields to be updated
+                                     * in the constructor of
+                                     * FEValues. Especially,
+                                     * fields not asked for by
+                                     * FEValues, but computed
+                                     * for efficiency reasons will be
+                                     * notified here.
+                                     *
+                                     * See @ref UpdateFlagsEssay.
+                                     */
+    virtual UpdateFlags update_once (const UpdateFlags) const = 0;
+    
+                                    /**
+                                     * The same as update_once(),
+                                     * but for the flags to be updated for
+                                     * each grid cell.
+                                     *
+                                     * See @ref UpdateFlagsEssay.
+                                     */
+    virtual UpdateFlags update_each (const UpdateFlags) const = 0;
+
                                     /**
                                      * Prepare internal data
                                      * structures and fill in values
@@ -498,6 +496,7 @@ class Mapping : public Subscriptor
                                      * and <tt>fill_fe_...values</tt>
                                      * functions.
                                      */
+  friend class FEValuesBase<dim>;
   friend class FEValues<dim>;
   friend class FEFaceValues<dim>;
   friend class FESubfaceValues<dim>;
index 5a4282c1b45bdd00495790ff9e270795aca823ba..67657e8a18a07a487be0018c102830a9b497756e 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+//    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -83,40 +83,24 @@ class MappingCartesian : public Mapping<dim>
                            std::vector<Point<dim> >        &normal_vectors,
                            std::vector<double>             &cell_JxW_values) const ;
 
-                                    /**
-                                     * Implementation of the
-                                     * interface in Mapping.
-                                     */
     virtual void
     transform_covariant (const VectorSlice<const std::vector<Tensor<1,dim> > > input,
                          const unsigned int                 offset,
                         VectorSlice<std::vector<Tensor<1,dim> > > output,
                         const typename Mapping<dim>::InternalDataBase &internal) const;
-
-                                    /**
-                                     * Implementation of the
-                                     * interface in Mapping.
-                                     */
+    
     virtual void
     transform_covariant (const VectorSlice<const std::vector<Tensor<2,dim> > > input,
                          const unsigned int                 offset,
                         VectorSlice<std::vector<Tensor<2,dim> > > output,
                         const typename Mapping<dim>::InternalDataBase &internal) const;
     
-                                    /**
-                                     * Implementation of the
-                                     * interface in Mapping.
-                                     */
     virtual void
     transform_contravariant (const VectorSlice<const std::vector<Tensor<1,dim> > > input,
                              const unsigned int                 offset,
                             VectorSlice<std::vector<Tensor<1,dim> > > output,
                             const typename Mapping<dim>::InternalDataBase &internal) const;
     
-                                    /**
-                                     * Implementation of the
-                                     * interface in Mapping.
-                                     */
     virtual void
     transform_contravariant (const VectorSlice<const std::vector<Tensor<2,dim> > > input,
                              const unsigned int                 offset,
@@ -143,9 +127,6 @@ class MappingCartesian : public Mapping<dim>
       const typename Triangulation<dim>::cell_iterator &cell,
       const Point<dim>                                 &p) const;
     
-    virtual UpdateFlags update_once (const UpdateFlags) const;    
-    virtual UpdateFlags update_each (const UpdateFlags) const;
-    
 
                                      /**
                                       * Return a pointer to a copy of the
@@ -213,6 +194,9 @@ class MappingCartesian : public Mapping<dim>
                       std::vector<Point<dim> >& normal_vectors) const;
 
   private:
+    virtual UpdateFlags update_once (const UpdateFlags) const;    
+    virtual UpdateFlags update_each (const UpdateFlags) const;
+    
                                     /**
                                      * Value to indicate that a given
                                      * face or subface number is
index fe0eef6225fdc71a28bf1cfbb1aba619cf797c4b..021e94ccca40f36370fd9a7975f35728cff95dad 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
+//    Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -298,28 +298,16 @@ class MappingQ : public MappingQ1<dim>
     
   private:
     
-                                    /**
-                                     * Implementation of the interface in
-                                     * Mapping.
-                                     */
     virtual
     typename Mapping<dim>::InternalDataBase *
     get_data (const UpdateFlags,
              const Quadrature<dim>& quadrature) const;
 
-                                    /**
-                                     * Implementation of the interface in
-                                     * Mapping.
-                                     */
     virtual
     typename Mapping<dim>::InternalDataBase *
     get_face_data (const UpdateFlags flags,
                   const Quadrature<dim-1>& quadrature) const;
 
-                                    /**
-                                     * Implementation of the interface in
-                                     * Mapping.
-                                     */
     virtual
     typename Mapping<dim>::InternalDataBase *
     get_subface_data (const UpdateFlags flags,
index 1c8dbf7cfd2e0b10279920358212ed246db34ce4..503b05db91bc2006468af8dd742f22adb0ba941b 100644 (file)
@@ -53,12 +53,6 @@ class MappingQ1 : public Mapping<dim>
                                      */
     MappingQ1 ();
     
-                                    /**
-                                     * Transforms the point p on the unit
-                                     * cell to the point p_real on the real
-                                     * cell <code>cell</code> and returns
-                                     * p_real.
-                                     */
     virtual Point<dim>
     transform_unit_to_real_cell (
       const typename Triangulation<dim>::cell_iterator &cell,
@@ -79,122 +73,30 @@ class MappingQ1 : public Mapping<dim>
       const typename Triangulation<dim>::cell_iterator &cell,
       const Point<dim>                                 &p) const;
     
-                                    /**
-                                     * Implementation of the interface in
-                                     * Mapping.
-                                     */
     virtual void
     transform_covariant (const VectorSlice<const std::vector<Tensor<1,dim> > > input,
                          const unsigned int                 offset,
                         VectorSlice<std::vector<Tensor<1,dim> > > output,
                         const typename Mapping<dim>::InternalDataBase &internal) const;
     
-                                    /**
-                                     * Implementation of the interface in
-                                     * Mapping.
-                                     */
     virtual void
     transform_covariant (const VectorSlice<const std::vector<Tensor<2,dim> > > input,
                          const unsigned int                 offset,
                         VectorSlice<std::vector<Tensor<2,dim> > > output,
                         const typename Mapping<dim>::InternalDataBase &internal) const;
     
-                                    /**
-                                     * Implementation of the interface in
-                                     * Mapping.
-                                     */
     virtual void
     transform_contravariant (const VectorSlice<const std::vector<Tensor<1,dim> > > input,
                              const unsigned int                 offset,
                             VectorSlice<std::vector<Tensor<1,dim> > > output,
                             const typename Mapping<dim>::InternalDataBase &internal) const;
     
-                                    /**
-                                     * Implementation of the interface in
-                                     * Mapping.
-                                     */
     virtual void
     transform_contravariant (const VectorSlice<const std::vector<Tensor<2,dim> > > input,
                              const unsigned int                 offset,
                             VectorSlice<std::vector<Tensor<2,dim> > > output,
                             const typename Mapping<dim>::InternalDataBase &internal) const;
     
-                                    /**
-                                     * Implementation of the interface in
-                                     * Mapping.
-                                     *
-                                     * Description of effects:
-                                     * <ul>
-                                     * <li> if @p update_quadrature_points
-                                     * is required, the output will
-                                     * contain
-                                     * @p update_transformation_values. This
-                                     * computes the values of the
-                                     * transformation basis
-                                     * polynomials at the unit cell
-                                     * quadrature points.
-                                     * <li> if any of
-                                     * @p update_covariant_transformation,
-                                     * @p update_contravariant_transformation,
-                                     * @p update_JxW_values,
-                                     * @p update_boundary_forms,
-                                     * @p update_normal_vectors is
-                                     * required, the output will
-                                     * contain
-                                     * @p update_transformation_gradients
-                                     * to compute derivatives of the
-                                     * transformation basis
-                                     * polynomials.
-                                     * </ul>
-                                     */
-    virtual UpdateFlags update_once (const UpdateFlags flags) const;
-    
-                                    /**
-                                     * Implementation of the interface in
-                                     * Mapping.
-                                     *
-                                     * Description of effects if
-                                     * @p flags contains:
-                                     * <ul>
-                                     * <li> <code>update_quadrature_points</code> is
-                                     * copied to the output to
-                                     * compute the quadrature points
-                                     * on the real cell.
-                                     * <li> <code>update_JxW_values</code> is
-                                     * copied and requires
-                                     * @p update_boundary_forms on
-                                     * faces. The latter, because the
-                                     * surface element is just the
-                                     * norm of the boundary form.
-                                     * <li> <code>update_normal_vectors</code>
-                                     * is copied and requires
-                                     * @p update_boundary_forms. The
-                                     * latter, because the normal
-                                     * vector is the normalized
-                                     * boundary form.
-                                     * <li>
-                                     * <code>update_covariant_transformation</code>
-                                     * is copied and requires
-                                     * @p update_contravariant_transformation,
-                                     * since it is computed as the
-                                     * inverse of the latter.
-                                     * <li> <code>update_JxW_values</code> is
-                                     * copied and requires
-                                     * <code>update_contravariant_transformation</code>,
-                                     * since it is computed as one
-                                     * over determinant of the
-                                     * latter.
-                                     * <li> <code>update_boundary_forms</code>
-                                     * is copied and requires
-                                     * <code>update_contravariant_transformation</code>,
-                                     * since the boundary form is
-                                     * computed as the contravariant
-                                     * image of the normal vector to
-                                     * the unit cell.
-                                     * </ul>
-                                     */
-    virtual UpdateFlags update_each (const UpdateFlags flags) const;
-
                                      /**
                                       * Return a pointer to a copy of the
                                       * present object. The caller of this
@@ -567,25 +469,89 @@ class MappingQ1 : public Mapping<dim>
                                     /**
                                      * Implementation of the interface in
                                      * Mapping.
+                                     *
+                                     * Description of effects:
+                                     * <ul>
+                                     * <li> if @p update_quadrature_points
+                                     * is required, the output will
+                                     * contain
+                                     * @p update_transformation_values. This
+                                     * computes the values of the
+                                     * transformation basis
+                                     * polynomials at the unit cell
+                                     * quadrature points.
+                                     * <li> if any of
+                                     * @p update_covariant_transformation,
+                                     * @p update_contravariant_transformation,
+                                     * @p update_JxW_values,
+                                     * @p update_boundary_forms,
+                                     * @p update_normal_vectors is
+                                     * required, the output will
+                                     * contain
+                                     * @p update_transformation_gradients
+                                     * to compute derivatives of the
+                                     * transformation basis
+                                     * polynomials.
+                                     * </ul>
                                      */
+    virtual UpdateFlags update_once (const UpdateFlags flags) const;
+    
+                                    /**
+                                     * Implementation of the interface in
+                                     * Mapping.
+                                     *
+                                     * Description of effects if
+                                     * @p flags contains:
+                                     * <ul>
+                                     * <li> <code>update_quadrature_points</code> is
+                                     * copied to the output to
+                                     * compute the quadrature points
+                                     * on the real cell.
+                                     * <li> <code>update_JxW_values</code> is
+                                     * copied and requires
+                                     * @p update_boundary_forms on
+                                     * faces. The latter, because the
+                                     * surface element is just the
+                                     * norm of the boundary form.
+                                     * <li> <code>update_normal_vectors</code>
+                                     * is copied and requires
+                                     * @p update_boundary_forms. The
+                                     * latter, because the normal
+                                     * vector is the normalized
+                                     * boundary form.
+                                     * <li>
+                                     * <code>update_covariant_transformation</code>
+                                     * is copied and requires
+                                     * @p update_contravariant_transformation,
+                                     * since it is computed as the
+                                     * inverse of the latter.
+                                     * <li> <code>update_JxW_values</code> is
+                                     * copied and requires
+                                     * <code>update_contravariant_transformation</code>,
+                                     * since it is computed as one
+                                     * over determinant of the
+                                     * latter.
+                                     * <li> <code>update_boundary_forms</code>
+                                     * is copied and requires
+                                     * <code>update_contravariant_transformation</code>,
+                                     * since the boundary form is
+                                     * computed as the contravariant
+                                     * image of the normal vector to
+                                     * the unit cell.
+                                     * </ul>
+                                     */
+    virtual UpdateFlags update_each (const UpdateFlags flags) const;
+
     virtual
     typename Mapping<dim>::InternalDataBase *
     get_data (const UpdateFlags,
              const Quadrature<dim>& quadrature) const;
 
-                                    /**
-                                     * Implementation of the interface in
-                                     * Mapping.
-                                     */
     virtual
     typename Mapping<dim>::InternalDataBase *
     get_face_data (const UpdateFlags flags,
                   const Quadrature<dim-1>& quadrature) const;
 
-                                    /**
-                                     * Implementation of the interface in
-                                     * Mapping.
-                                     */
     virtual
     typename Mapping<dim>::InternalDataBase *
     get_subface_data (const UpdateFlags flags,

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.