]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add an output data object to FE::get_*_data(). 1860/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 10 Nov 2015 21:31:21 +0000 (15:31 -0600)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 10 Nov 2015 21:40:49 +0000 (15:40 -0600)
This allows finite elements to already fill certain output data elements
at the time the get_data() function is called, rather than having to later
figure out whether this is the first time (or not) they get into
fill_fe_*_values().

In its current form, the patch only adds that possibility to passing the
same output object to FiniteElement::get_*_data() that will later be used
when FiniteElement::fill_fe_*_values() will be called. The patch does not
actually implement any of the elements using this -- I will leave this
to a later patch addressing #1824.

13 files changed:
include/deal.II/fe/fe.h
include/deal.II/fe/fe_dgp_nonparametric.h
include/deal.II/fe/fe_face.h
include/deal.II/fe/fe_nothing.h
include/deal.II/fe/fe_poly.h
include/deal.II/fe/fe_poly_face.h
include/deal.II/fe/fe_poly_tensor.h
include/deal.II/fe/fe_system.h
source/fe/fe.cc
source/fe/fe_dgp_nonparametric.cc
source/fe/fe_nothing.cc
source/fe/fe_system.cc
source/fe/fe_values.cc

index 1afbc4bfec2d34a09659a230e60840303d33ccdc..4fd17ef699a917b3d322da14de3ce441897651c1 100644 (file)
@@ -2202,10 +2202,12 @@ protected:
    * FEValues can be found in the @ref FE_vs_Mapping_vs_FEValues documentation
    * module.
    */
