]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Revise the Mapping::fill_fe_*_values() interfaces.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Sun, 26 Jul 2015 23:22:44 +0000 (18:22 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 27 Jul 2015 14:04:06 +0000 (09:04 -0500)
These functions previously got a whole lot of arguments for the output arrays.
Consolidate them by simply passing the structure in which they actually lie.

While there, also do:
- Sort these arguments in such a way that they make a bit more sense.
- Provide a thorough documentation of these functions.

14 files changed:
include/deal.II/fe/mapping.h
include/deal.II/fe/mapping_cartesian.h
include/deal.II/fe/mapping_fe_field.h
include/deal.II/fe/mapping_q.h
include/deal.II/fe/mapping_q1.h
include/deal.II/fe/mapping_q1_eulerian.h
include/deal.II/fe/mapping_q_eulerian.h
source/fe/fe_values.cc
source/fe/mapping_cartesian.cc
source/fe/mapping_fe_field.cc
source/fe/mapping_q.cc
source/fe/mapping_q1.cc
source/fe/mapping_q1_eulerian.cc
source/fe/mapping_q_eulerian.cc

index 2cbe97b02a6c1e7578a83e14b6fdee109ef006f4..d4b01051b39425920db3cdb2a2e98e8a1726b862 100644 (file)
@@ -694,83 +694,153 @@ private:
   get_subface_data (const UpdateFlags flags,
                     const Quadrature<dim-1>& quadrature) const = 0;
 
-
   /**
-   * Fill the transformation fields of @p FEValues.  Given a grid cell and the
-   * quadrature points on the unit cell, it computes all values specified by
-   * @p flags. The arrays to be filled have to have the correct size.
+   * Compute information about the mapping from the reference cell
+   * to the real cell indicated by the first argument to this function.
+   * Derived classes will have to implement this function based on the
+   * kind of mapping they represent. It is called by FEValues::reinit().
    *
-   * Values are split into two groups: first, @p quadrature_points and @p
-   * JxW_values are filled with the quadrature rule transformed to the cell in
-   * physical space.
+   * Conceptually, this function's represents the application of the
+   * mapping $\mathbf x=\mathbf F_K(\hat {\mathbf x})$ from reference
+   * coordinates $\mathbf\in [0,1]^d$ to real space coordinates
+   * $\mathbf x$ for a given cell $K$. Its purpose is to compute the following
+   * kinds of data:
    *
-   * The second group contains the matrices needed to transform vector-valued
-   * functions, namely @p jacobians, the derivatives @p jacobian_grads, and
-   * the inverse operations in @p inverse_jacobians.
-   */
-  /*     virtual void */
-  /*     fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell, */
-  /*                  const Quadrature<dim>                         &quadrature, */
-  /*                  InternalDataBase                              &internal, */
-  /*                  std::vector<Point<spacedim> >                 &quadrature_points, */
-  /*                  std::vector<double>                           &JxW_values) const = 0; */
-
-  /**
-   * The function above adjusted with the variable cell_normal_vectors for the
-   * case of codimension 1
+   * - Data that results from the application of the mapping itself, e.g.,
+   *   computing the location $\mathbf x_q = \mathbf F_K(\hat{\mathbf x}_q)$
+   *   of quadrature points on the real cell, and that is directly useful
+   *   to users of FEValues, for example during assembly.
+   * - Data that is necessary for finite element implementations to compute
+   *   their shape functions on the real cell. To this end, the
+   *   FEValues::reinit() function calls FiniteElement::fill_fe_values()
+   *   after the current function, and the output of this function serves
+   *   as input to FiniteElement::fill_fe_values(). Examples of
+   *   information that needs to be computed here for use by the
+   *   finite element classes is the Jacobian of the mapping,
+   *   $\hat\nabla \mathbf F_K(\hat{\mathbf x})$ or its inverse,
+   *   for example to transform the gradients of shape functions on
+   *   the reference cell to the gradients of shape functions on
+   *   the real cell.
+   *
+   * The information computed by this function is used to fill the various
+   * member variables of the output argument of this function. Which of
+   * the member variables of that structure should be filled is determined
+   * by the update flags stored in the Mapping::InternalDataBase object
+   * passed to this function.
+   *
+   * @param[in] cell The cell of the triangulation for which this function
+   *   is to compute a mapping from the reference cell to.
+   * @param[in] cell_similarity Whether or not the cell given as first
+   *   argument is simply a translation, rotation, etc of the cell for
+   *   which this function was called the most recent time. This
+   *   information is computed simply by matching the vertices (as stored
+   *   by the Triangulation) between the previous and the current cell.
+   *   The value passed here may be modified by implementations of
+   *   this function and should then be returned (see the discussion of the
+   *   return value of this function).
+   * @param[in] quadrature A reference to the quadrature formula in use
+   *   for the current evaluation. This quadrature object is the same
+   *   as the one used when creating the @p internal_data object
+   * @param[in] internal_data A reference to an object previously
+   *   created by get_data() and that may be used to store information
+   *   the mapping can compute once on the reference cell. See the
+   *   documentation of the Mapping::InternalDataBase class for an
+   *   extensive description of the purpose of these objects.
+   * @param[out] output_data A reference to an object whose member
+   *   variables should be computed. Not all of the members of this
+   *   argument need to be filled; which ones need to be filled is
+   *   determined by the update flags stored inside the
+   *   @p internal_data object.
+   * @return An updated value of the @p cell_similarity argument to
+   *   this function. The returned value will be used for the corresponding
+   *   argument when FEValues::reinit() calls
+   *   FiniteElement::fill_fe_values(). In most cases, derived classes will
+   *   simply want to return the value passed for @p cell_similarity.
+   *   However, implementations of this function may downgrade the
+   *   level of cell similarity. This is, for example, the case for
+   *   classes that take not only into account the locations of the
+   *   vertices of a cell (as reported by the Triangulation), but also
+   *   other information specific to the mapping. The purpose is that
+   *   FEValues::reinit() can compute whether a cell is similar to the
+   *   previous one only based on the cell's vertices, whereas the
+   *   mapping may also consider displacement fields (e.g., in the
+   *   MappingQ1Eulerian and MappingFEField classes). In such cases,
+   *   the mapping may conclude that the previously computed
+   *   cell similarity is too optimistic, and invalidate it for
+   *   subsequent use in FiniteElement::fill_fe_values() by
+   *   returning a less optimistic cell similarity value.
    */
   virtual
   CellSimilarity::Similarity
   fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                  const Quadrature<dim>                         &quadrature,
-                  const InternalDataBase                              &internal,
-                  std::vector<Point<spacedim> >                 &quadrature_points,
-                  std::vector<double>                           &JxW_values,
-                  std::vector<DerivativeForm<1,dim,spacedim>  > &jacobians,
-                  std::vector<DerivativeForm<2,dim,spacedim>  > &jacobian_grads,
-                  std::vector<DerivativeForm<1,spacedim,dim>  > &inverse_jacobians,
-                  std::vector<Point<spacedim> >                 &cell_normal_vectors,
-                  const CellSimilarity::Similarity                    cell_similarity) const=0;
-
-
+                  const CellSimilarity::Similarity                           cell_similarity,
+                  const Quadrature<dim>                                     &quadrature,
+                  const InternalDataBase                                    &internal_data,
+                  FEValuesData<dim,spacedim>                                &output_data) const = 0;
 
   /**
-   * Performs the same as @p fill_fe_values on a face. Additionally, @p
-   * boundary_form (see
-   * @ref GlossBoundaryForm
-   * ) and @p normal_vectors can be computed on surfaces. Since the boundary
-   * form already contains the determinant of the Jacobian of the
-   * transformation, it is sometimes more economic to use the boundary form
-   * instead of the product of the unit normal and the transformed quadrature
-   * weight.
+   * This function is the equivalent to Mapping::fill_fe_values(),
+   * but for faces of cells. See there for an extensive discussion
+   * of its purpose. It is called by FEFaceValues::reinit().
+   *
+   * @param[in] cell The cell of the triangulation for which this function
+   *   is to compute a mapping from the reference cell to.
+   * @param[in] face_no The number of the face of the given cell for which
+   *   information is requested.
+   * @param[in] quadrature A reference to the quadrature formula in use
+   *   for the current evaluation. This quadrature object is the same
+   *   as the one used when creating the @p internal_data object
+   * @param[in] internal_data A reference to an object previously
+   *   created by get_data() and that may be used to store information
+   *   the mapping can compute once on the reference cell. See the
+   *   documentation of the Mapping::InternalDataBase class for an
+   *   extensive description of the purpose of these objects.
+   * @param[out] output_data A reference to an object whose member
+   *   variables should be computed. Not all of the members of this
+   *   argument need to be filled; which ones need to be filled is
+   *   determined by the update flags stored inside the
+   *   @p internal_data object.
    */
   virtual void
   fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                       const unsigned int                            face_no,