-  virtual InternalDataBase *
-  get_data (const UpdateFlags      flags,
-            const Mapping<dim,spacedim>    &mapping,
-            const Quadrature<dim> &quadrature) const = 0;
+  virtual
+  InternalDataBase *
+  get_data (const UpdateFlags                                                    update_flags,
+            const Mapping<dim,spacedim>                                         &mapping,
+            const Quadrature<dim>                                               &quadrature,
+            dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const = 0;
 
   /**
    * Prepare internal data structure for transformation of faces and fill in
@@ -2222,10 +2224,12 @@ protected:
    * FEValues can be found in the @ref FE_vs_Mapping_vs_FEValues documentation
    * module.
    */
-  virtual InternalDataBase *
-  get_face_data (const UpdateFlags        flags,
-                 const Mapping<dim,spacedim>      &mapping,
-                 const Quadrature<dim-1> &quadrature) const;
+  virtual
+  InternalDataBase *
+  get_face_data (const UpdateFlags                                                    update_flags,
+                 const Mapping<dim,spacedim>                                         &mapping,
+                 const Quadrature<dim-1>                                             &quadrature,
+                 dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
 
   /**
    * Prepare internal data structure for transformation of children of faces
@@ -2242,10 +2246,12 @@ protected:
    * FEValues can be found in the @ref FE_vs_Mapping_vs_FEValues documentation
    * module.
    */
-  virtual InternalDataBase *
-  get_subface_data (const UpdateFlags        flags,
-                    const Mapping<dim,spacedim>      &mapping,
-                    const Quadrature<dim-1> &quadrature) const;
+  virtual
+  InternalDataBase *
+  get_subface_data (const UpdateFlags                                                    update_flags,
+                    const Mapping<dim,spacedim>                                         &mapping,
+                    const Quadrature<dim-1>                                             &quadrature,
+                    dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
 
   /**
    * Compute information about the shape functions on the cell denoted
index 33d2b6472474081a6f2b503447911bad8c252040..b695616e82313079cb8e3a94696c3c70e6023cbc 100644 (file)
@@ -530,9 +530,10 @@ protected:
    */
   virtual
   typename FiniteElement<dim,spacedim>::InternalDataBase *
-  get_data (const UpdateFlags,
-            const Mapping<dim,spacedim> &mapping,
-            const Quadrature<dim> &quadrature) const;
+  get_data (const UpdateFlags                                                    update_flags,
+            const Mapping<dim,spacedim>                                         &mapping,
+            const Quadrature<dim>                                               &quadrature,
+            dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
 
   virtual
   void
index 973af22f080bbcea9f8b69324fe93c5ecf80d993..f9fe8fcaba87f4037ead64d763023f437d65ef7d 100644 (file)
@@ -240,9 +240,10 @@ protected:
 
   virtual
   typename FiniteElement<1,spacedim>::InternalDataBase *
-  get_data (const UpdateFlags,
-            const Mapping<1,spacedim> &/*mapping*/,
-            const Quadrature<1> &/*quadrature*/) const
+  get_data (const UpdateFlags                                                  /*update_flags*/,
+            const Mapping<1,spacedim>                                         &/*mapping*/,
+            const Quadrature<1>                                               &/*quadrature*/,
+            dealii::internal::FEValues::FiniteElementRelatedData<1, spacedim> &/*output_data*/) const
   {
     return new typename FiniteElement<1, spacedim>::InternalDataBase;
   }
@@ -250,7 +251,8 @@ protected:
   typename FiniteElement<1,spacedim>::InternalDataBase *
   get_face_data(const UpdateFlags update_flags,
                 const Mapping<1,spacedim> &/*mapping*/,
-                const Quadrature<0> &quadrature) const
+                const Quadrature<0> &quadrature,
+                dealii::internal::FEValues::FiniteElementRelatedData<1, spacedim> &/*output_data*/) const
   {
     // generate a new data object and initialize some fields
     typename FiniteElement<1,spacedim>::InternalDataBase *data =
@@ -271,11 +273,12 @@ protected:
   }
 
   typename FiniteElement<1,spacedim>::InternalDataBase *
-  get_subface_data(const UpdateFlags update_flags,
-                   const Mapping<1,spacedim> &mapping,
-                   const Quadrature<0> &quadrature) const
+  get_subface_data(const UpdateFlags                                                  update_flags,
+                   const Mapping<1,spacedim>                                         &mapping,
+                   const Quadrature<0>                                               &quadrature,
+                   dealii::internal::FEValues::FiniteElementRelatedData<1, spacedim> &output_data) const
   {
-    return get_face_data(update_flags, mapping, quadrature);
+    return get_face_data(update_flags, mapping, quadrature, output_data);
   }
 
   virtual
index 90e3ce9567dc4c458aafd6a8eeaba3d326fb2bbe..765a705ef0e97a770719e968ee4dc46329db2416 100644 (file)
@@ -174,9 +174,10 @@ public:
    */
   virtual
   typename FiniteElement<dim,spacedim>::InternalDataBase *
-  get_data (const UpdateFlags     update_flags,
-            const Mapping<dim,spacedim>     &mapping,
-            const Quadrature<dim> &quadrature) const;
+  get_data (const UpdateFlags                                                    update_flags,
+            const Mapping<dim,spacedim>                                         &mapping,
+            const Quadrature<dim>                                               &quadrature,
+            dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
 
   /**
    * Return whether this element dominates the one given as argument when they
index 43ba79eb3e47e4cfaae5219ac1fba2a213422ceb..b74c75cb62f092cbd4b61df9c4d91a388736af92 100644 (file)
@@ -220,9 +220,10 @@ protected:
 
   virtual
   typename FiniteElement<dim,spacedim>::InternalDataBase *
-  get_data(const UpdateFlags update_flags,
-           const Mapping<dim,spacedim> &/*mapping*/,
-           const Quadrature<dim> &quadrature) const
+  get_data(const UpdateFlags                                                    update_flags,
+           const Mapping<dim,spacedim>                                         &/*mapping*/,
+           const Quadrature<dim>                                               &quadrature,
+           dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &/*output_data*/) const
   {
     // generate a new data object and
     // initialize some fields
index 9454af99fdfd14adf54bc6549d4897af13a0828b..4e53f7408b5d8b0c88f6561d14397208876c24ef 100644 (file)
@@ -88,18 +88,20 @@ protected:
 
   virtual
   typename FiniteElement<dim,spacedim>::InternalDataBase *
-  get_data (const UpdateFlags /*update_flags*/,
-            const Mapping<dim,spacedim> &/*mapping*/,
-            const Quadrature<dim> &/*quadrature*/) const
+  get_data (const UpdateFlags                                                    /*update_flags*/,
+            const Mapping<dim,spacedim>                                         &/*mapping*/,
+            const Quadrature<dim>                                               &/*quadrature*/,
+            dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &/*output_data*/) const
   {
     InternalData *data = new InternalData;
     return data;
   }
 
   typename FiniteElement<dim,spacedim>::InternalDataBase *
-  get_face_data(const UpdateFlags update_flags,
-                const Mapping<dim,spacedim> &/*mapping*/,
-                const Quadrature<dim-1>& quadrature) const
+  get_face_data(const UpdateFlags                                                    update_flags,
+                const Mapping<dim,spacedim>                                         &/*mapping*/,
+                const Quadrature<dim-1>                                             &quadrature,
+                dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &/*output_data*/) const
   {
     // generate a new data object and
     // initialize some fields
@@ -145,12 +147,14 @@ protected:
   }
 
   typename FiniteElement<dim,spacedim>::InternalDataBase *
-  get_subface_data(const UpdateFlags update_flags,
-                   const Mapping<dim,spacedim> &mapping,
-                   const Quadrature<dim-1>& quadrature) const
+  get_subface_data(const UpdateFlags                                                    update_flags,
+                   const Mapping<dim,spacedim>                                         &mapping,
+                   const Quadrature<dim-1>                                             &quadrature,
+                   dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const
   {
     return get_face_data(update_flags, mapping,
-                         QProjector<dim - 1>::project_to_all_children(quadrature));
+                         QProjector<dim - 1>::project_to_all_children(quadrature),
+                         output_data);
   }
 
   virtual
index 33ec7876acaccbc2e07a8811bd1bf9d6a875441b..2fb7e5c70338c63bb5c3b04a046d5f0107bbdbbf 100644 (file)
@@ -187,9 +187,10 @@ protected:
      because we otherwise run into a compiler error with MS Visual Studio. */
   virtual
   typename FiniteElement<dim,spacedim>::InternalDataBase *
-  get_data(const UpdateFlags update_flags,
-           const Mapping<dim,spacedim> &,
-           const Quadrature<dim> &quadrature) const
+  get_data(const UpdateFlags                                                    update_flags,
+           const Mapping<dim,spacedim>                                         &/*mapping*/,
+           const Quadrature<dim>                                               &quadrature,
+           dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &/*output_data*/) const
   {
     // generate a new data object and
     // initialize some fields
index 4b64df4fbf9ab9108b3a4f7534c9b07b3533d5f4..869809e0f197dc894a496a71e4e75535fac0ebe8 100644 (file)
@@ -861,20 +861,26 @@ protected:
    */
   virtual FiniteElement<dim,spacedim> *clone() const;
 
-  virtual typename FiniteElement<dim,spacedim>::InternalDataBase *
-  get_data (const UpdateFlags      update_flags,
-            const Mapping<dim,spacedim>    &mapping,
-            const Quadrature<dim> &quadrature) const;
 
   virtual typename FiniteElement<dim,spacedim>::InternalDataBase *
-  get_face_data (const UpdateFlags      update_flags,
-                 const Mapping<dim,spacedim>    &mapping,
-                 const Quadrature<dim-1> &quadrature) const;
+  get_data (const UpdateFlags                                                    update_flags,
+            const Mapping<dim,spacedim>                                         &mapping,
+            const Quadrature<dim>                                               &quadrature,
+            dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
 
-  virtual typename FiniteElement<dim,spacedim>::InternalDataBase *
-  get_subface_data (const UpdateFlags      update_flags,
-                    const Mapping<dim,spacedim>    &mapping,
-                    const Quadrature<dim-1> &quadrature) const;
+  virtual
+  typename FiniteElement<dim,spacedim>::InternalDataBase *
+  get_face_data (const UpdateFlags                                                    update_flags,
+                 const Mapping<dim,spacedim>                                         &mapping,
+                 const Quadrature<dim-1>                                             &quadrature,
+                 dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
+
+  virtual
+  typename FiniteElement<dim,spacedim>::InternalDataBase *
+  get_subface_data (const UpdateFlags                                                    update_flags,
+                    const Mapping<dim,spacedim>                                         &mapping,
+                    const Quadrature<dim-1>                                             &quadrature,
+                    dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const;
 
   virtual
   void
index 8107ac7e5fcd2f7421a6c239f2ce8f55b77b5792..a1f110493d2ad084e54033cebee17c1374e33e5d 100644 (file)
@@ -1207,10 +1207,12 @@ template <int dim, int spacedim>
 typename FiniteElement<dim,spacedim>::InternalDataBase *
 FiniteElement<dim,spacedim>::get_face_data (const UpdateFlags       flags,
                                             const Mapping<dim,spacedim>      &mapping,
-                                            const Quadrature<dim-1> &quadrature) const
+                                            const Quadrature<dim-1> &quadrature,
+                                            dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const
 {
   return get_data (flags, mapping,
-                   QProjector<dim>::project_to_all_faces(quadrature));
+                   QProjector<dim>::project_to_all_faces(quadrature),
+                   output_data);
 }
 
 
@@ -1219,10 +1221,12 @@ template <int dim, int spacedim>
 typename FiniteElement<dim,spacedim>::InternalDataBase *
 FiniteElement<dim,spacedim>::get_subface_data (const UpdateFlags        flags,
                                                const Mapping<dim,spacedim>      &mapping,
-                                               const Quadrature<dim-1> &quadrature) const
+                                               const Quadrature<dim-1> &quadrature,
+                                               dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &output_data) const
 {
   return get_data (flags, mapping,
-                   QProjector<dim>::project_to_all_subfaces(quadrature));
+                   QProjector<dim>::project_to_all_subfaces(quadrature),
+                   output_data);
 }
 
 
index f66cfb0b6bb77b6229fac806ece2d62a3104f135..b12b7dd6bd5a143c26e821ae2ce6b60e1ffaec85 100644 (file)
@@ -258,10 +258,11 @@ FE_DGPNonparametric<dim,spacedim>::update_each (const UpdateFlags flags) const
 
 template <int dim, int spacedim>
 typename FiniteElement<dim,spacedim>::InternalDataBase *
-FE_DGPNonparametric<dim,spacedim>::get_data (
-  const UpdateFlags      update_flags,
-  const Mapping<dim,spacedim> &,
-  const Quadrature<dim> &) const
+FE_DGPNonparametric<dim,spacedim>::
+get_data (const UpdateFlags                                                    update_flags,
+          const Mapping<dim,spacedim> &,
+          const Quadrature<dim> &,
+          dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &/*output_data*/) const
 {
   // generate a new data object
   typename FiniteElement<dim,spacedim>::InternalDataBase *data = new typename FiniteElement<dim,spacedim>::InternalDataBase;
index f4a7f96db5094c86e0b1a3a7430fcd3e5ab6e574..3ed5782264b12c38bae96cb6dd30d5862531da2a 100644 (file)
@@ -93,9 +93,10 @@ FE_Nothing<dim,spacedim>::shape_value (const unsigned int /*i*/,
 
 template <int dim, int spacedim>
 typename FiniteElement<dim,spacedim>::InternalDataBase *
-FE_Nothing<dim,spacedim>::get_data (const UpdateFlags  /*flags*/,
-                                    const Mapping<dim,spacedim> & /*mapping*/,
-                                    const Quadrature<dim> & /*quadrature*/) const
+FE_Nothing<dim,spacedim>::get_data (const UpdateFlags                                                    /*update_flags*/,
+                                    const Mapping<dim,spacedim>                                         &/*mapping*/,
+                                    const Quadrature<dim>                                               &/*quadrature*/,
+                                    dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &/*output_data*/) const
 {
   // Create a default data object.  Normally we would then
   // need to resize things to hold the appropriate numbers
index 34b97c49d39a1dbf81119cafb95fab0190d3b80d..f50d3a2f62ed5decd99c545834728dab9741d718 100644 (file)
@@ -858,9 +858,11 @@ FESystem<dim,spacedim>::requires_update_flags (const UpdateFlags flags) const
 
 template <int dim, int spacedim>
 typename FiniteElement<dim,spacedim>::InternalDataBase *
-FESystem<dim,spacedim>::get_data (const UpdateFlags      flags,
-                                  const Mapping<dim,spacedim>    &mapping,
-                                  const Quadrature<dim> &quadrature) const
+FESystem<dim,spacedim>::
+get_data (const UpdateFlags                                                    flags,
+          const Mapping<dim,spacedim>                                         &mapping,
+          const Quadrature<dim>                                               &quadrature,
+          dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &/*output_data*/) const
 {
   // create an internal data object and set the update flags we will need
   // to deal with. the current object does not make use of these flags,
@@ -886,13 +888,20 @@ FESystem<dim,spacedim>::get_data (const UpdateFlags      flags,
   // function is called
   for (unsigned int base_no=0; base_no<this->n_base_elements(); ++base_no)
     {
-      typename FiniteElement<dim,spacedim>::InternalDataBase *base_fe_data =
-        base_element(base_no).get_data (flags, mapping, quadrature);
-
       internal::FEValues::FiniteElementRelatedData<dim,spacedim> &base_fe_output_object
         = data->get_fe_output_object(base_no);
       base_fe_output_object.initialize (quadrature.size(), base_element(base_no),
-                                        flags | base_fe_data->update_each);
+                                        flags | base_element(base_no).requires_update_flags(flags));
+
+      // let base objects produce their scratch objects. they may
+      // also at this time write into the output objects we provide
+      // for them; it would be nice if we could already copy something
+      // out of the base output object into the system output object,
+      // but we can't because we can't know what the elements already
+      // copied and/or will want to update on every cell
+      typename FiniteElement<dim,spacedim>::InternalDataBase *base_fe_data =
+        base_element(base_no).get_data (flags, mapping, quadrature,
+                                        base_fe_output_object);
 
       data->set_fe_data(base_no, base_fe_data);
     }
@@ -905,9 +914,11 @@ FESystem<dim,spacedim>::get_data (const UpdateFlags      flags,
 
 template <int dim, int spacedim>
 typename FiniteElement<dim,spacedim>::InternalDataBase *
-FESystem<dim,spacedim>::get_face_data (const UpdateFlags      flags,
-                                       const Mapping<dim,spacedim>    &mapping,
-                                       const Quadrature<dim-1> &quadrature) const
+FESystem<dim,spacedim>::
+get_face_data (const UpdateFlags                                                    flags,
+               const Mapping<dim,spacedim>                                         &mapping,
+               const Quadrature<dim-1>                                             &quadrature,
+               dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &/*output_data*/) const
 {
   // create an internal data object and set the update flags we will need
   // to deal with. the current object does not make use of these flags,
@@ -933,13 +944,20 @@ FESystem<dim,spacedim>::get_face_data (const UpdateFlags      flags,
   // function is called
   for (unsigned int base_no=0; base_no<this->n_base_elements(); ++base_no)
     {
-      typename FiniteElement<dim,spacedim>::InternalDataBase *base_fe_data =
-        base_element(base_no).get_face_data (flags, mapping, quadrature);
-
       internal::FEValues::FiniteElementRelatedData<dim,spacedim> &base_fe_output_object
         = data->get_fe_output_object(base_no);
       base_fe_output_object.initialize (quadrature.size(), base_element(base_no),
-                                        flags | base_fe_data->update_each);
+                                        flags | base_element(base_no).requires_update_flags(flags));
+
+      // let base objects produce their scratch objects. they may
+      // also at this time write into the output objects we provide
+      // for them; it would be nice if we could already copy something
+      // out of the base output object into the system output object,
+      // but we can't because we can't know what the elements already
+      // copied and/or will want to update on every cell
+      typename FiniteElement<dim,spacedim>::InternalDataBase *base_fe_data =
+        base_element(base_no).get_face_data (flags, mapping, quadrature,
+                                             base_fe_output_object);
 
       data->set_fe_data(base_no, base_fe_data);
     }
@@ -954,9 +972,11 @@ FESystem<dim,spacedim>::get_face_data (const UpdateFlags      flags,
 
 template <int dim, int spacedim>
 typename FiniteElement<dim,spacedim>::InternalDataBase *
-FESystem<dim,spacedim>::get_subface_data (const UpdateFlags      flags,
-                                          const Mapping<dim,spacedim>    &mapping,
-                                          const Quadrature<dim-1> &quadrature) const
+FESystem<dim,spacedim>::
+get_subface_data (const UpdateFlags                                                    flags,
+                  const Mapping<dim,spacedim>                                         &mapping,
+                  const Quadrature<dim-1>                                             &quadrature,
+                  dealii::internal::FEValues::FiniteElementRelatedData<dim, spacedim> &/*output_data*/) const
 {
   // create an internal data object and set the update flags we will need
   // to deal with. the current object does not make use of these flags,
@@ -982,13 +1002,20 @@ FESystem<dim,spacedim>::get_subface_data (const UpdateFlags      flags,
   // function is called
   for (unsigned int base_no=0; base_no<this->n_base_elements(); ++base_no)
     {
-      typename FiniteElement<dim,spacedim>::InternalDataBase *base_fe_data =
-        base_element(base_no).get_subface_data (flags, mapping, quadrature);
-
       internal::FEValues::FiniteElementRelatedData<dim,spacedim> &base_fe_output_object
         = data->get_fe_output_object(base_no);
       base_fe_output_object.initialize (quadrature.size(), base_element(base_no),
-                                        flags | base_fe_data->update_each);
+                                        flags | base_element(base_no).requires_update_flags(flags));
+
+      // let base objects produce their scratch objects. they may
+      // also at this time write into the output objects we provide
+      // for them; it would be nice if we could already copy something
+      // out of the base output object into the system output object,
+      // but we can't because we can't know what the elements already
+      // copied and/or will want to update on every cell
+      typename FiniteElement<dim,spacedim>::InternalDataBase *base_fe_data =
+        base_element(base_no).get_subface_data (flags, mapping, quadrature,
+                                                base_fe_output_object);
 
       data->set_fe_data(base_no, base_fe_data);
     }
index 7cf2f8bfd8773ea067052c5302de0d61442238e2..e800b2cdbfb8055de73a0aad8319563e3252cfe8 100644 (file)
@@ -3631,6 +3631,10 @@ FEValues<dim,spacedim>::initialize (const UpdateFlags update_flags)
 
   const UpdateFlags flags = this->compute_update_flags (update_flags);
 
+  // initialize the base classes
+  this->mapping_output.initialize(this->n_quadrature_points, flags);
+  this->finite_element_output.initialize(this->n_quadrature_points, *this->fe, flags);
+
   // then get objects into which the FE and the Mapping can store
   // intermediate data used across calls to reinit. we can do this in parallel
   Threads::Task<typename FiniteElement<dim,spacedim>::InternalDataBase *>
@@ -3638,17 +3642,14 @@ FEValues<dim,spacedim>::initialize (const UpdateFlags update_flags)
                                    *this->fe,
                                    flags,
                                    *this->mapping,
-                                   quadrature);
+                                   quadrature,
+                                   this->finite_element_output);
   Threads::Task<typename Mapping<dim,spacedim>::InternalDataBase *>
   mapping_get_data = Threads::new_task (&Mapping<dim,spacedim>::get_data,
                                         *this->mapping,
                                         flags,
                                         quadrature);
 
-  // initialize the base classes
-  this->mapping_output.initialize(this->n_quadrature_points, flags);
-  this->finite_element_output.initialize(this->n_quadrature_points, *this->fe, flags);
-
   this->update_flags = flags;
 
   // then collect answers from the two task above
@@ -3869,6 +3870,10 @@ FEFaceValues<dim,spacedim>::initialize (const UpdateFlags update_flags)
 {
   const UpdateFlags flags = this->compute_update_flags (update_flags);
 
+  // initialize the base classes
+  this->mapping_output.initialize(this->n_quadrature_points, flags);
+  this->finite_element_output.initialize(this->n_quadrature_points, *this->fe, flags);
+
   // then get objects into which the FE and the Mapping can store
   // intermediate data used across calls to reinit. this can be done in parallel
   Threads::Task<typename FiniteElement<dim,spacedim>::InternalDataBase *>
@@ -3876,17 +3881,14 @@ FEFaceValues<dim,spacedim>::initialize (const UpdateFlags update_flags)
                                    *this->fe,
                                    flags,
                                    *this->mapping,
-                                   this->quadrature);
+                                   this->quadrature,
+                                   this->finite_element_output);
   Threads::Task<typename Mapping<dim,spacedim>::InternalDataBase *>
   mapping_get_data = Threads::new_task (&Mapping<dim,spacedim>::get_face_data,
                                         *this->mapping,
                                         flags,
                                         this->quadrature);
 
-  // initialize the base classes
-  this->mapping_output.initialize(this->n_quadrature_points, flags);
-  this->finite_element_output.initialize(this->n_quadrature_points, *this->fe, flags);
-
   this->update_flags = flags;
 
   // then collect answers from the two task above
@@ -4024,6 +4026,10 @@ FESubfaceValues<dim,spacedim>::initialize (const UpdateFlags update_flags)
 {
   const UpdateFlags flags = this->compute_update_flags (update_flags);
 
+  // initialize the base classes
+  this->mapping_output.initialize(this->n_quadrature_points, flags);
+  this->finite_element_output.initialize(this->n_quadrature_points, *this->fe, flags);
+
   // then get objects into which the FE and the Mapping can store
   // intermediate data used across calls to reinit. this can be done
   // in parallel
@@ -4032,17 +4038,14 @@ FESubfaceValues<dim,spacedim>::initialize (const UpdateFlags update_flags)
                                    *this->fe,
                                    flags,
                                    *this->mapping,
-                                   this->quadrature);
+                                   this->quadrature,
+                                   this->finite_element_output);
   Threads::Task<typename Mapping<dim,spacedim>::InternalDataBase *>
   mapping_get_data = Threads::new_task (&Mapping<dim,spacedim>::get_subface_data,
                                         *this->mapping,
                                         flags,
                                         this->quadrature);
 
-  // initialize the base classes
-  this->mapping_output.initialize(this->n_quadrature_points, flags);
-  this->finite_element_output.initialize(this->n_quadrature_points, *this->fe, flags);
-
   this->update_flags = flags;
 
   // then collect answers from the two task above

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.