-                       const Quadrature<dim-1>                      &quadrature,
-                       const InternalDataBase                             &internal,
-                       std::vector<Point<spacedim> >                &quadrature_points,
-                       std::vector<double>                          &JxW_values,
-                       std::vector<Tensor<1,spacedim> >             &boundary_form,
-                       std::vector<Point<spacedim> >                &normal_vectors,
-                       std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-                       std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const = 0;
+                       const unsigned int                                         face_no,
+                       const Quadrature<dim-1>                                   &quadrature,
+                       const InternalDataBase                                    &internal_data,
+                       FEValuesData<dim,spacedim>                                &output_data) const = 0;
 
   /**
-   * See above.
+   * This function is the equivalent to Mapping::fill_fe_values(),
+   * but for subfaces (i.e., children of faces) of cells.
+   * See there for an extensive discussion
+   * of its purpose. It is called by FESubfaceValues::reinit().
+   *
+   * @param[in] cell The cell of the triangulation for which this function
+   *   is to compute a mapping from the reference cell to.
+   * @param[in] face_no The number of the face of the given cell for which
+   *   information is requested.
+   * @param[in] subface_no The number of the child of a face of the
+   *   given cell for which information is requested.
+   * @param[in] quadrature A reference to the quadrature formula in use
+   *   for the current evaluation. This quadrature object is the same
+   *   as the one used when creating the @p internal_data object
+   * @param[in] internal_data A reference to an object previously
+   *   created by get_data() and that may be used to store information
+   *   the mapping can compute once on the reference cell. See the
+   *   documentation of the Mapping::InternalDataBase class for an
+   *   extensive description of the purpose of these objects.
+   * @param[out] output_data A reference to an object whose member
+   *   variables should be computed. Not all of the members of this
+   *   argument need to be filled; which ones need to be filled is
+   *   determined by the update flags stored inside the
+   *   @p internal_data object.
    */
   virtual void
   fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                          const unsigned int                face_no,
-                          const unsigned int                sub_no,
-                          const Quadrature<dim-1>          &quadrature,
-                          const InternalDataBase                 &internal,
-                          std::vector<Point<spacedim> >    &quadrature_points,
-                          std::vector<double>              &JxW_values,
-                          std::vector<Tensor<1,spacedim> > &boundary_form,
-                          std::vector<Point<spacedim> >    &normal_vectors,
-                          std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-                          std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const = 0;
+                          const unsigned int                                         face_no,
+                          const unsigned int                                         subface_no,
+                          const Quadrature<dim-1>                                   &quadrature,
+                          const InternalDataBase                                    &internal_data,
+                          FEValuesData<dim,spacedim>                                &output_data) const = 0;
 
   /**
    * Give class @p FEValues access to the private <tt>get_...data</tt> and
index ba9bf2d63c184cca2319591008e7b91fc902516a..f0ae8375571e4df1eaee088c0d22d7386907114a 100644 (file)
@@ -69,43 +69,43 @@ public:
   get_subface_data (const UpdateFlags flags,
                     const Quadrature<dim-1>& quadrature) const;
 
+  /**
+   * Compute mapping-related information for a cell.
+   * See the documentation of Mapping::fill_fe_values() for
+   * a discussion of purpose, arguments, and return value of this function.
+   */
   virtual
   CellSimilarity::Similarity
   fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                  const Quadrature<dim>                             &quadrature,
-                  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_data,
-                  std::vector<Point<spacedim> >                     &quadrature_points,
-                  std::vector<double>                               &JxW_values,
-                  std::vector<DerivativeForm<1,dim,spacedim> >      &jacobians,
-                  std::vector<DerivativeForm<2,dim,spacedim> >      &jacobian_grads,
-                  std::vector<DerivativeForm<1,spacedim,dim> >      &inverse_jacobians,
-                  std::vector<Point<spacedim> > &,
-                  const CellSimilarity::Similarity                        cell_similarity) const;
-
+                  const CellSimilarity::Similarity                           cell_similarity,
+                  const Quadrature<dim>                                     &quadrature,
+                  const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                  FEValuesData<dim,spacedim>                                &output_data) const;
 
+  /**
+   * Compute mapping-related information for a face of a cell.
+   * See the documentation of Mapping::fill_fe_face_values() for
+   * a discussion of purpose and arguments of this function.
+   */
   virtual void
   fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                       const unsigned int               face_no,
-                       const Quadrature<dim-1>&         quadrature,
-                       const typename Mapping<dim, spacedim>::InternalDataBase &mapping_data,
-                       std::vector<Point<dim> >        &quadrature_points,
-                       std::vector<double>             &JxW_values,
-                       std::vector<Tensor<1,dim> >     &boundary_form,
-                       std::vector<Point<spacedim> >   &normal_vectors,
-                       std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-                       std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const;
+                       const unsigned int                                         face_no,
+                       const Quadrature<dim-1>                                   &quadrature,
+                       const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                       FEValuesData<dim,spacedim>                                &output_data) const;
+
+  /**
+   * Compute mapping-related information for a child of a face of a cell.
+   * See the documentation of Mapping::fill_fe_subface_values() for
+   * a discussion of purpose and arguments of this function.
+   */
   virtual void
   fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                          const unsigned int              face_no,
-                          const unsigned int              sub_no,
-                          const Quadrature<dim-1>&        quadrature,
-                          const typename Mapping<dim, spacedim>::InternalDataBase &mapping_data,
-                          std::vector<Point<dim> >        &quadrature_points,
-                          std::vector<double>             &JxW_values,
-                          std::vector<Tensor<1,dim> >     &boundary_form,
-                          std::vector<Point<spacedim> >   &normal_vectors,
-                          std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-                          std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const;
+                          const unsigned int                                         face_no,
+                          const unsigned int                                         subface_no,
+                          const Quadrature<dim-1>                                   &quadrature,
+                          const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                          FEValuesData<dim,spacedim>                                &output_data) const;
 
   virtual void
   transform (const VectorSlice<const std::vector<Tensor<1,dim> > > input,
index d982a9029da6efc0a2cb97727d6e15fb70f7cd66..070a8fcae1cb6f2669d241c6aa841c5410b2724d 100644 (file)
@@ -434,52 +434,42 @@ public:
 
 protected:
   /**
-   * Implementation of the interface in Mapping.
+   * Compute mapping-related information for a cell.
+   * See the documentation of Mapping::fill_fe_values() for
+   * a discussion of purpose, arguments, and return value of this function.
    */
   virtual
   CellSimilarity::Similarity
   fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                  const CellSimilarity::Similarity                           cell_similarity,
                   const Quadrature<dim>                                     &quadrature,
-                  const typename Mapping<dim,spacedim>::InternalDataBase          &mapping_data,
-                  typename std::vector<Point<spacedim> >                    &quadrature_points,
-                  std::vector<double>                                       &JxW_values,
-                  std::vector<DerivativeForm<1,dim,spacedim> >       &jacobians,
-                  std::vector<DerivativeForm<2,dim,spacedim> >       &jacobian_grads,
-                  std::vector<DerivativeForm<1,spacedim,dim> >      &inverse_jacobians,
-                  std::vector<Point<spacedim> >                             &cell_normal_vectors,
-                  const CellSimilarity::Similarity                           cell_similarity) const;
+                  const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                  FEValuesData<dim,spacedim>                                &output_data) const;
 
   /**
-   * Implementation of the interface in Mapping.
+   * Compute mapping-related information for a face of a cell.
+   * See the documentation of Mapping::fill_fe_face_values() for
+   * a discussion of purpose and arguments of this function.
    */
   virtual void
   fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                       const unsigned int face_no,
-                       const Quadrature<dim-1>& quadrature,
-                       const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-                       typename std::vector<Point<spacedim> >        &quadrature_points,
-                       std::vector<double>             &JxW_values,
-                       std::vector<Tensor<1,spacedim> >             &exterior_forms,
-                       std::vector<Point<spacedim> >                &normal_vectors,
-                       std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-                       std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const;
+                       const unsigned int                                         face_no,
+                       const Quadrature<dim-1>                                   &quadrature,
+                       const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                       FEValuesData<dim,spacedim>                                &output_data) const;
 
   /**
-   * Implementation of the interface in Mapping.
+   * Compute mapping-related information for a child of a face of a cell.
+   * See the documentation of Mapping::fill_fe_subface_values() for
+   * a discussion of purpose and arguments of this function.
    */
   virtual void
   fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                          const unsigned int face_no,
-                          const unsigned int sub_no,
-                          const Quadrature<dim-1>& quadrature,
-                          const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-                          typename std::vector<Point<spacedim> >        &quadrature_points,
-                          std::vector<double>             &JxW_values,
-                          std::vector<Tensor<1,spacedim> > &exterior_forms,
-                          std::vector<Point<spacedim> >    &normal_vectors,
-                          std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-                          std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const;
-
+                          const unsigned int                                         face_no,
+                          const unsigned int                                         subface_no,
+                          const Quadrature<dim-1>                                   &quadrature,
+                          const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                          FEValuesData<dim,spacedim>                                &output_data) const;
 
   /**
    * This function and the next allow to generate the transform require by the
index 71e515ede5f3556e4f69ad00507979116e0bc6cb..334dc970286329774a86fe10253a0a542718eee7 100644 (file)
@@ -196,51 +196,42 @@ public:
 
 protected:
   /**
-   * Implementation of the interface in Mapping.
+   * Compute mapping-related information for a cell.
+   * See the documentation of Mapping::fill_fe_values() for
+   * a discussion of purpose, arguments, and return value of this function.
    */
   virtual
   CellSimilarity::Similarity
   fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                  const Quadrature<dim>                            &quadrature,
-                  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-                  typename std::vector<Point<spacedim> >           &quadrature_points,
-                  std::vector<double>                              &JxW_values,
-                  std::vector<DerivativeForm<1,dim,spacedim> >     &jacobians,
-                  std::vector<DerivativeForm<2,dim,spacedim> >     &jacobian_grads,
-                  std::vector<DerivativeForm<1,spacedim,dim> >     &inverse_jacobians,
-                  std::vector<Point<spacedim> >                    &cell_normal_vectors,
-                  const CellSimilarity::Similarity                       cell_similarity) const;
+                  const CellSimilarity::Similarity                           cell_similarity,
+                  const Quadrature<dim>                                     &quadrature,
+                  const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                  FEValuesData<dim,spacedim>                                &output_data) const;
 
   /**
-   * Implementation of the interface in Mapping.
+   * Compute mapping-related information for a face of a cell.
+   * See the documentation of Mapping::fill_fe_face_values() for
+   * a discussion of purpose and arguments of this function.
    */
   virtual void
   fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                       const unsigned int                           face_no,
-                       const Quadrature<dim-1>&                     quadrature,
-                       const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-                       typename std::vector<Point<spacedim> >       &quadrature_points,
-                       std::vector<double>                          &JxW_values,
-                       typename std::vector<Tensor<1,spacedim> >    &exterior_form,
-                       typename std::vector<Point<spacedim> >       &normal_vectors,
-                       std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-                       std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const;
+                       const unsigned int                                         face_no,
+                       const Quadrature<dim-1>                                   &quadrature,
+                       const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                       FEValuesData<dim,spacedim>                                &output_data) const;
 
   /**
-   * Implementation of the interface in Mapping.
+   * Compute mapping-related information for a child of a face of a cell.
+   * See the documentation of Mapping::fill_fe_subface_values() for
+   * a discussion of purpose and arguments of this function.
    */
   virtual void
   fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                          const unsigned int                           face_no,
-                          const unsigned int                           sub_no,
-                          const Quadrature<dim-1>&                     quadrature,
-                          const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-                          typename std::vector<Point<spacedim> >       &quadrature_points,
-                          std::vector<double>                          &JxW_values,
-                          typename std::vector<Tensor<1,spacedim> >    &exterior_form,
-                          typename std::vector<Point<spacedim> >       &normal_vectors,
-                          std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-                          std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const;
+                          const unsigned int                                         face_no,
+                          const unsigned int                                         subface_no,
+                          const Quadrature<dim-1>                                   &quadrature,
+                          const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                          FEValuesData<dim,spacedim>                                &output_data) const;
 
   /**
    * For <tt>dim=2,3</tt>. Append the support points of all shape functions
index 6e4395bed6de1f574289c77a02f474fd104f9170..d3eb9006a9ba073be6018011ed4842e7690840c0 100644 (file)
@@ -318,51 +318,42 @@ public:
   DataSetDescriptor;
 
   /**
-   * Implementation of the interface in Mapping.
+   * Compute mapping-related information for a cell.
+   * See the documentation of Mapping::fill_fe_values() for
+   * a discussion of purpose, arguments, and return value of this function.
    */
   virtual
   CellSimilarity::Similarity
   fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                  const Quadrature<dim>                        &quadrature,
-                  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-                  typename std::vector<Point<spacedim> >       &quadrature_points,
-                  std::vector<double>                          &JxW_values,
-                  std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-                  std::vector<DerivativeForm<2,dim,spacedim> > &jacobian_grads,
-                  std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians,
-                  std::vector<Point<spacedim> >                &cell_normal_vectors,
-                  const CellSimilarity::Similarity                   cell_similarity) const;
+                  const CellSimilarity::Similarity                           cell_similarity,
+                  const Quadrature<dim>                                     &quadrature,
+                  const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                  FEValuesData<dim,spacedim>                                &output_data) const;
 
   /**
-   * Implementation of the interface in Mapping.
+   * Compute mapping-related information for a face of a cell.
+   * See the documentation of Mapping::fill_fe_face_values() for
+   * a discussion of purpose and arguments of this function.
    */
   virtual void
   fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                       const unsigned int                            face_no,
-                       const Quadrature<dim-1>                      &quadrature,
-                       const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-                       typename std::vector<Point<spacedim> >       &quadrature_points,
-                       std::vector<double>                          &JxW_values,
-                       typename std::vector<Tensor<1,spacedim> >    &boundary_form,
-                       typename std::vector<Point<spacedim> >       &normal_vectors,
-                       std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-                       std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const;
+                       const unsigned int                                         face_no,
+                       const Quadrature<dim-1>                                   &quadrature,
+                       const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                       FEValuesData<dim,spacedim>                                &output_data) const;
 
   /**
-   * Implementation of the interface in Mapping.
+   * Compute mapping-related information for a child of a face of a cell.
+   * See the documentation of Mapping::fill_fe_subface_values() for
+   * a discussion of purpose and arguments of this function.
    */
   virtual void
   fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                          const unsigned int                           face_no,
-                          const unsigned int                           sub_no,
-                          const Quadrature<dim-1>&                     quadrature,
-                          const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-                          typename std::vector<Point<spacedim> >       &quadrature_points,
-                          std::vector<double>                          &JxW_values,
-                          typename std::vector<Tensor<1,spacedim> >    &boundary_form,
-                          typename std::vector<Point<spacedim> >       &normal_vectors,
-                          std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-                          std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const;
+                          const unsigned int                                         face_no,
+                          const unsigned int                                         subface_no,
+                          const Quadrature<dim-1>                                   &quadrature,
+                          const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                          FEValuesData<dim,spacedim>                                &output_data) const;
 
   /**
    * Compute shape values and/or derivatives.
index f3b2da30978f1ba3c85a72a551a159e43282d4a7..8b31afdc4425814ae4ad2dc6d984f654f6c24f4b 100644 (file)
@@ -122,21 +122,20 @@ public:
 
 protected:
   /**
-   * Implementation of the interface in MappingQ1. Overrides the function in
-   * the base class, since we cannot use any cell similarity for this class.
+   * Compute mapping-related information for a cell.
+   * See the documentation of Mapping::fill_fe_values() for
+   * a discussion of purpose, arguments, and return value of this function.
+   *
+   * This function overrides the function in
+   * the base class since we cannot use any cell similarity for this class.
    */
   virtual
   CellSimilarity::Similarity
   fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                  const CellSimilarity::Similarity                           cell_similarity,
                   const Quadrature<dim>                                     &quadrature,
-                  typename Mapping<dim,spacedim>::InternalDataBase          &mapping_data,
-                  typename std::vector<Point<spacedim> >                    &quadrature_points,
-                  std::vector<double>                                       &JxW_values,
-                  std::vector<DerivativeForm<1,dim,spacedim> >       &jacobians,
-                  std::vector<DerivativeForm<2,dim,spacedim>  >       &jacobian_grads,
-                  std::vector<DerivativeForm<1,spacedim,dim>  >       &inverse_jacobians,
-                  std::vector<Point<spacedim> >                             &cell_normal_vectors,
-                  const CellSimilarity::Similarity                           cell_similarity) const;
+                  const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                  FEValuesData<dim,spacedim>                                &output_data) const;
 
   /**
    * Reference to the vector of shifts.
index e03f1f503570d2535eb2766f0ec2899ae3c3f616..34aecd29a3126689ee12be8f20e01b6c72858513 100644 (file)
@@ -137,21 +137,20 @@ public:
 
 protected:
   /**
-   * Implementation of the interface in MappingQ. Overrides the function in
-   * the base class, since we cannot use any cell similarity for this class.
+   * Compute mapping-related information for a cell.
+   * See the documentation of Mapping::fill_fe_values() for
+   * a discussion of purpose, arguments, and return value of this function.
+   *
+   * This function overrides the function in
+   * the base class since we cannot use any cell similarity for this class.
    */
   virtual
   CellSimilarity::Similarity
   fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                  const CellSimilarity::Similarity                           cell_similarity,
                   const Quadrature<dim>                                     &quadrature,
-                  typename Mapping<dim,spacedim>::InternalDataBase          &mapping_data,
-                  typename std::vector<Point<spacedim> >                    &quadrature_points,
-                  std::vector<double>                                       &JxW_values,
-                  std::vector<DerivativeForm<1,dim,spacedim> >      &jacobians,
-                  std::vector<DerivativeForm<2,dim,spacedim> >      &jacobian_grads,
-                  std::vector<DerivativeForm<1,spacedim,dim> >      &inverse_jacobians,
-                  std::vector<Point<spacedim> >                             &cell_normal_vectors,
-                  const CellSimilarity::Similarity                           cell_similarity) const;
+                  const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                  FEValuesData<dim,spacedim>                                &output_data) const;
 
   /**
    * Reference to the vector of shifts.
index 2cbedfbbba3c2f5db79c41e1c553df2109066c7c..909f6d11d3bd1e5a672e16ee23d6c679cd4bd7d0 100644 (file)
@@ -3518,15 +3518,10 @@ void FEValues<dim,spacedim>::do_reinit ()
   // it
   this->cell_similarity
     = this->get_mapping().fill_fe_values(*this->present_cell,
+                                         this->cell_similarity,
                                          quadrature,
                                          *this->mapping_data,
-                                         this->quadrature_points,
-                                         this->JxW_values,
-                                         this->jacobians,
-                                         this->jacobian_grads,
-                                         this->inverse_jacobians,
-                                         this->normal_vectors,
-                                         this->cell_similarity);
+                                         *this);
 
   // then call the finite element and, with the data
   // already filled by the mapping, let it compute the
@@ -3722,15 +3717,11 @@ void FEFaceValues<dim,spacedim>::do_reinit (const unsigned int face_no)
   Assert(!(this->update_flags & update_jacobian_grads),
          ExcNotImplemented());
 
-  this->get_mapping().fill_fe_face_values(*this->present_cell, face_no,
+  this->get_mapping().fill_fe_face_values(*this->present_cell,
+                                          face_no,
                                           this->quadrature,
                                           *this->mapping_data,
-                                          this->quadrature_points,
-                                          this->JxW_values,
-                                          this->boundary_forms,
-                                          this->normal_vectors,
-                                          this->jacobians,
-                                          this->inverse_jacobians);
+                                          *this);
 
   this->get_fe().fill_fe_face_values(this->get_mapping(),
                                      *this->present_cell, face_no,
@@ -3958,15 +3949,11 @@ void FESubfaceValues<dim,spacedim>::do_reinit (const unsigned int face_no,
 
   // now ask the mapping and the finite element to do the actual work
   this->get_mapping().fill_fe_subface_values(*this->present_cell,
-                                             face_no, subface_no,
+                                             face_no,
+                                             subface_no,
                                              this->quadrature,
                                              *this->mapping_data,
-                                             this->quadrature_points,
-                                             this->JxW_values,
-                                             this->boundary_forms,
-                                             this->normal_vectors,
-                                             this->jacobians,
-                                             this->inverse_jacobians);
+                                             *this);
 
   this->get_fe().fill_fe_subface_values(this->get_mapping(),
                                         *this->present_cell,
index a2ae39b48301873d52882be8277a897c6e55c2e8..405d18b49eedb82b3cee48d904383e9bbd2f2eaf 100644 (file)
@@ -318,28 +318,23 @@ template<int dim, int spacedim>
 CellSimilarity::Similarity
 MappingCartesian<dim, spacedim>::
 fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                const Quadrature<dim> &q,
-                const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-                std::vector<Point<spacedim> > &quadrature_points,
-                std::vector<double> &JxW_values,
-                std::vector< DerivativeForm<1,dim,spacedim> > &jacobians,
-                std::vector<DerivativeForm<2,dim,spacedim> >      &jacobian_grads,
-                std::vector<DerivativeForm<1,spacedim,dim> >      &inverse_jacobians,
-                std::vector<Point<spacedim> > &,
-                const CellSimilarity::Similarity cell_similarity) const
+                const CellSimilarity::Similarity                           cell_similarity,
+                const Quadrature<dim>                                     &quadrature,
+                const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                FEValuesData<dim,spacedim>                                &output_data) const
 {
   // convert data object to internal
   // data for this class. fails with
   // an exception if that is not
   // possible
-  Assert (dynamic_cast<const InternalData *> (&mapping_data) != 0, ExcInternalError());
-  const InternalData &data = static_cast<const InternalData &> (mapping_data);
+  Assert (dynamic_cast<const InternalData *> (&internal_data) != 0, ExcInternalError());
+  const InternalData &data = static_cast<const InternalData &> (internal_data);
 
   std::vector<Point<dim> > dummy;
 
   compute_fill (cell, invalid_face_number, invalid_face_number, cell_similarity,
                 data,
-                quadrature_points,
+                output_data.quadrature_points,
                 dummy);
 
   // compute Jacobian
@@ -355,36 +350,37 @@ fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
           J *= data.length[d];
         data.volume_element = J;
         if (data.current_update_flags() & update_JxW_values)
-          for (unsigned int i=0; i<JxW_values.size(); ++i)
-            JxW_values[i] = J * q.weight(i);
+          for (unsigned int i=0; i<output_data.JxW_values.size(); ++i)
+            output_data.JxW_values[i] = J * quadrature.weight(i);
       }
   // "compute" Jacobian at the quadrature
   // points, which are all the same
   if (data.current_update_flags() & update_jacobians)
     if (cell_similarity != CellSimilarity::translation)
-      for (unsigned int i=0; i<jacobians.size(); ++i)
+      for (unsigned int i=0; i<output_data.jacobians.size(); ++i)
         {
-          jacobians[i] =  DerivativeForm<1,dim,spacedim>();
+          output_data.jacobians[i] =  DerivativeForm<1,dim,spacedim>();
           for (unsigned int j=0; j<dim; ++j)
-            jacobians[i][j][j]=data.length[j];
+            output_data.jacobians[i][j][j] = data.length[j];
         }
   // "compute" the derivative of the Jacobian
   // at the quadrature points, which are all
   // zero of course
   if (data.current_update_flags() & update_jacobian_grads)
     if (cell_similarity != CellSimilarity::translation)
-      for (unsigned int i=0; i<jacobian_grads.size(); ++i)
-        jacobian_grads[i]=DerivativeForm<2,dim,spacedim>();
+      for (unsigned int i=0; i<output_data.jacobian_grads.size(); ++i)
+        output_data.jacobian_grads[i]=DerivativeForm<2,dim,spacedim>();
+
   // "compute" inverse Jacobian at the
   // quadrature points, which are all
   // the same
   if (data.current_update_flags() & update_inverse_jacobians)
     if (cell_similarity != CellSimilarity::translation)
-      for (unsigned int i=0; i<inverse_jacobians.size(); ++i)
+      for (unsigned int i=0; i<output_data.inverse_jacobians.size(); ++i)
         {
-          inverse_jacobians[i]=Tensor<2,dim>();
+          output_data.inverse_jacobians[i]=Tensor<2,dim>();
           for (unsigned int j=0; j<dim; ++j)
-            inverse_jacobians[j][j]=1./data.length[j];
+            output_data.inverse_jacobians[j][j]=1./data.length[j];
         }
 
   return cell_similarity;
@@ -394,31 +390,26 @@ fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
 
 template<int dim, int spacedim>
 void
-MappingCartesian<dim, spacedim>::fill_fe_face_values (
-  const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-  const unsigned int             face_no,
-  const Quadrature<dim-1>       &q,
-  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_data,
-  std::vector<Point<dim> >      &quadrature_points,
-  std::vector<double>           &JxW_values,
-  std::vector<Tensor<1,dim> >   &boundary_forms,
-  std::vector<Point<spacedim> > &normal_vectors,
-  std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-  std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const
+MappingCartesian<dim, spacedim>::
+fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                     const unsigned int                                         face_no,
+                     const Quadrature<dim-1>                                   &quadrature,
+                     const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                     FEValuesData<dim,spacedim>                                &output_data) const
 {
   // convert data object to internal
   // data for this class. fails with
   // an exception if that is not
   // possible
-  Assert (dynamic_cast<const InternalData *> (&mapping_data) != 0,
+  Assert (dynamic_cast<const InternalData *> (&internal_data) != 0,
           ExcInternalError());
-  const InternalData &data = static_cast<const InternalData &> (mapping_data);
+  const InternalData &data = static_cast<const InternalData &> (internal_data);
 
   compute_fill (cell, face_no, invalid_face_number,
                 CellSimilarity::none,
                 data,
-                quadrature_points,
-                normal_vectors);
+                output_data.quadrature_points,
+                output_data.normal_vectors);
 
   // first compute Jacobian
   // determinant, which is simply the
@@ -430,12 +421,12 @@ MappingCartesian<dim, spacedim>::fill_fe_face_values (
       J *= data.length[d];
 
   if (data.current_update_flags() & update_JxW_values)
-    for (unsigned int i=0; i<JxW_values.size(); ++i)
-      JxW_values[i] = J * q.weight(i);
+    for (unsigned int i=0; i<output_data.JxW_values.size(); ++i)
+      output_data.JxW_values[i] = J * quadrature.weight(i);
 
   if (data.current_update_flags() & update_boundary_forms)
-    for (unsigned int i=0; i<boundary_forms.size(); ++i)
-      boundary_forms[i] = J * normal_vectors[i];
+    for (unsigned int i=0; i<output_data.boundary_forms.size(); ++i)
+      output_data.boundary_forms[i] = J * output_data.normal_vectors[i];
 
   if (data.current_update_flags() & update_volume_elements)
     {
@@ -446,19 +437,19 @@ MappingCartesian<dim, spacedim>::fill_fe_face_values (
     }
 
   if (data.current_update_flags() & update_jacobians)
-    for (unsigned int i=0; i<jacobians.size(); ++i)
+    for (unsigned int i=0; i<output_data.jacobians.size(); ++i)
       {
-        jacobians[i] = DerivativeForm<1,dim,spacedim>();
+        output_data.jacobians[i] = DerivativeForm<1,dim,spacedim>();
         for (unsigned int d=0; d<dim; ++d)
-          jacobians[i][d][d] = data.length[d];
+          output_data.jacobians[i][d][d] = data.length[d];
       }
 
   if (data.current_update_flags() & update_inverse_jacobians)
-    for (unsigned int i=0; i<inverse_jacobians.size(); ++i)
+    for (unsigned int i=0; i<output_data.inverse_jacobians.size(); ++i)
       {
-        inverse_jacobians[i] = DerivativeForm<1,dim,spacedim>();
+        output_data.inverse_jacobians[i] = DerivativeForm<1,dim,spacedim>();
         for (unsigned int d=0; d<dim; ++d)
-          inverse_jacobians[i][d][d] = 1./data.length[d];
+          output_data.inverse_jacobians[i][d][d] = 1./data.length[d];
       }
 }
 
@@ -466,30 +457,25 @@ MappingCartesian<dim, spacedim>::fill_fe_face_values (
 
 template<int dim, int spacedim>
 void
-MappingCartesian<dim, spacedim>::fill_fe_subface_values (
-  const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-  const unsigned int             face_no,
-  const unsigned int             sub_no,
-  const Quadrature<dim-1>       &q,
-  const typename Mapping<dim, spacedim>::InternalDataBase &mapping_data,
-  std::vector<Point<dim> >      &quadrature_points,
-  std::vector<double>           &JxW_values,
-  std::vector<Tensor<1,dim> >   &boundary_forms,
-  std::vector<Point<spacedim> > &normal_vectors,
-  std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-  std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const
+MappingCartesian<dim, spacedim>::
+fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                        const unsigned int                                         face_no,
+                        const unsigned int                                         subface_no,
+                        const Quadrature<dim-1>                                   &quadrature,
+                        const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                        FEValuesData<dim,spacedim>                                &output_data) const
 {
   // convert data object to internal
   // data for this class. fails with
   // an exception if that is not
   // possible
-  Assert (dynamic_cast<const InternalData *> (&mapping_data) != 0, ExcInternalError());
-  const InternalData &data = static_cast<const InternalData &> (mapping_data);
+  Assert (dynamic_cast<const InternalData *> (&internal_data) != 0, ExcInternalError());
+  const InternalData &data = static_cast<const InternalData &> (internal_data);
 
-  compute_fill (cell, face_no, sub_no, CellSimilarity::none,
+  compute_fill (cell, face_no, subface_no, CellSimilarity::none,
                 data,
-                quadrature_points,
-                normal_vectors);
+                output_data.quadrature_points,
+                output_data.normal_vectors);
 
   // first compute Jacobian
   // determinant, which is simply the
@@ -516,13 +502,13 @@ MappingCartesian<dim, spacedim>::fill_fe_subface_values (
         cell->face(face_no)->has_children() ?
         cell->face(face_no)->n_children() :
         GeometryInfo<dim>::max_children_per_face;
-      for (unsigned int i=0; i<JxW_values.size(); ++i)
-        JxW_values[i] = J * q.weight(i) / n_subfaces;
+      for (unsigned int i=0; i<output_data.JxW_values.size(); ++i)
+        output_data.JxW_values[i] = J * quadrature.weight(i) / n_subfaces;
     }
 
   if (data.current_update_flags() & update_boundary_forms)
-    for (unsigned int i=0; i<boundary_forms.size(); ++i)
-      boundary_forms[i] = J * normal_vectors[i];
+    for (unsigned int i=0; i<output_data.boundary_forms.size(); ++i)
+      output_data.boundary_forms[i] = J * output_data.normal_vectors[i];
 
   if (data.current_update_flags() & update_volume_elements)
     {
@@ -533,19 +519,19 @@ MappingCartesian<dim, spacedim>::fill_fe_subface_values (
     }
 
   if (data.current_update_flags() & update_jacobians)
-    for (unsigned int i=0; i<jacobians.size(); ++i)
+    for (unsigned int i=0; i<output_data.jacobians.size(); ++i)
       {
-        jacobians[i] = DerivativeForm<1,dim,spacedim>();
+        output_data.jacobians[i] = DerivativeForm<1,dim,spacedim>();
         for (unsigned int d=0; d<dim; ++d)
-          jacobians[i][d][d] = data.length[d];
+          output_data.jacobians[i][d][d] = data.length[d];
       }
 
   if (data.current_update_flags() & update_inverse_jacobians)
-    for (unsigned int i=0; i<inverse_jacobians.size(); ++i)
+    for (unsigned int i=0; i<output_data.inverse_jacobians.size(); ++i)
       {
-        inverse_jacobians[i] = DerivativeForm<1,spacedim,dim>();
+        output_data.inverse_jacobians[i] = DerivativeForm<1,spacedim,dim>();
         for (unsigned int d=0; d<dim; ++d)
-          inverse_jacobians[i][d][d] = 1./data.length[d];
+          output_data.inverse_jacobians[i][d][d] = 1./data.length[d];
       }
 }
 
index 8373f75050a784f033ada15367e777fee2c919b6..b1bcb3f9025d6fcd6a84cd9faf78afda77ca77db 100644 (file)
@@ -374,24 +374,19 @@ MappingFEField<dim,spacedim,VECTOR,DH>::get_subface_data (const UpdateFlags upda
 // recalculate data even when cells are similar.
 template<int dim, int spacedim, class VECTOR, class DH>
 CellSimilarity::Similarity
-MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_values (
-  const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-  const Quadrature<dim>                                     &q,
-  const typename Mapping<dim,spacedim>::InternalDataBase          &mapping_data,
-  std::vector<Point<spacedim> >                             &quadrature_points,
-  std::vector<double>                                       &JxW_values,
-  std::vector<DerivativeForm<1,dim,spacedim>   >          &jacobians,
-  std::vector<DerivativeForm<2,dim,spacedim>    >           &jacobian_grads,
-  std::vector<DerivativeForm<1,spacedim,dim>    >           &inverse_jacobians,
-  std::vector<Point<spacedim> >                             &normal_vectors,
-  const CellSimilarity::Similarity                                cell_similarity) const
+MappingFEField<dim,spacedim,VECTOR,DH>::
+fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                const CellSimilarity::Similarity                           cell_similarity,
+                const Quadrature<dim>                                     &quadrature,
+                const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                FEValuesData<dim,spacedim>                                &output_data) const
 {
   // convert data object to internal data for this class. fails with an
   // exception if that is not possible
-  Assert (dynamic_cast<const InternalData *> (&mapping_data) != 0, ExcInternalError());
-  const InternalData &data = static_cast<const InternalData &> (mapping_data);
+  Assert (dynamic_cast<const InternalData *> (&internal_data) != 0, ExcInternalError());
+  const InternalData &data = static_cast<const InternalData &> (internal_data);
 
-  const unsigned int n_q_points=q.size();
+  const unsigned int n_q_points=quadrature.size();
   const  CellSimilarity::Similarity updated_cell_similarity
     = (get_degree() == 1
        ?
@@ -401,21 +396,22 @@ MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_values (
 
   compute_fill (cell, n_q_points, QProjector<dim>::DataSetDescriptor::cell (),
                 updated_cell_similarity,
-                data, quadrature_points);
+                data,
+                output_data.quadrature_points);
 
   const UpdateFlags update_flags(data.current_update_flags());
-  const std::vector<double> &weights=q.get_weights();
+  const std::vector<double> &weights=quadrature.get_weights();
 
   // Multiply quadrature weights by absolute value of Jacobian determinants or
   // the area element g=sqrt(DX^t DX) in case of codim > 0
 
   if (update_flags & (update_normal_vectors | update_JxW_values))
     {
-      AssertDimension (JxW_values.size(), n_q_points);
+      AssertDimension (output_data.JxW_values.size(), n_q_points);
 
       Assert( !(update_flags & update_normal_vectors ) ||
-              (normal_vectors.size() == n_q_points),
-              ExcDimensionMismatch(normal_vectors.size(), n_q_points));
+              (output_data.normal_vectors.size() == n_q_points),
+              ExcDimensionMismatch(output_data.normal_vectors.size(), n_q_points));
 
 
       if (cell_similarity != CellSimilarity::translation)
@@ -433,7 +429,7 @@ MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_values (
                 Assert (det > 1e-12*Utilities::fixed_power<dim>(cell->diameter()/
                                                                 std::sqrt(double(dim))),
                         (typename Mapping<dim,spacedim>::ExcDistortedMappedCell(cell->center(), det, point)));
-                JxW_values[point] = weights[point] * det;
+                output_data.JxW_values[point] = weights[point] * det;
               }
             // if dim==spacedim, then there is no cell normal to
             // compute. since this is for FEValues (and not FEFaceValues),
@@ -450,13 +446,13 @@ MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_values (
                   for (unsigned int j=0; j<dim; ++j)
                     G[i][j] = DX_t[i] * DX_t[j];
 
-                JxW_values[point] = sqrt(determinant(G)) * weights[point];
+                output_data.JxW_values[point] = sqrt(determinant(G)) * weights[point];
 
                 if (cell_similarity == CellSimilarity::inverted_translation)
                   {
                     // we only need to flip the normal
                     if (update_flags & update_normal_vectors)
-                      normal_vectors[point] *= -1.;
+                      output_data.normal_vectors[point] *= -1.;
                   }
                 else
                   {
@@ -466,14 +462,14 @@ MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_values (
                                 ExcMessage("There is no cell normal in codim 2."));
 
                         if (dim==1)
-                          cross_product(normal_vectors[point], -DX_t[0]);
+                          cross_product(output_data.normal_vectors[point], -DX_t[0]);
                         else //dim == 2
-                          cross_product(normal_vectors[point],DX_t[0],DX_t[1]);
+                          cross_product(output_data.normal_vectors[point],DX_t[0],DX_t[1]);
 
-                        normal_vectors[point] /= normal_vectors[point].norm();
+                        output_data.normal_vectors[point] /= output_data.normal_vectors[point].norm();
 
                         if (cell->direction_flag() == false)
-                          normal_vectors[point] *= -1.;
+                          output_data.normal_vectors[point] *= -1.;
                       }
 
                   }
@@ -486,10 +482,10 @@ MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_values (
   // copy values from InternalData to vector given by reference
   if (update_flags & update_jacobians)
     {
-      AssertDimension (jacobians.size(), n_q_points);
+      AssertDimension (output_data.jacobians.size(), n_q_points);
       if (cell_similarity != CellSimilarity::translation)
         for (unsigned int point=0; point<n_q_points; ++point)
-          jacobians[point] = data.contravariant[point];
+          output_data.jacobians[point] = data.contravariant[point];
     }
 
 
@@ -497,12 +493,12 @@ MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_values (
   // we only do it for cells, not faces.
   if (update_flags & update_jacobian_grads)
     {
-      AssertDimension (jacobian_grads.size(), n_q_points);
+      AssertDimension (output_data.jacobian_grads.size(), n_q_points);
 
       if (cell_similarity != CellSimilarity::translation)
         {
-          std::fill(jacobian_grads.begin(),
-                    jacobian_grads.end(),
+          std::fill(output_data.jacobian_grads.begin(),
+                    output_data.jacobian_grads.end(),
                     DerivativeForm<2,dim,spacedim>());
 
           const unsigned int data_set = QProjector<dim>::DataSetDescriptor::cell();
@@ -529,7 +525,7 @@ MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_values (
               for (unsigned int i=0; i<spacedim; ++i)
                 for (unsigned int j=0; j<dim; ++j)
                   for (unsigned int l=0; l<dim; ++l)
-                    jacobian_grads[point][i][j][l] = result[i][j][l];
+                    output_data.jacobian_grads[point][i][j][l] = result[i][j][l];
             }
         }
     }
@@ -538,10 +534,10 @@ MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_values (
   // copy values from InternalData to vector given by reference
   if (update_flags & update_inverse_jacobians)
     {
-      AssertDimension (inverse_jacobians.size(), n_q_points);
+      AssertDimension (output_data.inverse_jacobians.size(), n_q_points);
       if (cell_similarity != CellSimilarity::translation)
         for (unsigned int point=0; point<n_q_points; ++point)
-          inverse_jacobians[point] = data.covariant[point].transpose();
+          output_data.inverse_jacobians[point] = data.covariant[point].transpose();
     }
 
   return updated_cell_similarity;
@@ -551,25 +547,20 @@ MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_values (
 
 template<int dim, int spacedim, class VECTOR, class DH>
 void
-MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_face_values (
-  const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-  const unsigned int       face_no,
-  const Quadrature<dim-1> &q,
-  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-  std::vector<Point<spacedim> >     &quadrature_points,
-  std::vector<double>          &JxW_values,
-  std::vector<Tensor<1,spacedim> >             &exterior_forms,
-  std::vector<Point<spacedim> >                &normal_vectors,
-  std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-  std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const
+MappingFEField<dim,spacedim,VECTOR,DH>::
+fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                     const unsigned int                                         face_no,
+                     const Quadrature<dim-1>                                   &quadrature,
+                     const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                     FEValuesData<dim,spacedim>                                &output_data) const
 {
   // convert data object to internal data for this class. fails with an
   // exception if that is not possible
-  Assert (dynamic_cast<const InternalData *> (&mapping_data) != 0,
+  Assert (dynamic_cast<const InternalData *> (&internal_data) != 0,
           ExcInternalError());
-  const InternalData &data = static_cast<const InternalData &> (mapping_data);
+  const InternalData &data = static_cast<const InternalData &> (internal_data);
 
-  const unsigned int n_q_points=q.size();
+  const unsigned int n_q_points=quadrature.size();
   this->compute_fill_face (cell, face_no, numbers::invalid_unsigned_int,
                            n_q_points,
                            QProjector<dim>::DataSetDescriptor::
@@ -578,49 +569,51 @@ MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_face_values (
                                  cell->face_flip(face_no),
                                  cell->face_rotation(face_no),
                                  n_q_points),
-                           q.get_weights(),
+                           quadrature.get_weights(),
                            data,
-                           quadrature_points, JxW_values,
-                           exterior_forms, normal_vectors, jacobians,
-                           inverse_jacobians);
+                           output_data.quadrature_points,
+                           output_data.JxW_values,
+                           output_data.boundary_forms,
+                           output_data.normal_vectors,
+                           output_data.jacobians,
+                           output_data.inverse_jacobians);
 }
 
 
 template<int dim, int spacedim, class VECTOR, class DH>
 void
-MappingFEField<dim,spacedim,VECTOR,DH>::fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-    const unsigned int       face_no,
-    const unsigned int       sub_no,
-    const Quadrature<dim-1> &q,
-    const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-    std::vector<Point<spacedim> >     &quadrature_points,
-    std::vector<double>          &JxW_values,
-    std::vector<Tensor<1,spacedim> > &exterior_forms,
-    std::vector<Point<spacedim> >    &normal_vectors,
-    std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-    std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const
+MappingFEField<dim,spacedim,VECTOR,DH>::
+fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                        const unsigned int                                         face_no,
+                        const unsigned int                                         subface_no,
+                        const Quadrature<dim-1>                                   &quadrature,
+                        const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                        FEValuesData<dim,spacedim>                                &output_data) const
 {
   // convert data object to internal data for this class. fails with an
   // exception if that is not possible
-  Assert (dynamic_cast<const InternalData *> (&mapping_data) != 0,
+  Assert (dynamic_cast<const InternalData *> (&internal_data) != 0,
           ExcInternalError());
-  const InternalData &data = static_cast<const InternalData &> (mapping_data);
+  const InternalData &data = static_cast<const InternalData &> (internal_data);
 
-  const unsigned int n_q_points=q.size();
-  this->compute_fill_face (cell, face_no, sub_no,
+  const unsigned int n_q_points=quadrature.size();
+  this->compute_fill_face (cell, face_no, subface_no,
                            n_q_points,
                            QProjector<dim>::DataSetDescriptor::
-                           subface (face_no, sub_no,
+                           subface (face_no, subface_no,
                                     cell->face_orientation(face_no),
                                     cell->face_flip(face_no),
                                     cell->face_rotation(face_no),
                                     n_q_points,
                                     cell->subface_case(face_no)),
-                           q.get_weights(),
+                           quadrature.get_weights(),
                            data,
-                           quadrature_points, JxW_values,
-                           exterior_forms, normal_vectors, jacobians,
-                           inverse_jacobians);
+                           output_data.quadrature_points,
+                           output_data.JxW_values,
+                           output_data.boundary_forms,
+                           output_data.normal_vectors,
+                           output_data.jacobians,
+                           output_data.inverse_jacobians);
 }
 
 
index 048d6117159242b06a10cef1a19ab447f7a2bd7f..f3bcb5394f1a021e0bf2d8df8f20b6457efabdc2 100644 (file)
@@ -27,6 +27,7 @@
 #include <deal.II/fe/fe_tools.h>
 #include <deal.II/fe/mapping_q.h>
 #include <deal.II/fe/fe_q.h>
+#include <deal.II/fe/fe_values.h>
 
 #include <numeric>
 
@@ -247,22 +248,17 @@ MappingQ<dim,spacedim>::get_subface_data (const UpdateFlags update_flags,
 // recalculate data even when cells are similar.
 template<int dim, int spacedim>
 CellSimilarity::Similarity
-MappingQ<dim,spacedim>::fill_fe_values (
-  const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-  const Quadrature<dim>                                     &q,
-  const typename Mapping<dim,spacedim>::InternalDataBase          &mapping_data,
-  std::vector<Point<spacedim> >                             &quadrature_points,
-  std::vector<double>                                       &JxW_values,
-  std::vector<DerivativeForm<1,dim,spacedim>   >    &jacobians,
-  std::vector<DerivativeForm<2,dim,spacedim>    >   &jacobian_grads,
-  std::vector<DerivativeForm<1,spacedim,dim>    >   &inverse_jacobians,
-  std::vector<Point<spacedim> >                             &normal_vectors,
-  const CellSimilarity::Similarity                           cell_similarity) const
+MappingQ<dim,spacedim>::
+fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                const CellSimilarity::Similarity                           cell_similarity,
+                const Quadrature<dim>                                     &quadrature,
+                const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                FEValuesData<dim,spacedim>                                &output_data) const
 {
   // convert data object to internal data for this class. fails with an
   // exception if that is not possible
-  Assert (dynamic_cast<const InternalData *> (&mapping_data) != 0, ExcInternalError());
-  const InternalData &data = static_cast<const InternalData &> (mapping_data);
+  Assert (dynamic_cast<const InternalData *> (&internal_data) != 0, ExcInternalError());
+  const InternalData &data = static_cast<const InternalData &> (internal_data);
 
   // check whether this cell needs the full mapping or can be treated by a
   // reduced Q1 mapping, e.g. if the cell is in the interior of the domain
@@ -292,11 +288,11 @@ MappingQ<dim,spacedim>::fill_fe_values (
        CellSimilarity::invalid_next_cell
        :
        cell_similarity);
-  MappingQ1<dim,spacedim>::fill_fe_values(cell, q, *p_data,
-                                          quadrature_points, JxW_values,
-                                          jacobians, jacobian_grads, inverse_jacobians,
-                                          normal_vectors,
-                                          updated_cell_similarity);
+  MappingQ1<dim,spacedim>::fill_fe_values(cell,
+                                          updated_cell_similarity,
+                                          quadrature,
+                                          *p_data,
+                                          output_data);
 
   return updated_cell_similarity;
 }
@@ -305,23 +301,18 @@ MappingQ<dim,spacedim>::fill_fe_values (
 
 template<int dim, int spacedim>
 void
-MappingQ<dim,spacedim>::fill_fe_face_values (
-  const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-  const unsigned int                face_no,
-  const Quadrature<dim-1>          &q,
-  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-  std::vector<Point<spacedim> >    &quadrature_points,
-  std::vector<double>              &JxW_values,
-  std::vector<Tensor<1,spacedim> > &exterior_forms,
-  std::vector<Point<spacedim> >    &normal_vectors,
-  std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-  std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const
+MappingQ<dim,spacedim>::
+fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                     const unsigned int                                         face_no,
+                     const Quadrature<dim-1>                                   &quadrature,
+                     const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                     FEValuesData<dim,spacedim>                                &output_data) const
 {
   // convert data object to internal data for this class. fails with an
   // exception if that is not possible
-  Assert (dynamic_cast<const InternalData *> (&mapping_data) != 0,
+  Assert (dynamic_cast<const InternalData *> (&internal_data) != 0,
           ExcInternalError());
-  const InternalData &data = static_cast<const InternalData &> (mapping_data);
+  const InternalData &data = static_cast<const InternalData &> (internal_data);
 
   // check whether this cell needs the full mapping or can be treated by a
   // reduced Q1 mapping, e.g. if the cell is entirely in the interior of the
@@ -341,7 +332,7 @@ MappingQ<dim,spacedim>::fill_fe_face_values (
        :
        &data);
 
-  const unsigned int n_q_points=q.size();
+  const unsigned int n_q_points = quadrature.size();
   this->compute_fill_face (cell, face_no, numbers::invalid_unsigned_int,
                            n_q_points,
                            QProjector<dim>::DataSetDescriptor::
@@ -350,33 +341,32 @@ MappingQ<dim,spacedim>::fill_fe_face_values (
                                  cell->face_flip(face_no),
                                  cell->face_rotation(face_no),
                                  n_q_points),
-                           q.get_weights(),
+                           quadrature.get_weights(),
                            *p_data,
-                           quadrature_points, JxW_values,
-                           exterior_forms, normal_vectors, jacobians,
-                           inverse_jacobians);
+                           output_data.quadrature_points,
+                           output_data.JxW_values,
+                           output_data.boundary_forms,
+                           output_data.normal_vectors,
+                           output_data.jacobians,
+                           output_data.inverse_jacobians);
 }
 
 
 template<int dim, int spacedim>
 void
-MappingQ<dim,spacedim>::fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                                                const unsigned int       face_no,
-                                                const unsigned int       sub_no,
-                                                const Quadrature<dim-1> &q,
-                                                const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-                                                std::vector<Point<spacedim> >     &quadrature_points,
-                                                std::vector<double>          &JxW_values,
-                                                std::vector<Tensor<1,spacedim> >  &exterior_forms,
-                                                std::vector<Point<spacedim> >     &normal_vectors,
-                                                std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-                                                std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const
+MappingQ<dim,spacedim>::
+fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                        const unsigned int                                         face_no,
+                        const unsigned int                                         subface_no,
+                        const Quadrature<dim-1>                                   &quadrature,
+                        const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                        FEValuesData<dim,spacedim>                                &output_data) const
 {
   // convert data object to internal data for this class. fails with an
   // exception if that is not possible
-  Assert (dynamic_cast<const InternalData *> (&mapping_data) != 0,
+  Assert (dynamic_cast<const InternalData *> (&internal_data) != 0,
           ExcInternalError());
-  const InternalData &data = static_cast<const InternalData &> (mapping_data);
+  const InternalData &data = static_cast<const InternalData &> (internal_data);
 
   // check whether this cell needs the full mapping or can be treated by a
   // reduced Q1 mapping, e.g. if the cell is entirely in the interior of the
@@ -396,21 +386,24 @@ MappingQ<dim,spacedim>::fill_fe_subface_values (const typename Triangulation<dim
        :
        &data);
 
-  const unsigned int n_q_points=q.size();
-  this->compute_fill_face (cell, face_no, sub_no,
+  const unsigned int n_q_points = quadrature.size();
+  this->compute_fill_face (cell, face_no, subface_no,
                            n_q_points,
                            QProjector<dim>::DataSetDescriptor::
-                           subface (face_no, sub_no,
+                           subface (face_no, subface_no,
                                     cell->face_orientation(face_no),
                                     cell->face_flip(face_no),
                                     cell->face_rotation(face_no),
                                     n_q_points,
                                     cell->subface_case(face_no)),
-                           q.get_weights(),
+                           quadrature.get_weights(),
                            *p_data,
-                           quadrature_points, JxW_values,
-                           exterior_forms, normal_vectors, jacobians,
-                           inverse_jacobians);
+                           output_data.quadrature_points,
+                           output_data.JxW_values,
+                           output_data.boundary_forms,
+                           output_data.normal_vectors,
+                           output_data.jacobians,
+                           output_data.inverse_jacobians);
 }
 
 
index 9aca842d5831828ddedcdc0c3f60d51eaea12dd4..c4cb6be7fb1d13566ee6f7b3b5efc658343baf14 100644 (file)
@@ -734,31 +734,27 @@ MappingQ1<dim,spacedim>::compute_mapping_support_points(
 
 template<int dim, int spacedim>
 CellSimilarity::Similarity
-MappingQ1<dim,spacedim>::fill_fe_values (
-  const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-  const Quadrature<dim>                        &q,
-  const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-  std::vector<Point<spacedim> >                &quadrature_points,
-  std::vector<double>                          &JxW_values,
-  std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-  std::vector<DerivativeForm<2,dim,spacedim> > &jacobian_grads,
-  std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians,
-  std::vector<Point<spacedim> >                &normal_vectors,
-  const CellSimilarity::Similarity                   cell_similarity) const
+MappingQ1<dim,spacedim>::
+fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                const CellSimilarity::Similarity                           cell_similarity,
+                const Quadrature<dim>                                     &quadrature,
+                const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                FEValuesData<dim,spacedim>                                &output_data) const
 {
   // ensure that the following static_cast is really correct:
-  Assert (dynamic_cast<const InternalData *>(&mapping_data) != 0,
+  Assert (dynamic_cast<const InternalData *>(&internal_data) != 0,
           ExcInternalError());
-  const InternalData &data = static_cast<const InternalData &>(mapping_data);
+  const InternalData &data = static_cast<const InternalData &>(internal_data);
 
-  const unsigned int n_q_points=q.size();
+  const unsigned int n_q_points=quadrature.size();
 
   compute_fill (cell, n_q_points, DataSetDescriptor::cell (), cell_similarity,
-                data, quadrature_points);
+                data,
+                output_data.quadrature_points);
 
 
   const UpdateFlags update_flags(data.current_update_flags());
-  const std::vector<double> &weights=q.get_weights();
+  const std::vector<double> &weights=quadrature.get_weights();
 
   // Multiply quadrature weights by absolute value of Jacobian determinants or
   // the area element g=sqrt(DX^t DX) in case of codim > 0
@@ -766,11 +762,11 @@ MappingQ1<dim,spacedim>::fill_fe_values (
   if (update_flags & (update_normal_vectors
                       | update_JxW_values))
     {
-      AssertDimension (JxW_values.size(), n_q_points);
+      AssertDimension (output_data.JxW_values.size(), n_q_points);
 
       Assert( !(update_flags & update_normal_vectors ) ||
-              (normal_vectors.size() == n_q_points),
-              ExcDimensionMismatch(normal_vectors.size(), n_q_points));
+              (output_data.normal_vectors.size() == n_q_points),
+              ExcDimensionMismatch(output_data.normal_vectors.size(), n_q_points));
 
 
       if (cell_similarity != CellSimilarity::translation)
@@ -790,7 +786,7 @@ MappingQ1<dim,spacedim>::fill_fe_values (
                                                                 std::sqrt(double(dim))),
                         (typename Mapping<dim,spacedim>::ExcDistortedMappedCell(cell->center(), det, point)));
 
-                JxW_values[point] = weights[point] * det;
+                output_data.JxW_values[point] = weights[point] * det;
               }
             // if dim==spacedim, then there is no cell normal to
             // compute. since this is for FEValues (and not FEFaceValues),
@@ -807,14 +803,14 @@ MappingQ1<dim,spacedim>::fill_fe_values (
                   for (unsigned int j=0; j<dim; ++j)
                     G[i][j] = DX_t[i] * DX_t[j];
 
-                JxW_values[point]
+                output_data.JxW_values[point]
                   = sqrt(determinant(G)) * weights[point];
 
                 if (cell_similarity == CellSimilarity::inverted_translation)
                   {
                     // we only need to flip the normal
                     if (update_flags & update_normal_vectors)
-                      normal_vectors[point] *= -1.;
+                      output_data.normal_vectors[point] *= -1.;
                   }
                 else
                   {
@@ -826,15 +822,15 @@ MappingQ1<dim,spacedim>::fill_fe_values (
                         Assert( codim==1 , ExcMessage("There is no cell normal in codim 2."));
 
                         if (dim==1)
-                          cross_product(normal_vectors[point],
+                          cross_product(output_data.normal_vectors[point],
                                         -DX_t[0]);
                         else //dim == 2
-                          cross_product(normal_vectors[point],DX_t[0],DX_t[1]);
+                          cross_product(output_data.normal_vectors[point],DX_t[0],DX_t[1]);
 
-                        normal_vectors[point] /= normal_vectors[point].norm();
+                        output_data.normal_vectors[point] /= output_data.normal_vectors[point].norm();
 
                         if (cell->direction_flag() == false)
-                          normal_vectors[point] *= -1.;
+                          output_data.normal_vectors[point] *= -1.;
                       }
 
                   }
@@ -848,23 +844,23 @@ MappingQ1<dim,spacedim>::fill_fe_values (
   // copy values from InternalData to vector given by reference
   if (update_flags & update_jacobians)
     {
-      AssertDimension (jacobians.size(), n_q_points);
+      AssertDimension (output_data.jacobians.size(), n_q_points);
       if (cell_similarity != CellSimilarity::translation)
         for (unsigned int point=0; point<n_q_points; ++point)
-          jacobians[point] = data.contravariant[point];
+          output_data.jacobians[point] = data.contravariant[point];
     }
 
   // calculate values of the derivatives of the Jacobians. do it here, since
   // we only do it for cells, not faces.
   if (update_flags & update_jacobian_grads)
     {
-      AssertDimension (jacobian_grads.size(), n_q_points);
+      AssertDimension (output_data.jacobian_grads.size(), n_q_points);
 
       if (cell_similarity != CellSimilarity::translation)
         {
 
-          std::fill(jacobian_grads.begin(),
-                    jacobian_grads.end(),
+          std::fill(output_data.jacobian_grads.begin(),
+                    output_data.jacobian_grads.end(),
                     DerivativeForm<2,dim,spacedim>());
 
 
@@ -894,17 +890,17 @@ MappingQ1<dim,spacedim>::fill_fe_values (
               for (unsigned int i=0; i<spacedim; ++i)
                 for (unsigned int j=0; j<dim; ++j)
                   for (unsigned int l=0; l<dim; ++l)
-                    jacobian_grads[point][i][j][l] = result[i][j][l];
+                    output_data.jacobian_grads[point][i][j][l] = result[i][j][l];
             }
         }
     }
   // copy values from InternalData to vector given by reference
   if (update_flags & update_inverse_jacobians)
     {
-      AssertDimension (inverse_jacobians.size(), n_q_points);
+      AssertDimension (output_data.inverse_jacobians.size(), n_q_points);
       if (cell_similarity != CellSimilarity::translation)
         for (unsigned int point=0; point<n_q_points; ++point)
-          inverse_jacobians[point] = data.covariant[point].transpose();
+          output_data.inverse_jacobians[point] = data.covariant[point].transpose();
     }
 
   return cell_similarity;
@@ -1094,23 +1090,18 @@ template<int dim, int spacedim>
 void
 MappingQ1<dim,spacedim>::
 fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                     const unsigned int                               face_no,
-                     const Quadrature<dim-1>                          &q,
-                     const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-                     std::vector<Point<spacedim> >                    &quadrature_points,
-                     std::vector<double>                              &JxW_values,
-                     std::vector<Tensor<1,spacedim> >                 &boundary_forms,
-                     std::vector<Point<spacedim> >                    &normal_vectors,
-                     std::vector<DerivativeForm<1,dim,spacedim> >     &jacobians,
-                     std::vector<DerivativeForm<1,spacedim,dim> >     &inverse_jacobians) const
+                     const unsigned int                                         face_no,
+                     const Quadrature<dim-1>                                   &quadrature,
+                     const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                     FEValuesData<dim,spacedim>                                &output_data) const
 {
   // ensure that the following cast
   // is really correct:
-  Assert (dynamic_cast<const InternalData *>(&mapping_data) != 0,
+  Assert (dynamic_cast<const InternalData *>(&internal_data) != 0,
           ExcInternalError());
-  const InternalData &data = static_cast<const InternalData &>(mapping_data);
+  const InternalData &data = static_cast<const InternalData &>(internal_data);
 
-  const unsigned int n_q_points = q.size();
+  const unsigned int n_q_points = quadrature.size();
 
   compute_fill_face (cell, face_no, numbers::invalid_unsigned_int,
                      n_q_points,
@@ -1119,14 +1110,14 @@ fill_fe_face_values (const typename Triangulation<dim,spacedim>::cell_iterator &
                                               cell->face_flip(face_no),
                                               cell->face_rotation(face_no),
                                               n_q_points),
-                     q.get_weights(),
+                     quadrature.get_weights(),
                      data,
-                     quadrature_points,
-                     JxW_values,
-                     boundary_forms,
-                     normal_vectors,
-                     jacobians,
-                     inverse_jacobians);
+                     output_data.quadrature_points,
+                     output_data.JxW_values,
+                     output_data.boundary_forms,
+                     output_data.normal_vectors,
+                     output_data.jacobians,
+                     output_data.inverse_jacobians);
 }
 
 
@@ -1135,41 +1126,36 @@ template<int dim, int spacedim>
 void
 MappingQ1<dim,spacedim>::
 fill_fe_subface_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-                        const unsigned int       face_no,
-                        const unsigned int       sub_no,
-                        const Quadrature<dim-1> &q,
-                        const typename Mapping<dim,spacedim>::InternalDataBase &mapping_data,
-                        std::vector<Point<spacedim> >     &quadrature_points,
-                        std::vector<double>               &JxW_values,
-                        std::vector<Tensor<1,spacedim> >  &boundary_forms,
-                        std::vector<Point<spacedim> >     &normal_vectors,
-                        std::vector<DerivativeForm<1,dim,spacedim> > &jacobians,
-                        std::vector<DerivativeForm<1,spacedim,dim> > &inverse_jacobians) const
+                        const unsigned int                                         face_no,
+                        const unsigned int                                         subface_no,
+                        const Quadrature<dim-1>                                   &quadrature,
+                        const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                        FEValuesData<dim,spacedim>                                &output_data) const
 {
   // ensure that the following cast
   // is really correct:
-  Assert (dynamic_cast<const InternalData *>(&mapping_data) != 0,
+  Assert (dynamic_cast<const InternalData *>(&internal_data) != 0,
           ExcInternalError());
-  const InternalData &data = static_cast<const InternalData &>(mapping_data);
+  const InternalData &data = static_cast<const InternalData &>(internal_data);
 
-  const unsigned int n_q_points = q.size();
+  const unsigned int n_q_points = quadrature.size();
 
-  compute_fill_face (cell, face_no, sub_no,
+  compute_fill_face (cell, face_no, subface_no,
                      n_q_points,
-                     DataSetDescriptor::subface (face_no, sub_no,
+                     DataSetDescriptor::subface (face_no, subface_no,
                                                  cell->face_orientation(face_no),
                                                  cell->face_flip(face_no),
                                                  cell->face_rotation(face_no),
                                                  n_q_points,
                                                  cell->subface_case(face_no)),
-                     q.get_weights(),
+                     quadrature.get_weights(),
                      data,
-                     quadrature_points,
-                     JxW_values,
-                     boundary_forms,
-                     normal_vectors,
-                     jacobians,
-                     inverse_jacobians);
+                     output_data.quadrature_points,
+                     output_data.JxW_values,
+                     output_data.boundary_forms,
+                     output_data.normal_vectors,
+                     output_data.jacobians,
+                     output_data.inverse_jacobians);
 }
 
 
index dc7a768dd83cb35f40c6609f5f65da959f649e37..0903bd44da6286afe6cafb523fbbcdacaba3c51d 100644 (file)
@@ -112,26 +112,21 @@ MappingQ1Eulerian<dim, EulerVectorType, spacedim>::clone () const
 
 template<int dim, class EulerVectorType, int spacedim>
 CellSimilarity::Similarity
-MappingQ1Eulerian<dim,EulerVectorType,spacedim>::fill_fe_values (
-  const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-  const Quadrature<dim>                                     &q,
-  typename Mapping<dim,spacedim>::InternalDataBase          &mapping_data,
-  std::vector<Point<spacedim> >                             &quadrature_points,
-  std::vector<double>                                       &JxW_values,
-  std::vector< DerivativeForm<1,dim,spacedim>   >              &jacobians,
-  std::vector<DerivativeForm<2,dim,spacedim>    >   &jacobian_grads,
-  std::vector<DerivativeForm<1,spacedim,dim>    >   &inverse_jacobians,
-  std::vector<Point<spacedim> >                             &normal_vectors,
-  const CellSimilarity::Similarity) const
+MappingQ1Eulerian<dim,EulerVectorType,spacedim>::
+fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                const CellSimilarity::Similarity                           ,
+                const Quadrature<dim>                                     &quadrature,
+                const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                FEValuesData<dim,spacedim>                                &output_data) const
 {
   // call the function of the base class, but ignoring
   // any potentially detected cell similarity between
   // the current and the previous cell
-  MappingQ1<dim,spacedim>::fill_fe_values (cell, q, mapping_data,
-                                           quadrature_points, JxW_values, jacobians,
-                                           jacobian_grads, inverse_jacobians,
-                                           normal_vectors,
-                                           CellSimilarity::invalid_next_cell);
+  MappingQ1<dim,spacedim>::fill_fe_values (cell,
+                                           CellSimilarity::invalid_next_cell,
+                                           quadrature,
+                                           internal_data,
+                                           output_data);
   // also return the updated flag since any detected
   // similarity wasn't based on the mapped field, but
   // the original vertices which are meaningless
index 69444b69944e905e252fc106cf9e5cbb672145a2..47f74528c6028b2049e4d293029a1dd4f22d8e23 100644 (file)
@@ -177,26 +177,21 @@ compute_mapping_support_points
 
 template<int dim, class EulerVectorType, int spacedim>
 CellSimilarity::Similarity
-MappingQEulerian<dim,EulerVectorType,spacedim>::fill_fe_values (
-  const typename Triangulation<dim,spacedim>::cell_iterator &cell,
-  const Quadrature<dim>                                     &q,
-  typename Mapping<dim,spacedim>::InternalDataBase          &mapping_data,
-  std::vector<Point<spacedim> >                             &quadrature_points,
-  std::vector<double>                                       &JxW_values,
-  std::vector<DerivativeForm<1,dim,spacedim> >       &jacobians,
-  std::vector<DerivativeForm<2,dim,spacedim>  >     &jacobian_grads,
-  std::vector<DerivativeForm<1,spacedim,dim>  >     &inverse_jacobians,
-  std::vector<Point<spacedim> >                             &normal_vectors,
-  const CellSimilarity::Similarity                           ) const
+MappingQEulerian<dim,EulerVectorType,spacedim>::
+fill_fe_values (const typename Triangulation<dim,spacedim>::cell_iterator &cell,
+                const CellSimilarity::Similarity                           ,
+                const Quadrature<dim>                                     &quadrature,
+                const typename Mapping<dim,spacedim>::InternalDataBase    &internal_data,
+                FEValuesData<dim,spacedim>                                &output_data) const
 {
   // call the function of the base class, but ignoring
   // any potentially detected cell similarity between
   // the current and the previous cell
-  MappingQ<dim,spacedim>::fill_fe_values (cell, q, mapping_data,
-                                          quadrature_points, JxW_values, jacobians,
-                                          jacobian_grads, inverse_jacobians,
-                                          normal_vectors,
-                                          CellSimilarity::invalid_next_cell);
+  MappingQ<dim,spacedim>::fill_fe_values (cell,
+                                          CellSimilarity::invalid_next_cell,
+                                          quadrature,
+                                          internal_data,
+                                          output_data);
   // also return the updated flag since any detected
   // similarity wasn't based on the mapped field, but
   // the original vertices which are meaningless

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.