]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove second template argument in FEEvaluationBaseData
authorMartin Kronbichler <martin.kronbichler@it.uu.se>
Fri, 10 Dec 2021 14:13:32 +0000 (15:13 +0100)
committerMartin Kronbichler <martin.kronbichler@it.uu.se>
Sat, 11 Dec 2021 11:14:22 +0000 (12:14 +0100)
Rename FEEvaluationBaseData to FEEvaluationData.

15 files changed:
include/deal.II/fe/mapping_q_internal.h
include/deal.II/matrix_free/evaluation_kernels.h
include/deal.II/matrix_free/evaluation_selector.h
include/deal.II/matrix_free/evaluation_template_factory.h
include/deal.II/matrix_free/evaluation_template_factory.templates.h
include/deal.II/matrix_free/fe_evaluation.h
include/deal.II/matrix_free/fe_evaluation_data.h [moved from include/deal.II/matrix_free/fe_evaluation_base_data.h with 76% similarity]
include/deal.II/matrix_free/mapping_data_on_the_fly.h
include/deal.II/matrix_free/mapping_info.h
include/deal.II/matrix_free/mapping_info.templates.h
include/deal.II/matrix_free/mapping_info_storage.h
include/deal.II/matrix_free/mapping_info_storage.templates.h
include/deal.II/matrix_free/operators.h
source/matrix_free/evaluation_template_factory.inst.in
source/matrix_free/mapping_info.inst.in

index 1fed26230cda4f767d91dc3b217732635c5195a0..49c4268f4f9ac77110b3b259f408dc79b1f71ac3 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <deal.II/matrix_free/evaluation_flags.h>
 #include <deal.II/matrix_free/evaluation_template_factory.h>
-#include <deal.II/matrix_free/fe_evaluation_base_data.h>
+#include <deal.II/matrix_free/fe_evaluation_data.h>
 #include <deal.II/matrix_free/mapping_info_storage.h>
 #include <deal.II/matrix_free/shape_info.h>
 #include <deal.II/matrix_free/tensor_product_kernels.h>
@@ -1131,11 +1131,11 @@ namespace internal
         }
 
       internal::MatrixFreeFunctions::
-        MappingInfoStorage<dim, dim, double, VectorizedArrayType>
+        MappingInfoStorage<dim, dim, VectorizedArrayType>
           temp_data;
       temp_data.descriptor.resize(1);
       temp_data.descriptor[0].n_q_points = n_q_points;
-      FEEvaluationBaseData<dim, double, false, VectorizedArrayType> eval(
+      FEEvaluationData<dim, VectorizedArrayType, false> eval(
         {&data.shape_info, nullptr, &temp_data, 0, 0});
 
       // prepare arrays
@@ -1156,8 +1156,8 @@ namespace internal
               }
 
           // do the actual tensorized evaluation
-          internal::FEEvaluationFactory<dim, double, VectorizedArrayType>::
-            evaluate(n_comp, evaluation_flag, eval.begin_dof_values(), eval);
+          internal::FEEvaluationFactory<dim, VectorizedArrayType>::evaluate(
+            n_comp, evaluation_flag, eval.begin_dof_values(), eval);
         }
 
       // do the postprocessing
index 576187616bbb0db4124321f542f28fe6d40d9820..f2b01daf1ddf0ac86ec70bb1b4dda67595ebb530 100644 (file)
 
 #include <deal.II/matrix_free/dof_info.h>
 #include <deal.II/matrix_free/evaluation_flags.h>
-#include <deal.II/matrix_free/fe_evaluation_base_data.h>
+#include <deal.II/matrix_free/fe_evaluation_data.h>
 #include <deal.II/matrix_free/hanging_nodes_internal.h>
 #include <deal.II/matrix_free/shape_info.h>
 #include <deal.II/matrix_free/tensor_product_kernels.h>
-#include <deal.II/matrix_free/type_traits.h>
 
 
 DEAL_II_NAMESPACE_OPEN
@@ -121,20 +120,17 @@ namespace internal
                                         n_q_points_1d,
                                         Number>;
 
-    using EvaluationData =
-      FEEvaluationBaseData<dim, typename Number::value_type, false, Number>;
-
     static void
     evaluate(const unsigned int                     n_components,
              const EvaluationFlags::EvaluationFlags evaluation_flag,
              const Number *                         values_dofs_actual,
-             EvaluationData &                       eval);
+             FEEvaluationData<dim, Number, false> & eval);
 
     static void
     integrate(const unsigned int                     n_components,
               const EvaluationFlags::EvaluationFlags integration_flag,
               Number *                               values_dofs_actual,
-              EvaluationData &                       eval,
+              FEEvaluationData<dim, Number, false> & eval,
               const bool                             add_into_values_array);
 
     static Eval
@@ -170,20 +166,17 @@ namespace internal
                           n_q_points_1d,
                           Number>
   {
-    using EvaluationData =
-      FEEvaluationBaseData<dim, typename Number::value_type, false, Number>;
-
     static void
     evaluate(const unsigned int                     n_components,
              const EvaluationFlags::EvaluationFlags evaluation_flag,
              const Number *                         values_dofs_actual,
-             EvaluationData &                       eval);
+             FEEvaluationData<dim, Number, false> & eval);
 
     static void
     integrate(const unsigned int                     n_components,
               const EvaluationFlags::EvaluationFlags integration_flag,
               Number *                               values_dofs_actual,
-              EvaluationData &                       eval,
+              FEEvaluationData<dim, Number, false> & eval,
               const bool                             add_into_values_array);
   };
 
@@ -199,7 +192,7 @@ namespace internal
     const unsigned int                     n_components,
     const EvaluationFlags::EvaluationFlags evaluation_flag,
     const Number *                         values_dofs_actual,
-    EvaluationData &                       eval)
+    FEEvaluationData<dim, Number, false> & eval)
   {
     if (evaluation_flag == EvaluationFlags::nothing)
       return;
@@ -249,10 +242,10 @@ namespace internal
     const Number *values_dofs = values_dofs_actual;
     if (type == MatrixFreeFunctions::truncated_tensor)
       {
-        const std::size_t stored_dofs_per_comp =
+        const std::size_t n_dofs_per_comp =
           eval.get_shape_info().dofs_per_component_on_cell;
         Number *values_dofs_tmp =
-          temp1 + 2 * (std::max(stored_dofs_per_comp, n_q_points));
+          temp1 + 2 * (std::max(n_dofs_per_comp, n_q_points));
         const int degree =
           fe_degree != -1 ? fe_degree : shape_data[0].fe_degree;
         for (unsigned int c = 0; c < n_components; ++c)
@@ -265,7 +258,7 @@ namespace internal
                   for (int k = 0; k < degree + 1 - j - i;
                        ++k, ++count_p, ++count_q)
                     values_dofs_tmp[c * dofs_per_comp + count_q] =
-                      values_dofs_actual[c * stored_dofs_per_comp + count_p];
+                      values_dofs_actual[c * n_dofs_per_comp + count_p];
                   for (int k = degree + 1 - j - i; k < degree + 1;
                        ++k, ++count_q)
                     values_dofs_tmp[c * dofs_per_comp + count_q] = Number();
@@ -472,7 +465,7 @@ namespace internal
     const unsigned int                     n_components,
     const EvaluationFlags::EvaluationFlags integration_flag,
     Number *                               values_dofs_actual,
-    EvaluationData &                       eval,
+    FEEvaluationData<dim, Number, false> & eval,
     const bool                             add_into_values_array)
   {
     std::array<const MatrixFreeFunctions::UnivariateShapeData<Number> *, 3>
@@ -509,7 +502,7 @@ namespace internal
         temp2 = temp1 + temp_size;
       }
 
-    const unsigned int n_q_points = temp_size == 0 ?
+    const std::size_t  n_q_points = temp_size == 0 ?
                                       eval.get_shape_info().n_q_points :
                                       Eval::n_columns_of_product;
     const unsigned int dofs_per_comp =
@@ -519,8 +512,9 @@ namespace internal
     // expand dof_values to tensor product for truncated tensor products
     Number *values_dofs =
       (type == MatrixFreeFunctions::truncated_tensor) ?
-        temp1 + 2 * (std::max(eval.get_shape_info().dofs_per_component_on_cell,
-                              n_q_points)) :
+        temp1 +
+          2 * (std::max<std::size_t>(
+                eval.get_shape_info().dofs_per_component_on_cell, n_q_points)) :
         values_dofs_actual;
 
     Number *values_quad    = eval.begin_values();
@@ -750,7 +744,7 @@ namespace internal
 
     if (type == MatrixFreeFunctions::truncated_tensor)
       {
-        const std::size_t stored_dofs_per_comp =
+        const std::size_t n_dofs_per_comp =
           eval.get_shape_info().dofs_per_component_on_cell;
         values_dofs -= dofs_per_comp * n_components;
         const int degree =
@@ -764,7 +758,7 @@ namespace internal
                 {
                   for (int k = 0; k < degree + 1 - j - i;
                        ++k, ++count_p, ++count_q)
-                    values_dofs_actual[c * stored_dofs_per_comp + count_p] =
+                    values_dofs_actual[c * n_dofs_per_comp + count_p] =
                       values_dofs[c * dofs_per_comp + count_q];
                   count_q += j + i;
                 }
@@ -783,13 +777,12 @@ namespace internal
                    n_q_points_1d,
                    Number>::evaluate(const unsigned int n_components,
                                      const EvaluationFlags::EvaluationFlags
-                                                     evaluation_flag,
-                                     const Number *  values_dofs_actual,
-                                     EvaluationData &eval)
+                                                   evaluation_flag,
+                                     const Number *values_dofs_actual,
+                                     FEEvaluationData<dim, Number, false> &eval)
   {
-    const unsigned int n_dofs =
-      eval.get_shape_info().dofs_per_component_on_cell;
-    const unsigned int n_q_points = eval.get_shape_info().n_q_points;
+    const std::size_t n_dofs = eval.get_shape_info().dofs_per_component_on_cell;
+    const std::size_t n_q_points = eval.get_shape_info().n_q_points;
 
     const auto &shape_data = eval.get_shape_info().data;
 
@@ -846,24 +839,23 @@ namespace internal
 
   template <int dim, int fe_degree, int n_q_points_1d, typename Number>
   inline void
-  FEEvaluationImpl<MatrixFreeFunctions::tensor_none,
-                   dim,
-                   fe_degree,
-                   n_q_points_1d,
-                   Number>::integrate(const unsigned int n_components,
-                                      const EvaluationFlags::EvaluationFlags
-                                                      integration_flag,
-                                      Number *        values_dofs_actual,
-                                      EvaluationData &eval,
-                                      const bool      add_into_values_array)
+  FEEvaluationImpl<
+    MatrixFreeFunctions::tensor_none,
+    dim,
+    fe_degree,
+    n_q_points_1d,
+    Number>::integrate(const unsigned int                     n_components,
+                       const EvaluationFlags::EvaluationFlags integration_flag,
+                       Number *                              values_dofs_actual,
+                       FEEvaluationData<dim, Number, false> &eval,
+                       const bool add_into_values_array)
   {
     // TODO: implement hessians
     AssertThrow(!(integration_flag & EvaluationFlags::hessians),
                 ExcNotImplemented());
 
-    const unsigned int n_dofs =
-      eval.get_shape_info().dofs_per_component_on_cell;
-    const unsigned int n_q_points = eval.get_shape_info().n_q_points;
+    const std::size_t n_dofs = eval.get_shape_info().dofs_per_component_on_cell;
+    const std::size_t n_q_points = eval.get_shape_info().n_q_points;
 
     const auto &shape_data = eval.get_shape_info().data;
 
@@ -1340,14 +1332,11 @@ namespace internal
   template <int dim, int fe_degree, typename Number>
   struct FEEvaluationImplCollocation
   {
-    using EvaluationData =
-      FEEvaluationBaseData<dim, typename Number::value_type, false, Number>;
-
     static void
     evaluate(const unsigned int                     n_components,
              const EvaluationFlags::EvaluationFlags evaluation_flag,
              const Number *                         values_dofs,
-             EvaluationData &                       eval);
+             FEEvaluationData<dim, Number, false> & eval);
 
     static void
     do_evaluate(const MatrixFreeFunctions::UnivariateShapeData<Number> &shape,
@@ -1360,7 +1349,7 @@ namespace internal
     integrate(const unsigned int                     n_components,
               const EvaluationFlags::EvaluationFlags integration_flag,
               Number *                               values_dofs,
-              EvaluationData &                       eval,
+              FEEvaluationData<dim, Number, false> & eval,
               const bool                             add_into_values_array);
 
     static void
@@ -1380,7 +1369,7 @@ namespace internal
     const unsigned int                     n_components,
     const EvaluationFlags::EvaluationFlags evaluation_flag,
     const Number *                         values_dofs,
-    EvaluationData &                       eval)
+    FEEvaluationData<dim, Number, false> & eval)
   {
     constexpr std::size_t n_points = Utilities::pow(fe_degree + 1, dim);
 
@@ -1468,7 +1457,7 @@ namespace internal
     const unsigned int                     n_components,
     const EvaluationFlags::EvaluationFlags integration_flag,
     Number *                               values_dofs,
-    EvaluationData &                       eval,
+    FEEvaluationData<dim, Number, false> & eval,
     const bool                             add_into_values_array)
   {
     constexpr std::size_t n_points = Utilities::pow(fe_degree + 1, dim);
@@ -1617,20 +1606,17 @@ namespace internal
   template <int dim, int fe_degree, int n_q_points_1d, typename Number>
   struct FEEvaluationImplTransformToCollocation
   {
-    using EvaluationData =
-      FEEvaluationBaseData<dim, typename Number::value_type, false, Number>;
-
     static void
     evaluate(const unsigned int                     n_components,
              const EvaluationFlags::EvaluationFlags evaluation_flag,
              const Number *                         values_dofs,
-             EvaluationData &                       eval);
+             FEEvaluationData<dim, Number, false> & eval);
 
     static void
     integrate(const unsigned int                     n_components,
               const EvaluationFlags::EvaluationFlags evaluation_flag,
               Number *                               values_dofs,
-              EvaluationData &                       eval,
+              FEEvaluationData<dim, Number, false> & eval,
               const bool                             add_into_values_array);
   };
 
@@ -1645,7 +1631,7 @@ namespace internal
     Number>::evaluate(const unsigned int                     n_components,
                       const EvaluationFlags::EvaluationFlags evaluation_flag,
                       const Number *                         values_dofs,
-                      EvaluationData &                       eval)
+                      FEEvaluationData<dim, Number, false> & eval)
   {
     const auto &shape_data = eval.get_shape_info().data[0];
 
@@ -1654,6 +1640,7 @@ namespace internal
                       "of lower degree, so the evaluation results would be "
                       "wrong. Thus, this class does not permit the desired "
                       "operation."));
+    constexpr std::size_t n_dofs     = Utilities::pow(fe_degree + 1, dim);
     constexpr std::size_t n_q_points = Utilities::pow(n_q_points_1d, dim);
 
     for (unsigned int c = 0; c < n_components; ++c)
@@ -1667,8 +1654,7 @@ namespace internal
           Number,
           Number>::do_forward(1,
                               shape_data.shape_values_eo,
-                              values_dofs +
-                                c * Utilities::pow(fe_degree + 1, dim),
+                              values_dofs + c * n_dofs,
                               eval.begin_values() + c * n_q_points);
 
         // apply derivatives in the collocation space
@@ -1696,7 +1682,7 @@ namespace internal
     Number>::integrate(const unsigned int                     n_components,
                        const EvaluationFlags::EvaluationFlags integration_flag,
                        Number *                               values_dofs,
-                       EvaluationData &                       eval,
+                       FEEvaluationData<dim, Number, false> & eval,
                        const bool add_into_values_array)
   {
     const auto &shape_data = eval.get_shape_info().data[0];
@@ -1706,7 +1692,7 @@ namespace internal
                       "of lower degree, so the evaluation results would be "
                       "wrong. Thus, this class does not permit the desired "
                       "operation."));
-    constexpr unsigned int n_q_points = Utilities::pow(n_q_points_1d, dim);
+    constexpr std::size_t n_q_points = Utilities::pow(n_q_points_1d, dim);
 
     for (unsigned int c = 0; c < n_components; ++c)
       {
@@ -1743,6 +1729,22 @@ namespace internal
 
 
 
+  /**
+   * Helper function to specify whether transformation to collocation should
+   * be used: It should give correct results (first condition), we need to be
+   * able to initialize the fields in shape_info.templates.h from the
+   * polynomials (second condition), and it should be the most efficient
+   * choice in terms of operation counts (third condition).
+   */
+  constexpr bool
+  use_collocation_evaluation(const unsigned int fe_degree,
+                             const unsigned int n_q_points_1d)
+  {
+    return (n_q_points_1d > fe_degree) && (n_q_points_1d < 200) &&
+           (n_q_points_1d <= 3 * fe_degree / 2 + 1);
+  }
+
+
   /**
    * This class chooses an appropriate evaluation strategy based on the
    * template parameters and the shape_info variable which contains runtime
@@ -1766,21 +1768,11 @@ namespace internal
     run(const unsigned int                     n_components,
         const EvaluationFlags::EvaluationFlags evaluation_flag,
         const Number *                         values_dofs,
-        FEEvaluationBaseData<dim, typename Number::value_type, false, Number>
-          &eval)
+        FEEvaluationData<dim, Number, false> & eval)
     {
       const auto element_type = eval.get_shape_info().element_type;
       using ElementType       = internal::MatrixFreeFunctions::ElementType;
 
-      // We enable a transformation to collocation for derivatives if it gives
-      // correct results (first condition), if it is the most efficient choice
-      // in terms of operation counts (second condition) and if we were able to
-      // initialize the fields in shape_info.templates.h from the polynomials
-      // (third condition).
-      constexpr bool use_collocation = (n_q_points_1d > fe_degree) &&
-                                       (n_q_points_1d < 200) &&
-                                       (n_q_points_1d <= 3 * fe_degree / 2 + 1);
-
       Assert(eval.get_shape_info().data.size() == 1 ||
                (eval.get_shape_info().data.size() == dim &&
                 element_type == ElementType::tensor_general),
@@ -1794,7 +1786,8 @@ namespace internal
         }
       // '<=' on type means tensor_symmetric or tensor_symmetric_hermite, see
       // shape_info.h for more details
-      else if (fe_degree >= 0 && use_collocation &&
+      else if (fe_degree >= 0 &&
+               use_collocation_evaluation(fe_degree, n_q_points_1d) &&
                element_type <= ElementType::tensor_symmetric)
         {
           internal::FEEvaluationImplTransformToCollocation<
@@ -1888,22 +1881,12 @@ namespace internal
     run(const unsigned int                     n_components,
         const EvaluationFlags::EvaluationFlags integration_flag,
         Number *                               values_dofs,
-        FEEvaluationBaseData<dim, typename Number::value_type, false, Number>
-          &        eval,
-        const bool sum_into_values_array)
+        FEEvaluationData<dim, Number, false> & eval,
+        const bool                             sum_into_values_array)
     {
       const auto element_type = eval.get_shape_info().element_type;
       using ElementType       = internal::MatrixFreeFunctions::ElementType;
 
-      // We enable a transformation to collocation for derivatives if it gives
-      // correct results (first condition), if it is the most efficient choice
-      // in terms of operation counts (second condition) and if we were able to
-      // initialize the fields in shape_info.templates.h from the polynomials
-      // (third condition).
-      constexpr bool use_collocation = (n_q_points_1d > fe_degree) &&
-                                       (n_q_points_1d < 200) &&
-                                       (n_q_points_1d <= 3 * fe_degree / 2 + 1);
-
       Assert(eval.get_shape_info().data.size() == 1 ||
                (eval.get_shape_info().data.size() == dim &&
                 element_type == ElementType::tensor_general),
@@ -1921,7 +1904,8 @@ namespace internal
         }
       // '<=' on type means tensor_symmetric or tensor_symmetric_hermite, see
       // shape_info.h for more details
-      else if (fe_degree >= 0 && use_collocation &&
+      else if (fe_degree >= 0 &&
+               use_collocation_evaluation(fe_degree, n_q_points_1d) &&
                element_type <= ElementType::tensor_symmetric)
         {
           internal::FEEvaluationImplTransformToCollocation<
@@ -2013,10 +1997,6 @@ namespace internal
     // choice in terms of operation counts (third condition) and if we were
     // able to initialize the fields in shape_info.templates.h from the
     // polynomials (fourth condition).
-    static constexpr bool use_collocation =
-      symmetric_evaluate && (n_q_points_1d > fe_degree) &&
-      (n_q_points_1d < 200) && (n_q_points_1d <= 3 * fe_degree / 2 + 1);
-
     using Eval =
       EvaluatorTensorProduct<symmetric_evaluate ? internal::evaluate_evenodd :
                                                   internal::evaluate_general,
@@ -2025,9 +2005,6 @@ namespace internal
                              n_q_points_1d,
                              Number>;
 
-    using EvaluationData =
-      FEEvaluationBaseData<dim, typename Number::value_type, true, Number>;
-
     static Eval
     create_evaluator_tensor_product(
       const internal::MatrixFreeFunctions::UnivariateShapeData<Number> &data,
@@ -2073,9 +2050,9 @@ namespace internal
       Eval eval0 = create_evaluator_tensor_product(data, subface_index, 0);
       Eval eval1 = create_evaluator_tensor_product(data, subface_index, 1);
 
-      const std::size_t size_deg =
-        fe_degree > -1 ? Utilities::pow(fe_degree + 1, dim - 1) :
-                         Utilities::pow(data.fe_degree + 1, dim - 1);
+      const std::size_t n_dofs = fe_degree > -1 ?
+                                   Utilities::pow(fe_degree + 1, dim - 1) :
+                                   Utilities::pow(data.fe_degree + 1, dim - 1);
       const std::size_t n_q_points =
         fe_degree > -1 ? Utilities::pow(n_q_points_1d, dim - 1) :
                          Utilities::pow(data.n_q_points_1d, dim - 1);
@@ -2105,7 +2082,9 @@ namespace internal
                 default:
                   Assert(false, ExcNotImplemented());
               }
-            values_dofs += 3 * size_deg;
+            // Note: we always keep storage of values, 1st and 2nd derivatives
+            // in an array
+            values_dofs += 3 * n_dofs;
             values_quad += n_q_points;
           }
       else if (evaluation_flag & EvaluationFlags::gradients)
@@ -2114,7 +2093,8 @@ namespace internal
             switch (dim)
               {
                 case 3:
-                  if (use_collocation)
+                  if (symmetric_evaluate &&
+                      use_collocation_evaluation(fe_degree, n_q_points_1d))
                     {
                       eval0.template values<0, true, false>(values_dofs,
                                                             values_quad);
@@ -2154,14 +2134,14 @@ namespace internal
                                                               values_quad);
                     }
                   // grad z
-                  eval0.template values<0, true, false>(values_dofs + size_deg,
+                  eval0.template values<0, true, false>(values_dofs + n_dofs,
                                                         scratch_data);
                   eval1.template values<1, true, false>(
                     scratch_data, gradients_quad + (dim - 1) * n_q_points);
 
                   break;
                 case 2:
-                  eval0.template values<0, true, false>(values_dofs + size_deg,
+                  eval0.template values<0, true, false>(values_dofs + n_dofs,
                                                         gradients_quad +
                                                           n_q_points);
                   eval0.template gradients<0, true, false>(values_dofs,
@@ -2177,7 +2157,7 @@ namespace internal
                 default:
                   AssertThrow(false, ExcNotImplemented());
               }
-            values_dofs += 3 * size_deg;
+            values_dofs += 3 * n_dofs;
             values_quad += n_q_points;
             gradients_quad += dim * n_q_points;
           }
@@ -2205,7 +2185,7 @@ namespace internal
 
                     // grad zz
                     eval0.template values<0, true, false>(values_dofs +
-                                                            2 * size_deg,
+                                                            2 * n_dofs,
                                                           scratch_data);
                     eval1.template values<1, true, false>(scratch_data,
                                                           hessians_quad +
@@ -2220,15 +2200,14 @@ namespace internal
 
                     // grad xz
                     eval0.template gradients<0, true, false>(values_dofs +
-                                                               size_deg,
+                                                               n_dofs,
                                                              scratch_data);
                     eval1.template values<1, true, false>(scratch_data,
                                                           hessians_quad +
                                                             4 * n_q_points);
 
                     // grad yz
-                    eval0.template values<0, true, false>(values_dofs +
-                                                            size_deg,
+                    eval0.template values<0, true, false>(values_dofs + n_dofs,
                                                           scratch_data);
                     eval1.template gradients<1, true, false>(scratch_data,
                                                              hessians_quad +
@@ -2241,10 +2220,10 @@ namespace internal
                                                             hessians_quad);
                     // grad yy
                     eval0.template values<0, true, false>(
-                      values_dofs + 2 * size_deg, hessians_quad + n_q_points);
+                      values_dofs + 2 * n_dofs, hessians_quad + n_q_points);
                     // grad xy
                     eval0.template gradients<0, true, false>(
-                      values_dofs + size_deg, hessians_quad + 2 * n_q_points);
+                      values_dofs + n_dofs, hessians_quad + 2 * n_q_points);
                     break;
                   case 1:
                     hessians_quad[0] = values_dofs[2];
@@ -2252,7 +2231,7 @@ namespace internal
                   default:
                     AssertThrow(false, ExcNotImplemented());
                 }
-              values_dofs += 3 * size_deg;
+              values_dofs += 3 * n_dofs;
               hessians_quad += dim * (dim + 1) / 2 * n_q_points;
             }
         }
@@ -2273,7 +2252,7 @@ namespace internal
       Eval eval0 = create_evaluator_tensor_product(data, subface_index, 0);
       Eval eval1 = create_evaluator_tensor_product(data, subface_index, 1);
 
-      const std::size_t size_deg =
+      const std::size_t n_dofs =
         fe_degree > -1 ?
           Utilities::pow(fe_degree + 1, dim - 1) :
           (dim > 1 ? Utilities::fixed_power<dim - 1>(data.fe_degree + 1) : 1);
@@ -2306,7 +2285,7 @@ namespace internal
                 default:
                   Assert(false, ExcNotImplemented());
               }
-            values_dofs += 3 * size_deg;
+            values_dofs += 3 * n_dofs;
             values_quad += n_q_points;
           }
       else if (integration_flag & EvaluationFlags::gradients)
@@ -2320,9 +2299,11 @@ namespace internal
                                                            2 * n_q_points,
                                                          gradients_quad +
                                                            2 * n_q_points);
-                  eval0.template values<0, false, false>(
-                    gradients_quad + 2 * n_q_points, values_dofs + size_deg);
-                  if (use_collocation)
+                  eval0.template values<0, false, false>(gradients_quad +
+                                                           2 * n_q_points,
+                                                         values_dofs + n_dofs);
+                  if (symmetric_evaluate &&
+                      use_collocation_evaluation(fe_degree, n_q_points_1d))
                     {
                       internal::EvaluatorTensorProduct<
                         internal::evaluate_evenodd,
@@ -2371,8 +2352,9 @@ namespace internal
                     }
                   break;
                 case 2:
-                  eval0.template values<0, false, false>(
-                    gradients_quad + n_q_points, values_dofs + size_deg);
+                  eval0.template values<0, false, false>(gradients_quad +
+                                                           n_q_points,
+                                                         values_dofs + n_dofs);
                   eval0.template gradients<0, false, false>(gradients_quad,
                                                             values_dofs);
                   if (integration_flag & EvaluationFlags::values)
@@ -2386,7 +2368,7 @@ namespace internal
                 default:
                   AssertThrow(false, ExcNotImplemented());
               }
-            values_dofs += 3 * size_deg;
+            values_dofs += 3 * n_dofs;
             values_quad += n_q_points;
             gradients_quad += dim * n_q_points;
           }
@@ -2423,7 +2405,7 @@ namespace internal
                                                            scratch_data);
                     eval0.template values<0, false, false>(scratch_data,
                                                            values_dofs +
-                                                             2 * size_deg);
+                                                             2 * n_dofs);
 
                     // grad xy
                     eval1.template gradients<1, false, false>(hessians_quad +
@@ -2439,19 +2421,18 @@ namespace internal
                     if (integration_flag & EvaluationFlags::gradients)
                       eval0.template gradients<0, false, true>(scratch_data,
                                                                values_dofs +
-                                                                 size_deg);
+                                                                 n_dofs);
                     else
                       eval0.template gradients<0, false, false>(scratch_data,
                                                                 values_dofs +
-                                                                  size_deg);
+                                                                  n_dofs);
 
                     // grad yz
                     eval1.template gradients<1, false, false>(hessians_quad +
                                                                 5 * n_q_points,
                                                               scratch_data);
                     eval0.template values<0, false, true>(scratch_data,
-                                                          values_dofs +
-                                                            size_deg);
+                                                          values_dofs + n_dofs);
 
                     break;
                   case 2:
@@ -2466,14 +2447,14 @@ namespace internal
 
                     // grad yy
                     eval0.template values<0, false, false>(
-                      hessians_quad + n_q_points, values_dofs + 2 * size_deg);
+                      hessians_quad + n_q_points, values_dofs + 2 * n_dofs);
                     // grad xy
                     if (integration_flag & EvaluationFlags::gradients)
                       eval0.template gradients<0, false, true>(
-                        hessians_quad + 2 * n_q_points, values_dofs + size_deg);
+                        hessians_quad + 2 * n_q_points, values_dofs + n_dofs);
                     else
                       eval0.template gradients<0, false, false>(
-                        hessians_quad + 2 * n_q_points, values_dofs + size_deg);
+                        hessians_quad + 2 * n_q_points, values_dofs + n_dofs);
                     break;
                   case 1:
                     values_dofs[2] = hessians_quad[0];
@@ -2485,7 +2466,7 @@ namespace internal
                   default:
                     AssertThrow(false, ExcNotImplemented());
                 }
-              values_dofs += 3 * size_deg;
+              values_dofs += 3 * n_dofs;
               hessians_quad += dim * (dim + 1) / 2 * n_q_points;
             }
         }
@@ -2553,7 +2534,7 @@ namespace internal
 
   private:
     template <bool do_evaluate, bool add_into_output, int face_direction = 0>
-    static DEAL_II_ALWAYS_INLINE void
+    static void
     interpolate_generic(const unsigned int                     n_components,
                         const Number *                         input,
                         Number *                               output,
@@ -2804,8 +2785,7 @@ namespace internal
     run(const unsigned int                     n_components,
         const EvaluationFlags::EvaluationFlags evaluation_flag,
         const Number *                         values_dofs,
-        FEEvaluationBaseData<dim, typename Number::value_type, true, Number>
-          &eval)
+        FEEvaluationData<dim, Number, true> &  eval)
     {
       const auto &       data             = eval.get_shape_info();
       const auto &       shape_data       = data.data.front();
@@ -2814,8 +2794,8 @@ namespace internal
 
       if (data.element_type == MatrixFreeFunctions::tensor_none)
         {
-          const unsigned int n_dofs     = data.dofs_per_component_on_cell;
-          const unsigned int n_q_points = data.n_q_points_faces[face_no];
+          const std::size_t n_dofs     = data.dofs_per_component_on_cell;
+          const std::size_t n_q_points = data.n_q_points_faces[face_no];
 
           using Eval =
             EvaluatorTensorProduct<evaluate_general, 1, 0, 0, Number, Number>;
@@ -2878,6 +2858,8 @@ namespace internal
         fe_degree > -1 ? Utilities::pow(fe_degree + 1, dim - 1) :
                          Utilities::pow(shape_data.fe_degree + 1, dim - 1);
 
+      // Note: we always keep storage of values, 1st and 2nd derivatives in an
+      // array, so reserve space for all three here
       Number *temp         = eval.get_scratch_data().begin();
       Number *scratch_data = temp + 3 * n_components * dofs_per_face;
 
@@ -2947,8 +2929,7 @@ namespace internal
     run(const unsigned int                     n_components,
         const EvaluationFlags::EvaluationFlags integration_flag,
         Number *                               values_dofs,
-        FEEvaluationBaseData<dim, typename Number::value_type, true, Number>
-          &eval)
+        FEEvaluationData<dim, Number, true> &  eval)
     {
       const auto &       data             = eval.get_shape_info();
       const auto &       shape_data       = data.data.front();
@@ -2957,8 +2938,8 @@ namespace internal
 
       if (data.element_type == MatrixFreeFunctions::tensor_none)
         {
-          const unsigned int n_dofs     = data.dofs_per_component_on_cell;
-          const unsigned int n_q_points = data.n_q_points_faces[face_no];
+          const std::size_t n_dofs     = data.dofs_per_component_on_cell;
+          const std::size_t n_q_points = data.n_q_points_faces[face_no];
 
           using Eval =
             EvaluatorTensorProduct<evaluate_general, 1, 0, 0, Number, Number>;
@@ -3716,11 +3697,11 @@ namespace internal
   {
     template <int fe_degree, int n_q_points_1d>
     static bool
-    run(const unsigned int                          n_components,
-        const EvaluationFlags::EvaluationFlags      evaluation_flag,
-        const Number2 *                             src_ptr,
-        const std::vector<ArrayView<const Number>> *sm_ptr,
-        FEEvaluationBaseData<dim, Number, true, VectorizedArrayType> &eval)
+    run(const unsigned int                                n_components,
+        const EvaluationFlags::EvaluationFlags            evaluation_flag,
+        const Number2 *                                   src_ptr,
+        const std::vector<ArrayView<const Number>> *      sm_ptr,
+        FEEvaluationData<dim, VectorizedArrayType, true> &eval)
     {
       Assert(fe_degree > -1, ExcInternalError());
       Assert(eval.get_shape_info().element_type <=
@@ -3903,11 +3884,11 @@ namespace internal
   {
     template <int fe_degree, int n_q_points_1d>
     static bool
-    run(const unsigned int                           n_components,
-        const EvaluationFlags::EvaluationFlags       integration_flag,
-        Number2 *                                    dst_ptr,
-        const std::vector<ArrayView<const Number2>> *sm_ptr,
-        FEEvaluationBaseData<dim, Number, true, VectorizedArrayType> &eval)
+    run(const unsigned int                                n_components,
+        const EvaluationFlags::EvaluationFlags            integration_flag,
+        Number2 *                                         dst_ptr,
+        const std::vector<ArrayView<const Number2>> *     sm_ptr,
+        FEEvaluationData<dim, VectorizedArrayType, true> &eval)
     {
       Assert(fe_degree > -1, ExcInternalError());
       Assert(eval.get_shape_info().element_type <=
@@ -4070,20 +4051,17 @@ namespace internal
 
   /**
    * This struct implements the action of the inverse mass matrix operation
-   * using an FEEvaluationBaseData argument.
+   * using an FEEvaluationData argument.
    */
   template <int dim, typename Number>
   struct CellwiseInverseMassMatrixImplBasic
   {
     template <int fe_degree, int = 0>
     static bool
-    run(const unsigned int                  n_components,
-        const FEEvaluationBaseData<dim,
-                                   typename Number::value_type,
-                                   false,
-                                   Number> &fe_eval,
-        const Number *                      in_array,
-        Number *                            out_array,
+    run(const unsigned int                          n_components,
+        const FEEvaluationData<dim, Number, false> &fe_eval,
+        const Number *                              in_array,
+        Number *                                    out_array,
         typename std::enable_if<fe_degree != -1>::type * = nullptr)
     {
       constexpr unsigned int dofs_per_component =
@@ -4136,13 +4114,10 @@ namespace internal
 
     template <int fe_degree, int = 0>
     static bool
-    run(const unsigned int                  n_components,
-        const FEEvaluationBaseData<dim,
-                                   typename Number::value_type,
-                                   false,
-                                   Number> &fe_eval,
-        const Number *                      in_array,
-        Number *                            out_array,
+    run(const unsigned int                          n_components,
+        const FEEvaluationData<dim, Number, false> &fe_eval,
+        const Number *                              in_array,
+        Number *                                    out_array,
         typename std::enable_if<fe_degree == -1>::type * = nullptr)
     {
       static_assert(fe_degree == -1, "Only usable for degree -1");
@@ -4194,7 +4169,7 @@ namespace internal
 
   /**
    * This struct implements the action of the inverse mass matrix operation
-   * using an FEEvaluationBaseData argument.
+   * using an FEEvaluationData argument.
    */
   template <int dim, typename Number>
   struct CellwiseInverseMassMatrixImplFlexible
@@ -4281,20 +4256,17 @@ namespace internal
 
   /**
    * This struct implements the action of the inverse mass matrix operation
-   * using an FEEvaluationBaseData argument.
+   * using an FEEvaluationData argument.
    */
   template <int dim, typename Number>
   struct CellwiseInverseMassMatrixImplTransformFromQPoints
   {
     template <int fe_degree, int n_q_points_1d>
     static bool
-    run(const unsigned int                  n_desired_components,
-        const FEEvaluationBaseData<dim,
-                                   typename Number::value_type,
-                                   false,
-                                   Number> &fe_eval,
-        const Number *                      in_array,
-        Number *                            out_array)
+    run(const unsigned int                          n_desired_components,
+        const FEEvaluationData<dim, Number, false> &fe_eval,
+        const Number *                              in_array,
+        Number *                                    out_array)
     {
       static const bool do_inplace =
         fe_degree > -1 && (fe_degree + 1 == n_q_points_1d);
@@ -4308,12 +4280,12 @@ namespace internal
           fe_eval.get_shape_info().data.front().inverse_shape_values_eo :
           fe_eval.get_shape_info().data.front().inverse_shape_values;
 
-      const unsigned int dofs_per_component =
+      const std::size_t dofs_per_component =
         do_inplace ? Utilities::pow(fe_degree + 1, dim) :
                      fe_eval.get_shape_info().dofs_per_component_on_cell;
-      const unsigned int n_q_points = do_inplace ?
-                                        Utilities::pow(fe_degree + 1, dim) :
-                                        fe_eval.get_shape_info().n_q_points;
+      const std::size_t n_q_points = do_inplace ?
+                                       Utilities::pow(fe_degree + 1, dim) :
+                                       fe_eval.get_shape_info().n_q_points;
 
       internal::EvaluatorTensorProduct<do_inplace ? internal::evaluate_evenodd :
                                                     internal::evaluate_general,
index e46101578645c58f045762b4ae1c82d0a8faced0..23c071211689a9a13e529dcc7b3f0368d5c718be 100644 (file)
@@ -35,9 +35,6 @@ DEAL_II_NAMESPACE_OPEN
 template <int dim, int fe_degree, int n_q_points_1d, typename Number>
 struct SelectEvaluator
 {
-  using ScalarNumber =
-    typename internal::VectorizedArrayTrait<Number>::value_type;
-
   /**
    * Chooses an appropriate evaluation strategy for the evaluate function, i.e.
    * this calls internal::FEEvaluationImpl::evaluate(),
@@ -49,7 +46,7 @@ struct SelectEvaluator
   evaluate(const unsigned int                     n_components,
            const EvaluationFlags::EvaluationFlags evaluation_flag,
            const Number *                         values_dofs,
-           FEEvaluationBaseData<dim, ScalarNumber, false, Number> &eval);
+           FEEvaluationData<dim, Number, false> & eval);
 
   /**
    * Chooses an appropriate evaluation strategy for the integrate function, i.e.
@@ -62,7 +59,7 @@ struct SelectEvaluator
   integrate(const unsigned int                     n_components,
             const EvaluationFlags::EvaluationFlags integration_flag,
             Number *                               values_dofs,
-            FEEvaluationBaseData<dim, ScalarNumber, false, Number> &eval,
+            FEEvaluationData<dim, Number, false> & eval,
             const bool sum_into_values_array = false);
 };
 
@@ -72,10 +69,10 @@ struct SelectEvaluator
 template <int dim, int fe_degree, int n_q_points_1d, typename Number>
 inline void
 SelectEvaluator<dim, fe_degree, n_q_points_1d, Number>::evaluate(
-  const unsigned int                                      n_components,
-  const EvaluationFlags::EvaluationFlags                  evaluation_flag,
-  const Number *                                          values_dofs,
-  FEEvaluationBaseData<dim, ScalarNumber, false, Number> &eval)
+  const unsigned int                     n_components,
+  const EvaluationFlags::EvaluationFlags evaluation_flag,
+  const Number *                         values_dofs,
+  FEEvaluationData<dim, Number, false> & eval)
 {
   Assert(fe_degree >= 0 && n_q_points_1d > 0, ExcInternalError());
 
@@ -89,11 +86,11 @@ SelectEvaluator<dim, fe_degree, n_q_points_1d, Number>::evaluate(
 template <int dim, int fe_degree, int n_q_points_1d, typename Number>
 inline void
 SelectEvaluator<dim, fe_degree, n_q_points_1d, Number>::integrate(
-  const unsigned int                                      n_components,
-  const EvaluationFlags::EvaluationFlags                  integration_flag,
-  Number *                                                values_dofs,
-  FEEvaluationBaseData<dim, ScalarNumber, false, Number> &eval,
-  const bool                                              sum_into_values_array)
+  const unsigned int                     n_components,
+  const EvaluationFlags::EvaluationFlags integration_flag,
+  Number *                               values_dofs,
+  FEEvaluationData<dim, Number, false> & eval,
+  const bool                             sum_into_values_array)
 {
   Assert(fe_degree >= 0 && n_q_points_1d > 0, ExcInternalError());
 
index e0152471f7268204beb512553bc9483b9557077a..22c3591a66064d84de123787cf975777fb20d39f 100644 (file)
 DEAL_II_NAMESPACE_OPEN
 
 
-template <int, typename, bool, typename>
-class FEEvaluationBaseData;
+template <int, typename, bool>
+class FEEvaluationData;
 
 
 namespace internal
 {
-  template <int dim, typename Number, typename VectorizedArrayType>
+  template <int dim, typename Number>
   struct FEEvaluationFactory
   {
     static void
-    evaluate(
-      const unsigned int                     n_components,
-      const EvaluationFlags::EvaluationFlags evaluation_flag,
-      const VectorizedArrayType *            values_dofs,
-      FEEvaluationBaseData<dim, Number, false, VectorizedArrayType> &eval);
+    evaluate(const unsigned int                     n_components,
+             const EvaluationFlags::EvaluationFlags evaluation_flag,
+             const Number *                         values_dofs,
+             FEEvaluationData<dim, Number, false> & eval);
 
     static void
-    integrate(
-      const unsigned int                     n_components,
-      const EvaluationFlags::EvaluationFlags integration_flag,
-      VectorizedArrayType *                  values_dofs,
-      FEEvaluationBaseData<dim, Number, false, VectorizedArrayType> &eval,
-      const bool sum_into_values_array);
+    integrate(const unsigned int                     n_components,
+              const EvaluationFlags::EvaluationFlags integration_flag,
+              Number *                               values_dofs,
+              FEEvaluationData<dim, Number, false> & eval,
+              const bool                             sum_into_values_array);
 
     static bool
     fast_evaluation_supported(const unsigned int given_degree,
@@ -60,75 +58,69 @@ namespace internal
 
 
 
-  template <int dim,
-            typename Number,
-            typename VectorizedArrayType = VectorizedArray<Number>>
+  template <int dim, typename Number>
   struct FEFaceEvaluationFactory
   {
     static void
-    evaluate(
-      const unsigned int                     n_components,
-      const EvaluationFlags::EvaluationFlags evaluation_flag,
-      const VectorizedArrayType *            values_dofs,
-      FEEvaluationBaseData<dim, Number, true, VectorizedArrayType> &eval);
+    evaluate(const unsigned int                     n_components,
+             const EvaluationFlags::EvaluationFlags evaluation_flag,
+             const Number *                         values_dofs,
+             FEEvaluationData<dim, Number, true> &  eval);
 
     static void
-    integrate(
-      const unsigned int                     n_components,
-      const EvaluationFlags::EvaluationFlags integration_flag,
-      VectorizedArrayType *                  values_dofs,
-      FEEvaluationBaseData<dim, Number, true, VectorizedArrayType> &eval);
-
-    static void
-    gather_evaluate(
-      const unsigned int                          n_components,
-      const EvaluationFlags::EvaluationFlags      evaluation_flag,
-      const Number *                              src_ptr,
-      const std::vector<ArrayView<const Number>> *sm_ptr,
-      FEEvaluationBaseData<dim, Number, true, VectorizedArrayType> &eval);
-
-    static void
-    integrate_scatter(
-      const unsigned int                          n_components,
-      const EvaluationFlags::EvaluationFlags      integration_flag,
-      Number *                                    dst_ptr,
-      const std::vector<ArrayView<const Number>> *sm_ptr,
-      FEEvaluationBaseData<dim, Number, true, VectorizedArrayType> &eval);
+    integrate(const unsigned int                     n_components,
+              const EvaluationFlags::EvaluationFlags integration_flag,
+              Number *                               values_dofs,
+              FEEvaluationData<dim, Number, true> &  eval);
 
     static bool
     fast_evaluation_supported(const unsigned int given_degree,
                               const unsigned int n_q_points_1d);
   };
 
+  template <int dim, typename Number, typename VectorizedArrayType>
+  struct FEFaceEvaluationGatherFactory
+  {
+    static void
+    evaluate(const unsigned int                                n_components,
+             const EvaluationFlags::EvaluationFlags            evaluation_flag,
+             const Number *                                    src_ptr,
+             const std::vector<ArrayView<const Number>> *      sm_ptr,
+             FEEvaluationData<dim, VectorizedArrayType, true> &eval);
+
+    static void
+    integrate(const unsigned int                          n_components,
+              const EvaluationFlags::EvaluationFlags      integration_flag,
+              Number *                                    dst_ptr,
+              const std::vector<ArrayView<const Number>> *sm_ptr,
+              FEEvaluationData<dim, VectorizedArrayType, true> &eval);
+  };
+
 
 
-  template <int dim,
-            typename Number,
-            typename VectorizedArrayType = VectorizedArray<Number>>
+  template <int dim, typename Number>
   struct CellwiseInverseMassFactory
   {
     static void
-    apply(const unsigned int n_components,
-          const FEEvaluationBaseData<dim, Number, false, VectorizedArrayType>
-            &                        fe_eval,
-          const VectorizedArrayType *in_array,
-          VectorizedArrayType *      out_array);
+    apply(const unsigned int                          n_components,
+          const FEEvaluationData<dim, Number, false> &fe_eval,
+          const Number *                              in_array,
+          Number *                                    out_array);
 
     static void
-    apply(const unsigned int                        n_components,
-          const unsigned int                        fe_degree,
-          const AlignedVector<VectorizedArrayType> &inverse_shape,
-          const AlignedVector<VectorizedArrayType> &inverse_coefficients,
-          const VectorizedArrayType *               in_array,
-          VectorizedArrayType *                     out_array);
+    apply(const unsigned int           n_components,
+          const unsigned int           fe_degree,
+          const AlignedVector<Number> &inverse_shape,
+          const AlignedVector<Number> &inverse_coefficients,
+          const Number *               in_array,
+          Number *                     out_array);
 
     static void
     transform_from_q_points_to_basis(
-      const unsigned int n_components,
-      const FEEvaluationBaseData<dim, Number, false, VectorizedArrayType>
-        &                        fe_eval,
-      const VectorizedArrayType *in_array,
-      VectorizedArrayType *      out_array);
+      const unsigned int                          n_components,
+      const FEEvaluationData<dim, Number, false> &fe_eval,
+      const Number *                              in_array,
+      Number *                                    out_array);
   };
 
   template <int dim,
index 8dabe9598f6090717a7418d6bbcd330a52cef96f..5fd88c10029e2dd874c1ccc7d9215703bf95da5f 100644 (file)
@@ -41,17 +41,15 @@ namespace internal
 
 
 
-  template <int dim, typename Number, typename VectorizedArrayType>
+  template <int dim, typename Number>
   void
-  FEEvaluationFactory<dim, Number, VectorizedArrayType>::evaluate(
+  FEEvaluationFactory<dim, Number>::evaluate(
     const unsigned int                     n_components,
     const EvaluationFlags::EvaluationFlags evaluation_flag,
-    const VectorizedArrayType *            values_dofs,
-    FEEvaluationBaseData<dim, Number, false, VectorizedArrayType> &eval)
+    const Number *                         values_dofs,
+    FEEvaluationData<dim, Number, false> & eval)
   {
-    instantiation_helper_run<
-      1,
-      FEEvaluationImplEvaluateSelector<dim, VectorizedArrayType>>(
+    instantiation_helper_run<1, FEEvaluationImplEvaluateSelector<dim, Number>>(
       eval.get_shape_info().data[0].fe_degree,
       eval.get_shape_info().data[0].n_q_points_1d,
       n_components,
@@ -62,18 +60,16 @@ namespace internal
 
 
 
-  template <int dim, typename Number, typename VectorizedArrayType>
+  template <int dim, typename Number>
   void
-  FEEvaluationFactory<dim, Number, VectorizedArrayType>::integrate(
+  FEEvaluationFactory<dim, Number>::integrate(
     const unsigned int                     n_components,
     const EvaluationFlags::EvaluationFlags integration_flag,
-    VectorizedArrayType *                  values_dofs,
-    FEEvaluationBaseData<dim, Number, false, VectorizedArrayType> &eval,
-    const bool sum_into_values_array)
+    Number *                               values_dofs,
+    FEEvaluationData<dim, Number, false> & eval,
+    const bool                             sum_into_values_array)
   {
-    instantiation_helper_run<
-      1,
-      FEEvaluationImplIntegrateSelector<dim, VectorizedArrayType>>(
+    instantiation_helper_run<1, FEEvaluationImplIntegrateSelector<dim, Number>>(
       eval.get_shape_info().data[0].fe_degree,
       eval.get_shape_info().data[0].n_q_points_1d,
       n_components,
@@ -85,11 +81,11 @@ namespace internal
 
 
 
-  template <int dim, typename Number, typename VectorizedArrayType>
+  template <int dim, typename Number>
   bool
-  FEEvaluationFactory<dim, Number, VectorizedArrayType>::
-    fast_evaluation_supported(const unsigned int given_degree,
-                              const unsigned int n_q_points_1d)
+  FEEvaluationFactory<dim, Number>::fast_evaluation_supported(
+    const unsigned int given_degree,
+    const unsigned int n_q_points_1d)
   {
     return instantiation_helper_run<1, FastEvaluationSupported>(given_degree,
                                                                 n_q_points_1d);
@@ -97,17 +93,16 @@ namespace internal
 
 
 
-  template <int dim, typename Number, typename VectorizedArrayType>
+  template <int dim, typename Number>
   void
-  FEFaceEvaluationFactory<dim, Number, VectorizedArrayType>::evaluate(
+  FEFaceEvaluationFactory<dim, Number>::evaluate(
     const unsigned int                     n_components,
     const EvaluationFlags::EvaluationFlags evaluation_flag,
-    const VectorizedArrayType *            values_dofs,
-    FEEvaluationBaseData<dim, Number, true, VectorizedArrayType> &eval)
+    const Number *                         values_dofs,
+    FEEvaluationData<dim, Number, true> &  eval)
   {
-    instantiation_helper_run<
-      1,
-      FEFaceEvaluationImplEvaluateSelector<dim, VectorizedArrayType>>(
+    instantiation_helper_run<1,
+                             FEFaceEvaluationImplEvaluateSelector<dim, Number>>(
       eval.get_shape_info().data[0].fe_degree,
       eval.get_shape_info().data[0].n_q_points_1d,
       n_components,
@@ -118,17 +113,17 @@ namespace internal
 
 
 
-  template <int dim, typename Number, typename VectorizedArrayType>
+  template <int dim, typename Number>
   void
-  FEFaceEvaluationFactory<dim, Number, VectorizedArrayType>::integrate(
+  FEFaceEvaluationFactory<dim, Number>::integrate(
     const unsigned int                     n_components,
     const EvaluationFlags::EvaluationFlags integration_flag,
-    VectorizedArrayType *                  values_dofs,
-    FEEvaluationBaseData<dim, Number, true, VectorizedArrayType> &eval)
+    Number *                               values_dofs,
+    FEEvaluationData<dim, Number, true> &  eval)
   {
     instantiation_helper_run<
       1,
-      FEFaceEvaluationImplIntegrateSelector<dim, VectorizedArrayType>>(
+      FEFaceEvaluationImplIntegrateSelector<dim, Number>>(
       eval.get_shape_info().data[0].fe_degree,
       eval.get_shape_info().data[0].n_q_points_1d,
       n_components,
@@ -141,12 +136,12 @@ namespace internal
 
   template <int dim, typename Number, typename VectorizedArrayType>
   void
-  FEFaceEvaluationFactory<dim, Number, VectorizedArrayType>::gather_evaluate(
-    const unsigned int                          n_components,
-    const EvaluationFlags::EvaluationFlags      evaluation_flag,
-    const Number *                              src_ptr,
-    const std::vector<ArrayView<const Number>> *sm_ptr,
-    FEEvaluationBaseData<dim, Number, true, VectorizedArrayType> &eval)
+  FEFaceEvaluationGatherFactory<dim, Number, VectorizedArrayType>::evaluate(
+    const unsigned int                                n_components,
+    const EvaluationFlags::EvaluationFlags            evaluation_flag,
+    const Number *                                    src_ptr,
+    const std::vector<ArrayView<const Number>> *      sm_ptr,
+    FEEvaluationData<dim, VectorizedArrayType, true> &eval)
   {
     instantiation_helper_run<
       1,
@@ -166,12 +161,12 @@ namespace internal
 
   template <int dim, typename Number, typename VectorizedArrayType>
   void
-  FEFaceEvaluationFactory<dim, Number, VectorizedArrayType>::integrate_scatter(
-    const unsigned int                          n_components,
-    const EvaluationFlags::EvaluationFlags      integration_flag,
-    Number *                                    dst_ptr,
-    const std::vector<ArrayView<const Number>> *sm_ptr,
-    FEEvaluationBaseData<dim, Number, true, VectorizedArrayType> &eval)
+  FEFaceEvaluationGatherFactory<dim, Number, VectorizedArrayType>::integrate(
+    const unsigned int                                n_components,
+    const EvaluationFlags::EvaluationFlags            integration_flag,
+    Number *                                          dst_ptr,
+    const std::vector<ArrayView<const Number>> *      sm_ptr,
+    FEEvaluationData<dim, VectorizedArrayType, true> &eval)
   {
     instantiation_helper_run<
       1,
@@ -189,11 +184,11 @@ namespace internal
 
 
 
-  template <int dim, typename Number, typename VectorizedArrayType>
+  template <int dim, typename Number>
   bool
-  FEFaceEvaluationFactory<dim, Number, VectorizedArrayType>::
-    fast_evaluation_supported(const unsigned int given_degree,
-                              const unsigned int n_q_points_1d)
+  FEFaceEvaluationFactory<dim, Number>::fast_evaluation_supported(
+    const unsigned int given_degree,
+    const unsigned int n_q_points_1d)
   {
     return instantiation_helper_run<1, FastEvaluationSupported>(given_degree,
                                                                 n_q_points_1d);
@@ -201,65 +196,59 @@ namespace internal
 
 
 
-  template <int dim, typename Number, typename VectorizedArrayType>
+  template <int dim, typename Number>
   void
-  CellwiseInverseMassFactory<dim, Number, VectorizedArrayType>::apply(
-    const unsigned int n_components,
-    const FEEvaluationBaseData<dim, Number, false, VectorizedArrayType>
-      &                        fe_eval,
-    const VectorizedArrayType *in_array,
-    VectorizedArrayType *      out_array)
+  CellwiseInverseMassFactory<dim, Number>::apply(
+    const unsigned int                          n_components,
+    const FEEvaluationData<dim, Number, false> &fe_eval,
+    const Number *                              in_array,
+    Number *                                    out_array)
   {
     const unsigned int fe_degree = fe_eval.get_shape_info().data[0].fe_degree;
-    instantiation_helper_run<
-      1,
-      CellwiseInverseMassMatrixImplBasic<dim, VectorizedArrayType>>(
+    instantiation_helper_run<1,
+                             CellwiseInverseMassMatrixImplBasic<dim, Number>>(
       fe_degree, fe_degree + 1, n_components, fe_eval, in_array, out_array);
   }
 
 
 
-  template <int dim, typename Number, typename VectorizedArrayType>
+  template <int dim, typename Number>
   void
-  CellwiseInverseMassFactory<dim, Number, VectorizedArrayType>::apply(
-    const unsigned int                        n_components,
-    const unsigned int                        fe_degree,
-    const AlignedVector<VectorizedArrayType> &inverse_shape,
-    const AlignedVector<VectorizedArrayType> &inverse_coefficients,
-    const VectorizedArrayType *               in_array,
-    VectorizedArrayType *                     out_array)
+  CellwiseInverseMassFactory<dim, Number>::apply(
+    const unsigned int           n_components,
+    const unsigned int           fe_degree,
+    const AlignedVector<Number> &inverse_shape,
+    const AlignedVector<Number> &inverse_coefficients,
+    const Number *               in_array,
+    Number *                     out_array)
   {
     instantiation_helper_run<
       1,
-      CellwiseInverseMassMatrixImplFlexible<dim, VectorizedArrayType>>(
-      fe_degree,
-      fe_degree + 1,
-      n_components,
-      inverse_shape,
-      inverse_coefficients,
-      in_array,
-      out_array);
+      CellwiseInverseMassMatrixImplFlexible<dim, Number>>(fe_degree,
+                                                          fe_degree + 1,
+                                                          n_components,
+                                                          inverse_shape,
+                                                          inverse_coefficients,
+                                                          in_array,
+                                                          out_array);
   }
 
 
 
-  template <int dim, typename Number, typename VectorizedArrayType>
+  template <int dim, typename Number>
   void
-  CellwiseInverseMassFactory<dim, Number, VectorizedArrayType>::
-    transform_from_q_points_to_basis(
-      const unsigned int n_components,
-      const FEEvaluationBaseData<dim, Number, false, VectorizedArrayType>
-        &                        fe_eval,
-      const VectorizedArrayType *in_array,
-      VectorizedArrayType *      out_array)
+  CellwiseInverseMassFactory<dim, Number>::transform_from_q_points_to_basis(
+    const unsigned int                          n_components,
+    const FEEvaluationData<dim, Number, false> &fe_eval,
+    const Number *                              in_array,
+    Number *                                    out_array)
   {
     const unsigned int fe_degree = fe_eval.get_shape_info().data[0].fe_degree;
     const unsigned int n_q_points_1d =
       fe_eval.get_shape_info().data[0].n_q_points_1d;
     instantiation_helper_run<
       1,
-      CellwiseInverseMassMatrixImplTransformFromQPoints<dim,
-                                                        VectorizedArrayType>>(
+      CellwiseInverseMassMatrixImplTransformFromQPoints<dim, Number>>(
       fe_degree, n_q_points_1d, n_components, fe_eval, in_array, out_array);
   }
 
index a3192566af9c74754d9f20439b84185b51b8d03a..d6f88674ad748cc4b2a3afd633339772884860c0 100644 (file)
@@ -33,7 +33,7 @@
 #include <deal.II/matrix_free/evaluation_kernels.h>
 #include <deal.II/matrix_free/evaluation_selector.h>
 #include <deal.II/matrix_free/evaluation_template_factory.h>
-#include <deal.II/matrix_free/fe_evaluation_base_data.h>
+#include <deal.II/matrix_free/fe_evaluation_data.h>
 #include <deal.II/matrix_free/mapping_data_on_the_fly.h>
 #include <deal.II/matrix_free/matrix_free.h>
 #include <deal.II/matrix_free/shape_info.h>
@@ -59,7 +59,7 @@ DEAL_II_NAMESPACE_OPEN
  * FEEvaluationBase::distribute_local_to_global() functions, as well as
  * methods to access values and gradients of finite element functions. It also
  * inherits the geometry access functions provided by the class
- * FEEvaluationBaseData.
+ * FEEvaluationData.
  *
  * This class has five template arguments:
  *
@@ -91,7 +91,7 @@ template <int dim,
           bool is_face,
           typename VectorizedArrayType>
 class FEEvaluationBase
-  : public FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>
+  : public FEEvaluationData<dim, VectorizedArrayType, is_face>
 {
 public:
   using number_type = Number;
@@ -671,7 +671,7 @@ protected:
    * possibly within the element if the evaluate/integrate routines are
    * combined inside user code (e.g. for computing cell matrices).
    *
-   * The optional FEEvaluationBaseData object allows several
+   * The optional FEEvaluationData object allows several
    * FEEvaluation objects to share the geometry evaluation, i.e., the
    * underlying mapping and quadrature points do only need to be evaluated
    * once. This only works if the quadrature formulas are the same. Otherwise,
@@ -686,8 +686,7 @@ protected:
     const Quadrature<1> &     quadrature,
     const UpdateFlags         update_flags,
     const unsigned int        first_selected_component,
-    const FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>
-      *other);
+    const FEEvaluationData<dim, VectorizedArrayType, is_face> *other);
 
   /**
    * Copy constructor. If FEEvaluationBase was constructed from a mapping, fe,
@@ -845,8 +844,7 @@ protected:
     const Quadrature<1> &     quadrature,
     const UpdateFlags         update_flags,
     const unsigned int        first_selected_component,
-    const FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>
-      *other);
+    const FEEvaluationData<dim, VectorizedArrayType, is_face> *other);
 
   /**
    * Copy constructor
@@ -1003,8 +1001,7 @@ protected:
     const Quadrature<1> &     quadrature,
     const UpdateFlags         update_flags,
     const unsigned int        first_selected_component,
-    const FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>
-      *other);
+    const FEEvaluationData<dim, VectorizedArrayType, is_face> *other);
 
   /**
    * Copy constructor
@@ -1169,8 +1166,7 @@ protected:
     const Quadrature<1> &     quadrature,
     const UpdateFlags         update_flags,
     const unsigned int        first_selected_component,
-    const FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>
-      *other);
+    const FEEvaluationData<dim, VectorizedArrayType, is_face> *other);
 
   /**
    * Copy constructor
@@ -1351,7 +1347,7 @@ protected:
     const Quadrature<1> &   quadrature,
     const UpdateFlags       update_flags,
     const unsigned int      first_selected_component,
-    const FEEvaluationBaseData<1, Number, is_face, VectorizedArrayType> *other);
+    const FEEvaluationData<1, VectorizedArrayType, is_face> *other);
 
   /**
    * Copy constructor
@@ -2122,10 +2118,9 @@ public:
    * use the FEEvaluation object in %parallel to the given one because
    * otherwise the intended sharing may create race conditions.
    */
-  FEEvaluation(
-    const FiniteElement<dim> &                                           fe,
-    const FEEvaluationBaseData<dim, Number, false, VectorizedArrayType> &other,
-    const unsigned int first_selected_component = 0);
+  FEEvaluation(const FiniteElement<dim> &                               fe,
+               const FEEvaluationData<dim, VectorizedArrayType, false> &other,
+               const unsigned int first_selected_component = 0);
 
   /**
    * Copy constructor. If FEEvaluationBase was constructed from a mapping, fe,
@@ -2815,7 +2810,7 @@ namespace internal
     const internal::MatrixFreeFunctions::ShapeInfo<VectorizedArrayType> *,
     const internal::MatrixFreeFunctions::DoFInfo *,
     const internal::MatrixFreeFunctions::
-      MappingInfoStorage<dim - is_face, dim, Number, VectorizedArrayType> *,
+      MappingInfoStorage<dim - is_face, dim, VectorizedArrayType> *,
     unsigned int,
     unsigned int>
   get_shape_info_and_indices(
@@ -2882,7 +2877,7 @@ inline FEEvaluationBase<dim,
                    const unsigned int active_fe_index,
                    const unsigned int active_quad_index,
                    const unsigned int face_type)
-  : FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>(
+  : FEEvaluationData<dim, VectorizedArrayType, is_face>(
       internal::get_shape_info_and_indices<is_face>(data_in,
                                                     dof_no,
                                                     first_selected_component,
@@ -2946,15 +2941,13 @@ inline FEEvaluationBase<dim,
     const Quadrature<1> &     quadrature,
     const UpdateFlags         update_flags,
     const unsigned int        first_selected_component,
-    const FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>
-      *other)
-  : FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>(
+    const FEEvaluationData<dim, VectorizedArrayType, is_face> *other)
+  : FEEvaluationData<dim, VectorizedArrayType, is_face>(
       other != nullptr &&
           other->mapped_geometry->get_quadrature() == quadrature ?
         other->mapped_geometry :
-        std::make_shared<
-          internal::MatrixFreeFunctions::
-            MappingDataOnTheFly<dim, Number, VectorizedArrayType>>(
+        std::make_shared<internal::MatrixFreeFunctions::
+                           MappingDataOnTheFly<dim, VectorizedArrayType>>(
           mapping,
           quadrature,
           update_flags),
@@ -3000,7 +2993,7 @@ inline FEEvaluationBase<dim,
                                           Number,
                                           is_face,
                                           VectorizedArrayType> &other)
-  : FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>(other)
+  : FEEvaluationData<dim, VectorizedArrayType, is_face>(other)
   , scratch_data_array(other.matrix_info == nullptr ?
                          new AlignedVector<VectorizedArrayType>() :
                          other.matrix_info->acquire_scratch_data())
@@ -3014,12 +3007,12 @@ inline FEEvaluationBase<dim,
           *other.data);
 
       // Create deep copy of mapped geometry for use in parallel
-      this->mapped_geometry = std::make_shared<
-        internal::MatrixFreeFunctions::
-          MappingDataOnTheFly<dim, Number, VectorizedArrayType>>(
-        other.mapped_geometry->get_fe_values().get_mapping(),
-        other.mapped_geometry->get_quadrature(),
-        other.mapped_geometry->get_fe_values().get_update_flags());
+      this->mapped_geometry =
+        std::make_shared<internal::MatrixFreeFunctions::
+                           MappingDataOnTheFly<dim, VectorizedArrayType>>(
+          other.mapped_geometry->get_fe_values().get_mapping(),
+          other.mapped_geometry->get_quadrature(),
+          other.mapped_geometry->get_fe_values().get_update_flags());
       this->mapping_data = &this->mapped_geometry->get_data_storage();
       this->cell         = 0;
 
@@ -3062,8 +3055,7 @@ operator=(const FEEvaluationBase<dim,
       matrix_info->release_scratch_data(scratch_data_array);
     }
 
-  this->FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  operator=(other);
+  this->FEEvaluationData<dim, VectorizedArrayType, is_face>::operator=(other);
 
   matrix_info = other.matrix_info;
 
@@ -3076,12 +3068,12 @@ operator=(const FEEvaluationBase<dim,
       scratch_data_array = new AlignedVector<VectorizedArrayType>();
 
       // Create deep copy of mapped geometry for use in parallel
-      this->mapped_geometry = std::make_shared<
-        internal::MatrixFreeFunctions::
-          MappingDataOnTheFly<dim, Number, VectorizedArrayType>>(
-        other.mapped_geometry->get_fe_values().get_mapping(),
-        other.mapped_geometry->get_quadrature(),
-        other.mapped_geometry->get_fe_values().get_update_flags());
+      this->mapped_geometry =
+        std::make_shared<internal::MatrixFreeFunctions::
+                           MappingDataOnTheFly<dim, VectorizedArrayType>>(
+          other.mapped_geometry->get_fe_values().get_mapping(),
+          other.mapped_geometry->get_quadrature(),
+          other.mapped_geometry->get_fe_values().get_update_flags());
       this->cell         = 0;
       this->mapping_data = &this->mapped_geometry->get_data_storage();
       this->jacobian =
@@ -5332,8 +5324,7 @@ inline FEEvaluationAccess<dim,
     const Quadrature<1> &     quadrature,
     const UpdateFlags         update_flags,
     const unsigned int        first_selected_component,
-    const FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>
-      *other)
+    const FEEvaluationData<dim, VectorizedArrayType, is_face> *other)
   : FEEvaluationBase<dim, n_components_, Number, is_face, VectorizedArrayType>(
       mapping,
       fe,
@@ -5432,8 +5423,7 @@ inline FEEvaluationAccess<dim, 1, Number, is_face, VectorizedArrayType>::
     const Quadrature<1> &     quadrature,
     const UpdateFlags         update_flags,
     const unsigned int        first_selected_component,
-    const FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>
-      *other)
+    const FEEvaluationData<dim, VectorizedArrayType, is_face> *other)
   : FEEvaluationBase<dim, 1, Number, is_face, VectorizedArrayType>(
       mapping,
       fe,
@@ -5759,8 +5749,7 @@ inline FEEvaluationAccess<dim, dim, Number, is_face, VectorizedArrayType>::
     const Quadrature<1> &     quadrature,
     const UpdateFlags         update_flags,
     const unsigned int        first_selected_component,
-    const FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>
-      *other)
+    const FEEvaluationData<dim, VectorizedArrayType, is_face> *other)
   : FEEvaluationBase<dim, dim, Number, is_face, VectorizedArrayType>(
       mapping,
       fe,
@@ -6170,7 +6159,7 @@ inline FEEvaluationAccess<1, 1, Number, is_face, VectorizedArrayType>::
     const Quadrature<1> &   quadrature,
     const UpdateFlags       update_flags,
     const unsigned int      first_selected_component,
-    const FEEvaluationBaseData<1, Number, is_face, VectorizedArrayType> *other)
+    const FEEvaluationData<1, VectorizedArrayType, is_face> *other)
   : FEEvaluationBase<1, 1, Number, is_face, VectorizedArrayType>(
       mapping,
       fe,
@@ -6591,10 +6580,9 @@ inline FEEvaluation<dim,
                     n_components_,
                     Number,
                     VectorizedArrayType>::
-  FEEvaluation(
-    const FiniteElement<dim> &                                           fe,
-    const FEEvaluationBaseData<dim, Number, false, VectorizedArrayType> &other,
-    const unsigned int first_selected_component)
+  FEEvaluation(const FiniteElement<dim> &                               fe,
+               const FEEvaluationData<dim, VectorizedArrayType, false> &other,
+               const unsigned int first_selected_component)
   : BaseClass(other.mapped_geometry->get_fe_values().get_mapping(),
               fe,
               other.mapped_geometry->get_quadrature(),
@@ -7098,7 +7086,7 @@ FEEvaluation<dim,
     SelectEvaluator<dim, fe_degree, n_q_points_1d, VectorizedArrayType>::
       evaluate(n_components, evaluation_flag_actual, values_array, *this);
   else
-    internal::FEEvaluationFactory<dim, Number, VectorizedArrayType>::evaluate(
+    internal::FEEvaluationFactory<dim, VectorizedArrayType>::evaluate(
       n_components,
       evaluation_flag_actual,
       const_cast<VectorizedArrayType *>(values_array),
@@ -7267,10 +7255,10 @@ namespace internal
         VectorizedArrayType *vec_values =
           reinterpret_cast<VectorizedArrayType *>(
             destination.begin() +
-            dof_info->dof_indices_contiguous
+            dof_info.dof_indices_contiguous
               [internal::MatrixFreeFunctions::DoFInfo::dof_access_cell]
               [cell * VectorizedArrayType::size()] +
-            dof_info->component_dof_indices_offset
+            dof_info.component_dof_indices_offset
                 [phi.get_active_fe_index()]
                 [phi.get_first_selected_component()] *
               VectorizedArrayType::size());
@@ -7470,7 +7458,7 @@ FEEvaluation<dim,
                 *this,
                 sum_into_values_array);
   else
-    internal::FEEvaluationFactory<dim, Number, VectorizedArrayType>::integrate(
+    internal::FEEvaluationFactory<dim, VectorizedArrayType>::integrate(
       n_components,
       integration_flag_actual,
       values_array,
@@ -7925,8 +7913,8 @@ FEFaceEvaluation<dim,
                                              values_array,
                                              *this);
   else
-    internal::FEFaceEvaluationFactory<dim, Number, VectorizedArrayType>::
-      evaluate(n_components, evaluation_flag_actual, values_array, *this);
+    internal::FEFaceEvaluationFactory<dim, VectorizedArrayType>::evaluate(
+      n_components, evaluation_flag_actual, values_array, *this);
 
 #  ifdef DEBUG
   if (evaluation_flag_actual & EvaluationFlags::values)
@@ -8062,8 +8050,8 @@ FEFaceEvaluation<dim,
                                              values_array,
                                              *this);
   else
-    internal::FEFaceEvaluationFactory<dim, Number, VectorizedArrayType>::
-      integrate(n_components, integration_flag_actual, values_array, *this);
+    internal::FEFaceEvaluationFactory<dim, VectorizedArrayType>::integrate(
+      n_components, integration_flag_actual, values_array, *this);
 }
 
 
@@ -8149,12 +8137,15 @@ FEFaceEvaluation<dim,
           shared_vector_data,
           *this);
       else
-        internal::FEFaceEvaluationFactory<dim, Number, VectorizedArrayType>::
-          gather_evaluate(n_components,
-                          evaluation_flag,
-                          internal::get_beginning<Number>(input_vector),
-                          shared_vector_data,
-                          *this);
+        internal::FEFaceEvaluationGatherFactory<
+          dim,
+          Number,
+          VectorizedArrayType>::evaluate(n_components,
+                                         evaluation_flag,
+                                         internal::get_beginning<Number>(
+                                           input_vector),
+                                         shared_vector_data,
+                                         *this);
     }
   else
     {
@@ -8254,12 +8245,15 @@ FEFaceEvaluation<dim,
           shared_vector_data,
           *this);
       else
-        internal::FEFaceEvaluationFactory<dim, Number, VectorizedArrayType>::
-          integrate_scatter(n_components,
-                            integration_flag,
-                            internal::get_beginning<Number>(destination),
-                            shared_vector_data,
-                            *this);
+        internal::FEFaceEvaluationGatherFactory<
+          dim,
+          Number,
+          VectorizedArrayType>::integrate(n_components,
+                                          integration_flag,
+                                          internal::get_beginning<Number>(
+                                            destination),
+                                          shared_vector_data,
+                                          *this);
     }
   else
     {
@@ -8337,7 +8331,7 @@ FEEvaluation<dim,
                             const unsigned int give_n_q_points_1d)
 {
   return fe_degree == -1 ?
-           internal::FEEvaluationFactory<dim, Number, VectorizedArrayType>::
+           internal::FEEvaluationFactory<dim, VectorizedArrayType>::
              fast_evaluation_supported(given_degree, give_n_q_points_1d) :
            true;
 }
@@ -8361,7 +8355,7 @@ FEFaceEvaluation<dim,
                             const unsigned int give_n_q_points_1d)
 {
   return fe_degree == -1 ?
-           internal::FEFaceEvaluationFactory<dim, Number, VectorizedArrayType>::
+           internal::FEFaceEvaluationFactory<dim, VectorizedArrayType>::
              fast_evaluation_supported(given_degree, give_n_q_points_1d) :
            true;
 }
similarity index 76%
rename from include/deal.II/matrix_free/fe_evaluation_base_data.h
rename to include/deal.II/matrix_free/fe_evaluation_data.h
index 447297c1c8a39b19f57e06ab84153be1bd402bc5..020dd83dc1d6431f327effd93ee9a03dec997d28 100644 (file)
@@ -14,8 +14,8 @@
 // ---------------------------------------------------------------------
 
 
-#ifndef dealii_matrix_free_fe_evaluation_base_data_h
-#define dealii_matrix_free_fe_evaluation_base_data_h
+#ifndef dealii_matrix_free_fe_evaluation_data_h
+#define dealii_matrix_free_fe_evaluation_data_h
 
 
 #include <deal.II/base/config.h>
@@ -74,7 +74,7 @@ namespace internal
 {
   namespace MatrixFreeFunctions
   {
-    template <int, typename, typename>
+    template <int, typename>
     class MappingDataOnTheFly;
   }
 } // namespace internal
@@ -85,7 +85,7 @@ namespace internal
  * mapping-related information independent of the degrees of freedom and
  * finite element in use. This class provides access functionality for user
  * code. The main usage is through the class FEEvaluation. However, there is
- * functionality to construct an object of type FEEvaluationBaseData given
+ * functionality to construct an object of type FEEvaluationData given
  * suitable data pointers to internal data, which allows usage in some
  * scenarios where no full MatrixFree object is available.
  *
@@ -108,52 +108,49 @@ namespace internal
  *
  * @ingroup matrixfree
  */
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-class FEEvaluationBaseData
+template <int dim, typename Number, bool is_face>
+class FEEvaluationData
 {
-  static_assert(
-    std::is_same<Number, typename VectorizedArrayType::value_type>::value,
-    "Type of Number and of VectorizedArrayType do not match.");
-
-  using ShapeInfoType =
-    internal::MatrixFreeFunctions::ShapeInfo<VectorizedArrayType>;
-  using MappingInfoStorageType =
-    internal::MatrixFreeFunctions::MappingInfoStorage<(is_face ? dim - 1 : dim),
-                                                      dim,
-                                                      Number,
-                                                      VectorizedArrayType>;
+  using ShapeInfoType = internal::MatrixFreeFunctions::ShapeInfo<Number>;
+  using MappingInfoStorageType = internal::MatrixFreeFunctions::
+    MappingInfoStorage<(is_face ? dim - 1 : dim), dim, Number>;
   using DoFInfo = internal::MatrixFreeFunctions::DoFInfo;
 
 public:
   static constexpr unsigned int dimension = dim;
 
-  using NumberType = VectorizedArrayType;
+  using NumberType = Number;
+
+  using ScalarNumber =
+    typename internal::VectorizedArrayTrait<Number>::value_type;
+
+  static constexpr unsigned int n_lanes = sizeof(Number) / sizeof(ScalarNumber);
 
   /**
    * Constructor, taking data stored in MatrixFree. If applied to problems
    * with more than one quadrature formula selected during construction of
    * `matrix_free`, `quad_no` allows to select the appropriate formula.
    */
-  FEEvaluationBaseData(const std::tuple<const ShapeInfoType *,
-                                        const DoFInfo *,
-                                        const MappingInfoStorageType *,
-                                        unsigned int,
-                                        unsigned int> &info,
-                       const bool                      is_interior_face = true,
-                       const unsigned int              quad_no          = 0,
-                       const unsigned int              face_type        = 0,
-                       const unsigned int first_selected_component      = 0);
+  FEEvaluationData(const std::tuple<const ShapeInfoType *,
+                                    const DoFInfo *,
+                                    const MappingInfoStorageType *,
+                                    unsigned int,
+                                    unsigned int> &info,
+                   const bool                      is_interior_face = true,
+                   const unsigned int              quad_no          = 0,
+                   const unsigned int              face_type        = 0,
+                   const unsigned int first_selected_component      = 0);
 
   /**
    * Copy constructor.
    */
-  FEEvaluationBaseData(const FEEvaluationBaseData &other) = default;
+  FEEvaluationData(const FEEvaluationData &other) = default;
 
   /**
    * Copy assignment operator.
    */
-  FEEvaluationBaseData &
-  operator=(const FEEvaluationBaseData &other);
+  FEEvaluationData &
+  operator=(const FEEvaluationData &other);
 
   /**
    * Sets the pointers for values, gradients, hessians to the central
@@ -161,16 +158,16 @@ public:
    * components as provided by one of the derived classes.
    */
   void
-  set_data_pointers(AlignedVector<VectorizedArrayType> *scratch_data,
-                    const unsigned int                  n_components);
+  set_data_pointers(AlignedVector<Number> *scratch_data,
+                    const unsigned int     n_components);
 
   /**
    * Initialize the indices related to the given face description. Used during
    * the reinit() call of the FEFaceEvaluation class.
    */
   void
-  reinit_face(const internal::MatrixFreeFunctions::FaceToCellTopology<
-              VectorizedArrayType::size()> &face);
+  reinit_face(
+    const internal::MatrixFreeFunctions::FaceToCellTopology<n_lanes> &face);
 
   /**
    * @name 1: Access to geometry data at quadrature points
@@ -183,14 +180,14 @@ public:
    * do not assume it to be stable over those calls. The maximum size you can
    * write into is 3*dofs_per_cell+2*n_q_points.
    */
-  ArrayView<VectorizedArrayType>
+  ArrayView<Number>
   get_scratch_data() const;
 
   /**
    * Return the determinant of the Jacobian from the unit to the real cell
    * times the quadrature weight.
    */
-  VectorizedArrayType
+  Number
   JxW(const unsigned int q_point) const;
 
   /**
@@ -204,7 +201,7 @@ public:
    * gradients to gradients on the real cell by a multiplication $J^{-\mathrm
    * T} \hat{\nabla} u_h$.
    */
-  Tensor<2, dim, VectorizedArrayType>
+  Tensor<2, dim, Number>
   inverse_jacobian(const unsigned int q_point) const;
 
   /**
@@ -219,7 +216,7 @@ public:
    *
    * @note Only implemented in case `is_face == true`.
    */
-  Tensor<1, dim, VectorizedArrayType>
+  Tensor<1, dim, Number>
   get_normal_vector(const unsigned int q_point) const;
 
   //@}
@@ -236,7 +233,7 @@ public:
    * used in this class. In general, it is safer to use the get_dof_value()
    * function instead.
    */
-  const VectorizedArrayType *
+  const Number *
   begin_dof_values() const;
 
   /**
@@ -247,7 +244,7 @@ public:
    * structures used in this class. In general, it is safer to use the
    * get_dof_value() function instead.
    */
-  VectorizedArrayType *
+  Number *
   begin_dof_values();
 
   /**
@@ -260,7 +257,7 @@ public:
    * applied manually. In general, it is safer to use the get_value() function
    * instead, which does all the transformation internally.
    */
-  const VectorizedArrayType *
+  const Number *
   begin_values() const;
 
   /**
@@ -273,7 +270,7 @@ public:
    * applied manually. In general, it is safer to use the get_value() function
    * instead, which does all the transformation internally.
    */
-  VectorizedArrayType *
+  Number *
   begin_values();
 
   /**
@@ -287,7 +284,7 @@ public:
    * manually. In general, it is safer to use the get_gradient() function
    * instead, which does all the transformation internally.
    */
-  const VectorizedArrayType *
+  const Number *
   begin_gradients() const;
 
   /**
@@ -301,7 +298,7 @@ public:
    * manually. In general, it is safer to use the get_gradient() function
    * instead, which does all the transformation internally.
    */
-  VectorizedArrayType *
+  Number *
   begin_gradients();
 
   /**
@@ -316,7 +313,7 @@ public:
    * general, it is safer to use the get_laplacian() or get_hessian()
    * functions instead, which does all the transformation internally.
    */
-  const VectorizedArrayType *
+  const Number *
   begin_hessians() const;
 
   /**
@@ -331,7 +328,7 @@ public:
    * general, it is safer to use the get_laplacian() or get_hessian()
    * functions instead, which does all the transformation internally.
    */
-  VectorizedArrayType *
+  Number *
   begin_hessians();
 
   //@}
@@ -484,14 +481,14 @@ public:
    * Return the id of the cells this FEEvaluation or FEFaceEvaluation is
    * associated with.
    */
-  const std::array<unsigned int, VectorizedArrayType::size()> &
+  const std::array<unsigned int, n_lanes> &
   get_cell_ids() const;
 
   /**
    * Return the id of the cells/faces this FEEvaluation/FEFaceEvaluation is
    * associated with.
    */
-  const std::array<unsigned int, VectorizedArrayType::size()> &
+  const std::array<unsigned int, n_lanes> &
   get_cell_or_face_ids() const;
 
   /**
@@ -506,7 +503,7 @@ public:
    * is not stable between releases of deal.II, and is hence mostly for
    * internal use.
    */
-  const std::array<std::uint8_t, VectorizedArrayType::size()> &
+  const std::array<std::uint8_t, n_lanes> &
   get_all_face_numbers() const;
 
   /**
@@ -517,7 +514,7 @@ public:
    * @note Only available for `dof_access_index == dof_access_cell` and
    * `is_interior_face == false`.
    */
-  const std::array<std::uint8_t, VectorizedArrayType::size()> &
+  const std::array<std::uint8_t, n_lanes> &
   get_all_face_orientations() const;
 
   //@}
@@ -527,11 +524,11 @@ protected:
    * Constructor that comes with reduced functionality and works similarly as
    * FEValues.
    */
-  FEEvaluationBaseData(
+  FEEvaluationData(
     const std::shared_ptr<
-      internal::MatrixFreeFunctions::
-        MappingDataOnTheFly<dim, Number, VectorizedArrayType>> &mapping_data,
-    const unsigned int                                          n_fe_components,
+      internal::MatrixFreeFunctions::MappingDataOnTheFly<dim, Number>>
+      &                mapping_data,
+    const unsigned int n_fe_components,
     const unsigned int first_selected_component);
 
   /**
@@ -603,7 +600,7 @@ protected:
    * A pointer to the Jacobian information of the present cell. Only set to a
    * useful value if on a non-Cartesian cell.
    */
-  const Tensor<2, dim, VectorizedArrayType> *jacobian;
+  const Tensor<2, dim, Number> *jacobian;
 
   /**
    * A pointer to the Jacobian determinant of the present cell. If on a
@@ -611,22 +608,22 @@ protected:
    * Jacobian determinant, otherwise the Jacobian determinant times the
    * quadrature weight.
    */
-  const VectorizedArrayType *J_value;
+  const Number *J_value;
 
   /**
    * A pointer to the normal vectors at faces.
    */
-  const Tensor<1, dim, VectorizedArrayType> *normal_vectors;
+  const Tensor<1, dim, Number> *normal_vectors;
 
   /**
    * A pointer to the normal vectors times the jacobian at faces.
    */
-  const Tensor<1, dim, VectorizedArrayType> *normal_x_jacobian;
+  const Tensor<1, dim, Number> *normal_x_jacobian;
 
   /**
    * A pointer to the quadrature weights of the underlying quadrature formula.
    */
-  const Number *quadrature_weights;
+  const ScalarNumber *quadrature_weights;
 
   /**
    * This is the user-visible part of FEEvaluationBase::scratch_data_array,
@@ -634,7 +631,7 @@ protected:
    * during the allocation of the internal data structures in
    * FEEvaluationBase.
    */
-  mutable ArrayView<VectorizedArrayType> scratch_data;
+  mutable ArrayView<Number> scratch_data;
 
   /**
    * This field stores the values for local degrees of freedom (e.g. after
@@ -646,7 +643,7 @@ protected:
    * @p scratch_data_array. Due to its access as a thread local memory, the
    * memory can get reused between different calls.
    */
-  VectorizedArrayType *values_dofs;
+  Number *values_dofs;
 
   /**
    * This field stores the values of the finite element function on quadrature
@@ -657,7 +654,7 @@ protected:
    * @p scratch_data_array. Due to its access as a thread local memory, the
    * memory can get reused between different calls.
    */
-  VectorizedArrayType *values_quad;
+  Number *values_quad;
 
   /**
    * This field stores the gradients of the finite element function on
@@ -670,7 +667,7 @@ protected:
    * @p scratch_data_array. Due to its access as a thread local memory, the
    * memory can get reused between different calls.
    */
-  VectorizedArrayType *gradients_quad;
+  Number *gradients_quad;
 
   /**
    * This field stores the gradients of the finite element function on
@@ -683,7 +680,7 @@ protected:
    * @p scratch_data_array. Due to its access as a thread local memory, the
    * memory can get reused between different calls.
    */
-  VectorizedArrayType *gradients_from_hessians_quad;
+  Number *gradients_from_hessians_quad;
 
   /**
    * This field stores the Hessians of the finite element function on
@@ -694,7 +691,7 @@ protected:
    * @p scratch_data_array. Due to its access as a thread local memory, the
    * memory can get reused between different calls.
    */
-  VectorizedArrayType *hessians_quad;
+  Number *hessians_quad;
 
   /**
    * Debug information to track whether dof values have been initialized
@@ -798,13 +795,13 @@ protected:
    * Stores the (non-vectorized) id of the cells or faces this object is
    * initialized to. Relevant for ECL.
    */
-  std::array<unsigned int, VectorizedArrayType::size()> cell_ids;
+  std::array<unsigned int, n_lanes> cell_ids;
 
   /**
    * Stores the (non-vectorized) id of the cells or faces this object is
    * initialized to. Relevant for ECL.
    */
-  std::array<unsigned int, VectorizedArrayType::size()> cell_or_face_ids;
+  std::array<unsigned int, n_lanes> cell_or_face_ids;
 
   /**
    * Stores the (non-vectorized) number of faces within cells in case of ECL
@@ -814,7 +811,7 @@ protected:
    * @note Only available for `dof_access_index == dof_access_cell` and
    * `is_interior_face == false`.
    */
-  std::array<std::uint8_t, VectorizedArrayType::size()> all_face_numbers;
+  std::array<std::uint8_t, n_lanes> all_face_numbers;
 
   /**
    * Store the orientation of the neighbor's faces with respect to the current
@@ -824,15 +821,15 @@ protected:
    * @note Only available for `dof_access_index == dof_access_cell` and
    * `is_interior_face == false`.
    */
-  std::array<std::uint8_t, VectorizedArrayType::size()> all_face_orientations;
+  std::array<std::uint8_t, n_lanes> all_face_orientations;
 
   /**
    * Geometry data that can be generated FEValues on the fly with the
    * respective constructor, as an alternative to the entry point with
    * MatrixFree.
    */
-  std::shared_ptr<internal::MatrixFreeFunctions::
-                    MappingDataOnTheFly<dim, Number, VectorizedArrayType>>
+  std::shared_ptr<
+    internal::MatrixFreeFunctions::MappingDataOnTheFly<dim, Number>>
     mapped_geometry;
 
   // Make FEEvaluation and FEEvaluationBase objects friends for access to
@@ -850,17 +847,17 @@ protected:
 
 #ifndef DOXYGEN
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  FEEvaluationBaseData(const std::tuple<const ShapeInfoType *,
-                                        const DoFInfo *,
-                                        const MappingInfoStorageType *,
-                                        unsigned int,
-                                        unsigned int> &shape_dof_info,
-                       const bool                      is_interior_face,
-                       const unsigned int              quad_no,
-                       const unsigned int              face_type,
-                       const unsigned int              first_selected_component)
+template <int dim, typename Number, bool is_face>
+inline FEEvaluationData<dim, Number, is_face>::FEEvaluationData(
+  const std::tuple<const ShapeInfoType *,
+                   const DoFInfo *,
+                   const MappingInfoStorageType *,
+                   unsigned int,
+                   unsigned int> &shape_dof_info,
+  const bool                      is_interior_face,
+  const unsigned int              quad_no,
+  const unsigned int              face_type,
+  const unsigned int              first_selected_component)
   : data(std::get<0>(shape_dof_info))
   , dof_info(std::get<1>(shape_dof_info))
   , mapping_data(std::get<2>(shape_dof_info))
@@ -903,14 +900,13 @@ inline FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  FEEvaluationBaseData(
-    const std::shared_ptr<
-      internal::MatrixFreeFunctions::
-        MappingDataOnTheFly<dim, Number, VectorizedArrayType>> &mapped_geometry,
-    const unsigned int                                          n_fe_components,
-    const unsigned int first_selected_component)
+template <int dim, typename Number, bool is_face>
+inline FEEvaluationData<dim, Number, is_face>::FEEvaluationData(
+  const std::shared_ptr<
+    internal::MatrixFreeFunctions::MappingDataOnTheFly<dim, Number>>
+    &                mapped_geometry,
+  const unsigned int n_fe_components,
+  const unsigned int first_selected_component)
   : data(nullptr)
   , dof_info(nullptr)
   , mapping_data(nullptr)
@@ -940,10 +936,9 @@ inline FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType> &
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::operator=(
-  const FEEvaluationBaseData &other)
+template <int dim, typename Number, bool is_face>
+inline FEEvaluationData<dim, Number, is_face> &
+FEEvaluationData<dim, Number, is_face>::operator=(const FEEvaluationData &other)
 {
   AssertDimension(quad_no, other.quad_no);
   AssertDimension(n_fe_components, other.n_fe_components);
@@ -987,11 +982,11 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::operator=(
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline void
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  set_data_pointers(AlignedVector<VectorizedArrayType> *scratch_data_array,
-                    const unsigned int                  n_components)
+FEEvaluationData<dim, Number, is_face>::set_data_pointers(
+  AlignedVector<Number> *scratch_data_array,
+  const unsigned int     n_components)
 {
   Assert(scratch_data_array != nullptr, ExcInternalError());
 
@@ -1028,11 +1023,10 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline void
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::reinit_face(
-  const internal::MatrixFreeFunctions::FaceToCellTopology<
-    VectorizedArrayType::size()> &face)
+FEEvaluationData<dim, Number, is_face>::reinit_face(
+  const internal::MatrixFreeFunctions::FaceToCellTopology<n_lanes> &face)
 {
   Assert(is_face == true,
          ExcMessage("Faces can only be set if the is_face template parameter "
@@ -1059,10 +1053,10 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::reinit_face(
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline DEAL_II_ALWAYS_INLINE Tensor<1, dim, VectorizedArrayType>
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_normal_vector(const unsigned int q_point) const
+template <int dim, typename Number, bool is_face>
+inline DEAL_II_ALWAYS_INLINE Tensor<1, dim, Number>
+FEEvaluationData<dim, Number, is_face>::get_normal_vector(
+  const unsigned int q_point) const
 {
   AssertIndexRange(q_point, n_quadrature_points);
   Assert(normal_vectors != nullptr,
@@ -1076,10 +1070,9 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline DEAL_II_ALWAYS_INLINE VectorizedArrayType
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::JxW(
-  const unsigned int q_point) const
+template <int dim, typename Number, bool is_face>
+inline DEAL_II_ALWAYS_INLINE Number
+FEEvaluationData<dim, Number, is_face>::JxW(const unsigned int q_point) const
 {
   AssertIndexRange(q_point, n_quadrature_points);
   Assert(J_value != nullptr,
@@ -1096,10 +1089,10 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::JxW(
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline DEAL_II_ALWAYS_INLINE Tensor<2, dim, VectorizedArrayType>
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  inverse_jacobian(const unsigned int q_point) const
+template <int dim, typename Number, bool is_face>
+inline DEAL_II_ALWAYS_INLINE Tensor<2, dim, Number>
+FEEvaluationData<dim, Number, is_face>::inverse_jacobian(
+  const unsigned int q_point) const
 {
   AssertIndexRange(q_point, n_quadrature_points);
   Assert(jacobian != nullptr,
@@ -1113,20 +1106,18 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline const VectorizedArrayType *
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  begin_dof_values() const
+template <int dim, typename Number, bool is_face>
+inline const Number *
+FEEvaluationData<dim, Number, is_face>::begin_dof_values() const
 {
   return values_dofs;
 }
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline VectorizedArrayType *
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  begin_dof_values()
+template <int dim, typename Number, bool is_face>
+inline Number *
+FEEvaluationData<dim, Number, is_face>::begin_dof_values()
 {
 #  ifdef DEBUG
   dof_values_initialized = true;
@@ -1136,10 +1127,9 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline const VectorizedArrayType *
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::begin_values()
-  const
+template <int dim, typename Number, bool is_face>
+inline const Number *
+FEEvaluationData<dim, Number, is_face>::begin_values() const
 {
 #  ifdef DEBUG
   Assert(values_quad_initialized || values_quad_submitted, ExcNotInitialized());
@@ -1149,9 +1139,9 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::begin_values()
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline VectorizedArrayType *
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::begin_values()
+template <int dim, typename Number, bool is_face>
+inline Number *
+FEEvaluationData<dim, Number, is_face>::begin_values()
 {
 #  ifdef DEBUG
   values_quad_initialized = true;
@@ -1162,10 +1152,9 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::begin_values()
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline const VectorizedArrayType *
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  begin_gradients() const
+template <int dim, typename Number, bool is_face>
+inline const Number *
+FEEvaluationData<dim, Number, is_face>::begin_gradients() const
 {
 #  ifdef DEBUG
   Assert(gradients_quad_initialized || gradients_quad_submitted,
@@ -1176,10 +1165,9 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline VectorizedArrayType *
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  begin_gradients()
+template <int dim, typename Number, bool is_face>
+inline Number *
+FEEvaluationData<dim, Number, is_face>::begin_gradients()
 {
 #  ifdef DEBUG
   gradients_quad_submitted   = true;
@@ -1190,10 +1178,9 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline const VectorizedArrayType *
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  begin_hessians() const
+template <int dim, typename Number, bool is_face>
+inline const Number *
+FEEvaluationData<dim, Number, is_face>::begin_hessians() const
 {
 #  ifdef DEBUG
   Assert(hessians_quad_initialized, ExcNotInitialized());
@@ -1203,10 +1190,9 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline VectorizedArrayType *
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  begin_hessians()
+template <int dim, typename Number, bool is_face>
+inline Number *
+FEEvaluationData<dim, Number, is_face>::begin_hessians()
 {
 #  ifdef DEBUG
   hessians_quad_initialized = true;
@@ -1216,10 +1202,9 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline unsigned int
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_mapping_data_index_offset() const
+FEEvaluationData<dim, Number, is_face>::get_mapping_data_index_offset() const
 {
   Assert(mapping_data != nullptr, ExcInternalError());
 
@@ -1234,10 +1219,9 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline internal::MatrixFreeFunctions::GeometryType
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::get_cell_type()
-  const
+FEEvaluationData<dim, Number, is_face>::get_cell_type() const
 {
   Assert(cell != numbers::invalid_unsigned_int, ExcNotInitialized());
   return cell_type;
@@ -1245,10 +1229,9 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::get_cell_type()
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline const internal::MatrixFreeFunctions::ShapeInfo<VectorizedArrayType> &
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_shape_info() const
+template <int dim, typename Number, bool is_face>
+inline const internal::MatrixFreeFunctions::ShapeInfo<Number> &
+FEEvaluationData<dim, Number, is_face>::get_shape_info() const
 {
   Assert(data != nullptr, ExcInternalError());
   return *data;
@@ -1256,10 +1239,9 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline const internal::MatrixFreeFunctions::DoFInfo &
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::get_dof_info()
-  const
+FEEvaluationData<dim, Number, is_face>::get_dof_info() const
 {
   Assert(dof_info != nullptr,
          ExcMessage(
@@ -1269,30 +1251,27 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::get_dof_info()
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline const std::vector<unsigned int> &
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_internal_dof_numbering() const
+FEEvaluationData<dim, Number, is_face>::get_internal_dof_numbering() const
 {
   return data->lexicographic_numbering;
 }
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline unsigned int
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_quadrature_index() const
+FEEvaluationData<dim, Number, is_face>::get_quadrature_index() const
 {
   return quad_no;
 }
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline unsigned int
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_current_cell_index() const
+FEEvaluationData<dim, Number, is_face>::get_current_cell_index() const
 {
   if (is_face && dof_access_index ==
                    internal::MatrixFreeFunctions::DoFInfo::dof_access_cell)
@@ -1303,80 +1282,72 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline unsigned int
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_active_fe_index() const
+FEEvaluationData<dim, Number, is_face>::get_active_fe_index() const
 {
   return active_fe_index;
 }
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline unsigned int
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_active_quadrature_index() const
+FEEvaluationData<dim, Number, is_face>::get_active_quadrature_index() const
 {
   return active_quad_index;
 }
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline unsigned int
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_first_selected_component() const
+FEEvaluationData<dim, Number, is_face>::get_first_selected_component() const
 {
   return first_selected_component;
 }
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline ArrayView<VectorizedArrayType>
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_scratch_data() const
+template <int dim, typename Number, bool is_face>
+inline ArrayView<Number>
+FEEvaluationData<dim, Number, is_face>::get_scratch_data() const
 {
   return scratch_data;
 }
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline unsigned int
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::get_face_no()
-  const
+FEEvaluationData<dim, Number, is_face>::get_face_no() const
 {
   return face_no;
 }
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline unsigned int
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_subface_index() const
+FEEvaluationData<dim, Number, is_face>::get_subface_index() const
 {
   return subface_index;
 }
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline unsigned int
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_face_orientation() const
+FEEvaluationData<dim, Number, is_face>::get_face_orientation() const
 {
   return face_orientation;
 }
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline const Table<2, unsigned int> &
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_orientation_map() const
+FEEvaluationData<dim, Number, is_face>::get_orientation_map() const
 {
   Assert(descriptor != nullptr, ExcNotInitialized());
   return descriptor->face_orientations;
@@ -1384,30 +1355,28 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline internal::MatrixFreeFunctions::DoFInfo::DoFAccessIndex
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_dof_access_index() const
+FEEvaluationData<dim, Number, is_face>::get_dof_access_index() const
 {
   return dof_access_index;
 }
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
+template <int dim, typename Number, bool is_face>
 inline bool
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_is_interior_face() const
+FEEvaluationData<dim, Number, is_face>::get_is_interior_face() const
 {
   return is_interior_face;
 }
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline const std::array<unsigned int, VectorizedArrayType::size()> &
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::get_cell_ids()
-  const
+template <int dim, typename Number, bool is_face>
+inline const std::array<unsigned int,
+                        FEEvaluationData<dim, Number, is_face>::n_lanes> &
+FEEvaluationData<dim, Number, is_face>::get_cell_ids() const
 {
   Assert(cell != numbers::invalid_unsigned_int, ExcNotInitialized());
   return cell_ids;
@@ -1415,10 +1384,10 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::get_cell_ids()
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline const std::array<unsigned int, VectorizedArrayType::size()> &
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_cell_or_face_ids() const
+template <int dim, typename Number, bool is_face>
+inline const std::array<unsigned int,
+                        FEEvaluationData<dim, Number, is_face>::n_lanes> &
+FEEvaluationData<dim, Number, is_face>::get_cell_or_face_ids() const
 {
   Assert(cell != numbers::invalid_unsigned_int, ExcNotInitialized());
   if (!is_face || dof_access_index ==
@@ -1430,10 +1399,10 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline const std::array<std::uint8_t, VectorizedArrayType::size()> &
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_all_face_numbers() const
+template <int dim, typename Number, bool is_face>
+inline const std::array<std::uint8_t,
+                        FEEvaluationData<dim, Number, is_face>::n_lanes> &
+FEEvaluationData<dim, Number, is_face>::get_all_face_numbers() const
 {
   Assert(cell != numbers::invalid_unsigned_int, ExcNotInitialized());
   Assert(is_face &&
@@ -1448,10 +1417,10 @@ FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
 
 
 
-template <int dim, typename Number, bool is_face, typename VectorizedArrayType>
-inline const std::array<std::uint8_t, VectorizedArrayType::size()> &
-FEEvaluationBaseData<dim, Number, is_face, VectorizedArrayType>::
-  get_all_face_orientations() const
+template <int dim, typename Number, bool is_face>
+inline const std::array<std::uint8_t,
+                        FEEvaluationData<dim, Number, is_face>::n_lanes> &
+FEEvaluationData<dim, Number, is_face>::get_all_face_orientations() const
 {
   Assert(cell != numbers::invalid_unsigned_int, ExcNotInitialized());
   Assert(is_face &&
index b1c739009053f865034bb5599c4e5a0a433f2d59..822a4c66f253c4771628d2e21a4ae2274c3e8b9c 100644 (file)
@@ -45,10 +45,10 @@ namespace internal
      * deal.II information in a form that FEEvaluation and friends can use for
      * vectorized access. Since no vectorization over cells is available with
      * the DoFHandler/Triangulation cell iterators, the interface to
-     * FEEvaluation's vectorization model is to use @p
-     * VectorizedArray::n_array_element copies of the same element. This
-     * interface is thus primarily useful for evaluating several operators on
-     * the same cell, e.g., when assembling cell matrices.
+     * FEEvaluation's vectorization model is to use VectorizedArray::size()
+     * copies of the same element. This interface is thus primarily useful for
+     * evaluating several operators on the same cell, e.g., when assembling
+     * cell matrices.
      *
      * As opposed to the Mapping classes in deal.II, this class does not
      * actually provide a boundary description that can be used to evaluate
@@ -56,13 +56,9 @@ namespace internal
      * given deal.II mapping (as passed to the constructor of this class) in a
      * form accessible to FEEvaluation.
      */
-    template <int dim, typename Number, typename VectorizedArrayType>
+    template <int dim, typename Number>
     class MappingDataOnTheFly
     {
-      static_assert(
-        std::is_same<Number, typename VectorizedArrayType::value_type>::value,
-        "Type of Number and of VectorizedArrayType do not match.");
-
     public:
       /**
        * Constructor, similar to FEValues. Since this class only evaluates the
@@ -116,7 +112,7 @@ namespace internal
        * MappingInfo. This ensures compatibility with the precomputed data
        * fields in the MappingInfo class.
        */
-      const MappingInfoStorage<dim, dim, Number, VectorizedArrayType> &
+      const MappingInfoStorage<dim, dim, Number> &
       get_data_storage() const;
 
       /**
@@ -152,24 +148,22 @@ namespace internal
        * The storage part created for a single cell and held in analogy to
        * MappingInfo.
        */
-      MappingInfoStorage<dim, dim, Number, VectorizedArrayType>
-        mapping_info_storage;
+      MappingInfoStorage<dim, dim, Number> mapping_info_storage;
     };
 
 
     /*-------------------------- Inline functions ---------------------------*/
 
-    template <int dim, typename Number, typename VectorizedArrayType>
-    inline MappingDataOnTheFly<dim, Number, VectorizedArrayType>::
-      MappingDataOnTheFly(const Mapping<dim> & mapping,
-                          const Quadrature<1> &quadrature,
-                          const UpdateFlags    update_flags)
-      : fe_values(
-          mapping,
-          fe_dummy,
-          Quadrature<dim>(quadrature),
-          MappingInfo<dim, Number, VectorizedArrayType>::compute_update_flags(
-            update_flags))
+    template <int dim, typename Number>
+    inline MappingDataOnTheFly<dim, Number>::MappingDataOnTheFly(
+      const Mapping<dim> & mapping,
+      const Quadrature<1> &quadrature,
+      const UpdateFlags    update_flags)
+      : fe_values(mapping,
+                  fe_dummy,
+                  Quadrature<dim>(quadrature),
+                  MappingInfoStorage<dim, dim, Number>::compute_update_flags(
+                    update_flags))
       , quadrature_1d(quadrature)
     {
       mapping_info_storage.descriptor.resize(1);
@@ -196,10 +190,10 @@ namespace internal
 
 
 
-    template <int dim, typename Number, typename VectorizedArrayType>
-    inline MappingDataOnTheFly<dim, Number, VectorizedArrayType>::
-      MappingDataOnTheFly(const Quadrature<1> &quadrature,
-                          const UpdateFlags    update_flags)
+    template <int dim, typename Number>
+    inline MappingDataOnTheFly<dim, Number>::MappingDataOnTheFly(
+      const Quadrature<1> &quadrature,
+      const UpdateFlags    update_flags)
       : MappingDataOnTheFly(::dealii::StaticMappingQ1<dim, dim>::mapping,
                             quadrature,
                             update_flags)
@@ -207,9 +201,9 @@ namespace internal
 
 
 
-    template <int dim, typename Number, typename VectorizedArrayType>
+    template <int dim, typename Number>
     inline void
-    MappingDataOnTheFly<dim, Number, VectorizedArrayType>::reinit(
+    MappingDataOnTheFly<dim, Number>::reinit(
       typename dealii::Triangulation<dim>::cell_iterator cell)
     {
       if (present_cell == cell)
@@ -246,10 +240,9 @@ namespace internal
 
 
 
-    template <int dim, typename Number, typename VectorizedArrayType>
+    template <int dim, typename Number>
     inline bool
-    MappingDataOnTheFly<dim, Number, VectorizedArrayType>::is_initialized()
-      const
+    MappingDataOnTheFly<dim, Number>::is_initialized() const
     {
       return present_cell !=
              typename dealii::Triangulation<dim>::cell_iterator();
@@ -257,38 +250,36 @@ namespace internal
 
 
 
-    template <int dim, typename Number, typename VectorizedArrayType>
+    template <int dim, typename Number>
     inline typename dealii::Triangulation<dim>::cell_iterator
-    MappingDataOnTheFly<dim, Number, VectorizedArrayType>::get_cell() const
+    MappingDataOnTheFly<dim, Number>::get_cell() const
     {
       return fe_values.get_cell();
     }
 
 
 
-    template <int dim, typename Number, typename VectorizedArrayType>
+    template <int dim, typename Number>
     inline const dealii::FEValues<dim> &
-    MappingDataOnTheFly<dim, Number, VectorizedArrayType>::get_fe_values() const
+    MappingDataOnTheFly<dim, Number>::get_fe_values() const
     {
       return fe_values;
     }
 
 
 
-    template <int dim, typename Number, typename VectorizedArrayType>
-    inline const MappingInfoStorage<dim, dim, Number, VectorizedArrayType> &
-    MappingDataOnTheFly<dim, Number, VectorizedArrayType>::get_data_storage()
-      const
+    template <int dim, typename Number>
+    inline const MappingInfoStorage<dim, dim, Number> &
+    MappingDataOnTheFly<dim, Number>::get_data_storage() const
     {
       return mapping_info_storage;
     }
 
 
 
-    template <int dim, typename Number, typename VectorizedArrayType>
+    template <int dim, typename Number>
     inline const Quadrature<1> &
-    MappingDataOnTheFly<dim, Number, VectorizedArrayType>::get_quadrature()
-      const
+    MappingDataOnTheFly<dim, Number>::get_quadrature() const
     {
       return quadrature_1d;
     }
index 4fc62e48bea8c9ab113bcb9b02b72b58c0aac754..7087e5fda31a381abd4faa544d45361ce5d62ebc 100644 (file)
@@ -160,20 +160,19 @@ namespace internal
       /**
        * The data cache for the cells.
        */
-      std::vector<MappingInfoStorage<dim, dim, Number, VectorizedArrayType>>
-        cell_data;
+      std::vector<MappingInfoStorage<dim, dim, VectorizedArrayType>> cell_data;
 
       /**
        * The data cache for the faces.
        */
-      std::vector<MappingInfoStorage<dim - 1, dim, Number, VectorizedArrayType>>
+      std::vector<MappingInfoStorage<dim - 1, dim, VectorizedArrayType>>
         face_data;
 
       /**
        * The data cache for the face-associated-with-cell topology, following
        * the @p cell_type variable for the cell types.
        */
-      std::vector<MappingInfoStorage<dim - 1, dim, Number, VectorizedArrayType>>
+      std::vector<MappingInfoStorage<dim - 1, dim, VectorizedArrayType>>
         face_data_by_cells;
 
       /**
@@ -253,16 +252,6 @@ namespace internal
         const dealii::Triangulation<dim> &                        tria,
         const std::vector<std::pair<unsigned int, unsigned int>> &cells,
         const dealii::hp::MappingCollection<dim> &                mapping);
-
-      /**
-       * Helper function to determine which update flags must be set in the
-       * internal functions to initialize all data as requested by the user.
-       */
-      static UpdateFlags
-      compute_update_flags(
-        const UpdateFlags                                update_flags,
-        const std::vector<dealii::hp::QCollection<dim>> &quad =
-          std::vector<dealii::hp::QCollection<dim>>());
     };
 
 
@@ -277,7 +266,7 @@ namespace internal
     template <int dim, typename Number, typename VectorizedArrayType>
     struct MappingInfoCellsOrFaces<dim, Number, false, VectorizedArrayType>
     {
-      static const MappingInfoStorage<dim, dim, Number, VectorizedArrayType> &
+      static const MappingInfoStorage<dim, dim, VectorizedArrayType> &
       get(const MappingInfo<dim, Number, VectorizedArrayType> &mapping_info,
           const unsigned int                                   quad_no)
       {
@@ -289,10 +278,9 @@ namespace internal
     template <int dim, typename Number, typename VectorizedArrayType>
     struct MappingInfoCellsOrFaces<dim, Number, true, VectorizedArrayType>
     {
-      static const MappingInfoStorage<dim - 1, dim, Number, VectorizedArrayType>
-        &
-        get(const MappingInfo<dim, Number, VectorizedArrayType> &mapping_info,
-            const unsigned int                                   quad_no)
+      static const MappingInfoStorage<dim - 1, dim, VectorizedArrayType> &
+      get(const MappingInfo<dim, Number, VectorizedArrayType> &mapping_info,
+          const unsigned int                                   quad_no)
       {
         AssertIndexRange(quad_no, mapping_info.face_data.size());
         return mapping_info.face_data[quad_no];
index a434fe9b01907d10101f836527eb83f3ee806863..8371df619098300e0acfac6bd0545fa9a2ca8374 100644 (file)
@@ -29,7 +29,7 @@
 #include <deal.II/fe/mapping_q.h>
 
 #include <deal.II/matrix_free/evaluation_template_factory.h>
-#include <deal.II/matrix_free/fe_evaluation_base_data.h>
+#include <deal.II/matrix_free/fe_evaluation_data.h>
 #include <deal.II/matrix_free/mapping_info.h>
 #include <deal.II/matrix_free/mapping_info_storage.templates.h>
 #include <deal.II/matrix_free/util.h>
@@ -56,53 +56,6 @@ namespace internal
 
 
 
-    template <int dim, typename Number, typename VectorizedArrayType>
-    UpdateFlags
-    MappingInfo<dim, Number, VectorizedArrayType>::compute_update_flags(
-      const UpdateFlags                                update_flags,
-      const std::vector<dealii::hp::QCollection<dim>> &quad)
-    {
-      // this class is build around the evaluation of jacobians, so compute
-      // them in any case. The Jacobians will be inverted manually. Since we
-      // always do support integration, we also include the JxW values
-      UpdateFlags new_flags = update_jacobians | update_JxW_values;
-
-      // for Hessian information, need inverse Jacobians and the derivative of
-      // Jacobians (these two together will give use the gradients of the
-      // inverse Jacobians, which is what we need)
-      if (update_flags & update_hessians ||
-          update_flags & update_jacobian_grads)
-        new_flags |= update_jacobian_grads;
-
-      if (update_flags & update_quadrature_points)
-        new_flags |= update_quadrature_points;
-
-      // there is one more thing: if we have a quadrature formula with only
-      // one quadrature point on the first component, but more points on later
-      // components, we need to have Jacobian gradients anyway in order to
-      // determine whether the Jacobian is constant throughout a cell
-      if (quad.empty() == false)
-        {
-          bool formula_with_one_point = false;
-          for (unsigned int i = 0; i < quad[0].size(); ++i)
-            if (quad[0][i].size() == 1)
-              {
-                formula_with_one_point = true;
-                break;
-              }
-          if (formula_with_one_point == true)
-            for (unsigned int comp = 1; comp < quad.size(); ++comp)
-              for (unsigned int i = 0; i < quad[comp].size(); ++i)
-                if (quad[comp][i].size() > 1)
-                  {
-                    new_flags |= update_jacobian_grads;
-                  }
-        }
-      return new_flags;
-    }
-
-
-
     template <int dim, typename Number, typename VectorizedArrayType>
     void
     MappingInfo<dim, Number, VectorizedArrayType>::initialize(
@@ -130,7 +83,9 @@ namespace internal
       // dummy FE that is used to set up an FEValues object. Do not need the
       // actual finite element because we will only evaluate quantities for
       // the mapping that are independent of the FE
-      this->update_flags_cells = compute_update_flags(update_flags_cells, quad);
+      this->update_flags_cells =
+        MappingInfoStorage<dim, dim, VectorizedArrayType>::compute_update_flags(
+          update_flags_cells, quad);
 
       this->update_flags_boundary_faces =
         ((update_flags_inner_faces | update_flags_boundary_faces) &
@@ -646,9 +601,9 @@ namespace internal
         const std::vector<unsigned int> &              active_fe_index,
         const dealii::hp::MappingCollection<dim> &     mapping,
         MappingInfo<dim, Number, VectorizedArrayType> &mapping_info,
-        std::pair<std::vector<
-                    MappingInfoStorage<dim, dim, Number, VectorizedArrayType>>,
-                  CompressedCellData<dim, Number, VectorizedArrayType>> &data)
+        std::pair<
+          std::vector<MappingInfoStorage<dim, dim, VectorizedArrayType>>,
+          CompressedCellData<dim, Number, VectorizedArrayType>> &data)
       {
         FE_Nothing<dim> dummy_fe;
 
@@ -923,14 +878,14 @@ namespace internal
                 typename Number,
                 typename VectorizedArrayType>
       void
-      copy_data(const unsigned int                first_cell,
-                const std::array<std::size_t, 2> &data_shift,
-                const std::vector<unsigned int> & indices_compressed,
-                const std::vector<GeometryType> & cell_type,
-                MappingInfoStorage<structdim, dim, Number, VectorizedArrayType>
-                  &data_cells_local,
-                MappingInfoStorage<structdim, dim, Number, VectorizedArrayType>
-                  &data_cells)
+      copy_data(
+        const unsigned int                first_cell,
+        const std::array<std::size_t, 2> &data_shift,
+        const std::vector<unsigned int> & indices_compressed,
+        const std::vector<GeometryType> & cell_type,
+        MappingInfoStorage<structdim, dim, VectorizedArrayType>
+          &data_cells_local,
+        MappingInfoStorage<structdim, dim, VectorizedArrayType> &data_cells)
       {
         // Copy the index offsets and shift by the appropriate value
         for (unsigned int lcell = 0;
@@ -1166,7 +1121,7 @@ namespace internal
         const UpdateFlags                  update_flags_cells,
         const AlignedVector<double> &      plain_quadrature_points,
         const ShapeInfo<VectorizedDouble> &shape_info,
-        MappingInfoStorage<dim, dim, Number, VectorizedArrayType> &my_data)
+        MappingInfoStorage<dim, dim, VectorizedArrayType> &my_data)
       {
         constexpr unsigned int n_lanes   = VectorizedArrayType::size();
         constexpr unsigned int n_lanes_d = VectorizedDouble::size();
@@ -1176,9 +1131,9 @@ namespace internal
           shape_info.dofs_per_component_on_cell;
         constexpr unsigned int hess_dim = dim * (dim + 1) / 2;
 
-        MappingInfoStorage<dim, dim, double, VectorizedDouble> temp_data;
+        MappingInfoStorage<dim, dim, VectorizedDouble> temp_data;
         temp_data.copy_descriptor(my_data);
-        FEEvaluationBaseData<dim, double, false, VectorizedDouble> eval(
+        FEEvaluationData<dim, VectorizedDouble, false> eval(
           {&shape_info, nullptr, &temp_data, 0, 0});
 
         AlignedVector<VectorizedDouble> evaluation_data;
@@ -1198,7 +1153,7 @@ namespace internal
                                                 start_indices,
                                                 eval.begin_dof_values());
 
-                  FEEvaluationFactory<dim, double, VectorizedDouble>::evaluate(
+                  FEEvaluationFactory<dim, VectorizedDouble>::evaluate(
                     dim,
                     EvaluationFlags::values | EvaluationFlags::gradients |
                       (update_flags_cells & update_jacobian_grads ?
@@ -1339,7 +1294,7 @@ namespace internal
                    MultithreadInfo::n_threads());
 
       std::vector<std::pair<
-        std::vector<MappingInfoStorage<dim, dim, Number, VectorizedArrayType>>,
+        std::vector<MappingInfoStorage<dim, dim, VectorizedArrayType>>,
         ExtractCellHelper::
           CompressedCellData<dim, Number, VectorizedArrayType>>>
         data_cells_local;
@@ -1353,8 +1308,7 @@ namespace internal
         while (cell_range.first < n_cell_batches)
           {
             data_cells_local.push_back(std::make_pair(
-              std::vector<
-                MappingInfoStorage<dim, dim, Number, VectorizedArrayType>>(
+              std::vector<MappingInfoStorage<dim, dim, VectorizedArrayType>>(
                 cell_data.size()),
               ExtractCellHelper::
                 CompressedCellData<dim, Number, VectorizedArrayType>(
@@ -1569,8 +1523,7 @@ namespace internal
         const dealii::hp::MappingCollection<dim> &     mapping_in,
         MappingInfo<dim, Number, VectorizedArrayType> &mapping_info,
         std::pair<
-          std::vector<
-            MappingInfoStorage<dim - 1, dim, Number, VectorizedArrayType>>,
+          std::vector<MappingInfoStorage<dim - 1, dim, VectorizedArrayType>>,
           CompressedFaceData<dim, Number, VectorizedArrayType>> &data)
       {
         std::vector<std::vector<std::shared_ptr<FE_Nothing<dim>>>> dummy_fe(
@@ -2029,9 +1982,8 @@ namespace internal
         const unsigned int               last_face,
         const std::vector<GeometryType> &face_type,
         const std::vector<FaceToCellTopology<VectorizedArrayType::size()>>
-          &faces,
-        MappingInfoStorage<dim - 1, dim, Number, VectorizedArrayType>
-          &data_faces)
+          &                                                    faces,
+        MappingInfoStorage<dim - 1, dim, VectorizedArrayType> &data_faces)
       {
         for (unsigned int face = first_face; face < last_face; ++face)
           {
@@ -2078,7 +2030,7 @@ namespace internal
         const UpdateFlags                  update_flags_faces,
         const AlignedVector<double> &      plain_quadrature_points,
         const ShapeInfo<VectorizedDouble> &shape_info,
-        MappingInfoStorage<dim - 1, dim, Number, VectorizedArrayType> &my_data)
+        MappingInfoStorage<dim - 1, dim, VectorizedArrayType> &my_data)
       {
         constexpr unsigned int n_lanes   = VectorizedArrayType::size();
         constexpr unsigned int n_lanes_d = VectorizedDouble::size();
@@ -2088,11 +2040,11 @@ namespace internal
           shape_info.dofs_per_component_on_cell;
         constexpr unsigned int hess_dim = dim * (dim + 1) / 2;
 
-        MappingInfoStorage<dim - 1, dim, double, VectorizedDouble> temp_data;
+        MappingInfoStorage<dim - 1, dim, VectorizedDouble> temp_data;
         temp_data.copy_descriptor(my_data);
-        FEEvaluationBaseData<dim, double, true, VectorizedDouble> eval_int(
+        FEEvaluationData<dim, VectorizedDouble, true> eval_int(
           {&shape_info, nullptr, &temp_data, 0, 0}, true);
-        FEEvaluationBaseData<dim, double, true, VectorizedDouble> eval_ext(
+        FEEvaluationData<dim, VectorizedDouble, true> eval_ext(
           {&shape_info, nullptr, &temp_data, 0, 0}, false);
 
         AlignedVector<VectorizedDouble> evaluation_data, evaluation_data_ext;
@@ -2129,7 +2081,7 @@ namespace internal
 
               // now let the matrix-free evaluators provide us with the
               // data on faces
-              FEFaceEvaluationFactory<dim, double, VectorizedDouble>::evaluate(
+              FEFaceEvaluationFactory<dim, VectorizedDouble>::evaluate(
                 dim,
                 EvaluationFlags::values | EvaluationFlags::gradients |
                   (update_flags_faces & update_jacobian_grads ?
@@ -2153,12 +2105,11 @@ namespace internal
               const unsigned int offset = my_data.data_index_offsets[face];
 
               const auto compute_jacobian_grad =
-                [&](unsigned int                     face_no,
-                    int                              is_exterior,
-                    unsigned int                     q,
-                    Tensor<2, dim, VectorizedDouble> inv_jac,
-                    FEEvaluationBaseData<dim, double, true, VectorizedDouble>
-                      &eval) {
+                [&](unsigned int                                   face_no,
+                    int                                            is_exterior,
+                    unsigned int                                   q,
+                    Tensor<2, dim, VectorizedDouble>               inv_jac,
+                    FEEvaluationData<dim, VectorizedDouble, true> &eval) {
                   Tensor<2, dim, VectorizedDouble> inv_transp_jac_permut;
                   for (unsigned int d = 0; d < dim; ++d)
                     for (unsigned int e = 0; e < dim; ++e)
@@ -2299,15 +2250,14 @@ namespace internal
                                                 start_indices,
                                                 eval_ext.begin_dof_values());
 
-                  FEFaceEvaluationFactory<dim, double, VectorizedDouble>::
-                    evaluate(dim,
-                             EvaluationFlags::values |
-                               EvaluationFlags::gradients |
-                               (update_flags_faces & update_jacobian_grads ?
-                                  EvaluationFlags::hessians :
-                                  EvaluationFlags::nothing),
-                             eval_ext.begin_dof_values(),
-                             eval_ext);
+                  FEFaceEvaluationFactory<dim, VectorizedDouble>::evaluate(
+                    dim,
+                    EvaluationFlags::values | EvaluationFlags::gradients |
+                      (update_flags_faces & update_jacobian_grads ?
+                         EvaluationFlags::hessians :
+                         EvaluationFlags::nothing),
+                    eval_ext.begin_dof_values(),
+                    eval_ext);
 
                   for (unsigned int q = 0; q < n_points_compute; ++q)
                     {
@@ -2377,8 +2327,7 @@ namespace internal
                    MultithreadInfo::n_threads());
 
       std::vector<std::pair<
-        std::vector<
-          MappingInfoStorage<dim - 1, dim, Number, VectorizedArrayType>>,
+        std::vector<MappingInfoStorage<dim - 1, dim, VectorizedArrayType>>,
         ExtractFaceHelper::
           CompressedFaceData<dim, Number, VectorizedArrayType>>>
         data_faces_local;
@@ -2393,7 +2342,7 @@ namespace internal
           {
             data_faces_local.push_back(std::make_pair(
               std::vector<
-                MappingInfoStorage<dim - 1, dim, Number, VectorizedArrayType>>(
+                MappingInfoStorage<dim - 1, dim, VectorizedArrayType>>(
                 face_data.size()),
               ExtractFaceHelper::
                 CompressedFaceData<dim, Number, VectorizedArrayType>(
@@ -2678,7 +2627,7 @@ namespace internal
       // points, filling up all SIMD lanes as appropriate
       for (unsigned int my_q = 0; my_q < cell_data.size(); ++my_q)
         {
-          MappingInfoStorage<dim, dim, Number, VectorizedArrayType> &my_data =
+          MappingInfoStorage<dim, dim, VectorizedArrayType> &my_data =
             cell_data[my_q];
 
           // step 4a: set the index offsets, find out how much to allocate,
@@ -2800,8 +2749,8 @@ namespace internal
       // points, filling up all SIMD lanes as appropriate
       for (unsigned int my_q = 0; my_q < face_data.size(); ++my_q)
         {
-          MappingInfoStorage<dim - 1, dim, Number, VectorizedArrayType>
-            &my_data = face_data[my_q];
+          MappingInfoStorage<dim - 1, dim, VectorizedArrayType> &my_data =
+            face_data[my_q];
 
           // step 6a: set the index offsets, find out how much to allocate,
           // and allocate the memory
index 4457046663049b1b95b739432d63961346e76f05..9dd239683cf8a592361a719ed0d8e9cc557e8c74 100644 (file)
@@ -109,18 +109,18 @@ namespace internal
      *
      * @ingroup matrixfree
      */
-    template <int structdim,
-              int spacedim,
-              typename Number,
-              typename VectorizedArrayType>
+    template <int structdim, int spacedim, typename Number>
     struct MappingInfoStorage
     {
-      static_assert(
-        std::is_same<Number, typename VectorizedArrayType::value_type>::value,
-        "Type of Number and of VectorizedArrayType do not match.");
-
       struct QuadratureDescriptor
       {
+        /**
+         * In case this class is instantiated for VectorizedArray types, this
+         * indicates the underlying scalar type for data which is the same on
+         * all lanes like the quadrature weights.
+         */
+        using ScalarNumber = typename VectorizedArrayTrait<Number>::value_type;
+
         /**
          * Constructor. Does nothing.
          */
@@ -167,14 +167,15 @@ namespace internal
          * Quadrature weights separated by dimension for use in specific
          * situations.
          */
-        std::array<AlignedVector<Number>, structdim> tensor_quadrature_weights;
+        std::array<AlignedVector<ScalarNumber>, structdim>
+          tensor_quadrature_weights;
 
         /**
          * A cached vector of quadrature weights in the given number format
          * (non-vectorized, as it is cheap to broadcast the value to all lanes
          * when it is used in a vectorized context).
          */
-        AlignedVector<Number> quadrature_weights;
+        AlignedVector<ScalarNumber> quadrature_weights;
 
         /**
          * For quadrature on faces, the evaluation of basis functions is not
@@ -217,14 +218,14 @@ namespace internal
        *
        * Indexed by @p data_index_offsets.
        */
-      AlignedVector<VectorizedArrayType> JxW_values;
+      AlignedVector<Number> JxW_values;
 
       /**
        * Stores the normal vectors.
        *
        * Indexed by @p data_index_offsets.
        */
-      AlignedVector<Tensor<1, spacedim, VectorizedArrayType>> normal_vectors;
+      AlignedVector<Tensor<1, spacedim, Number>> normal_vectors;
 
       /**
        * The storage of covariant transformation on quadrature points, i.e.,
@@ -237,8 +238,7 @@ namespace internal
        * but the default case (cell integrals or boundary integrals) only
        * fills the zeroth component and ignores the first one.
        */
-      std::array<AlignedVector<Tensor<2, spacedim, VectorizedArrayType>>, 2>
-        jacobians;
+      std::array<AlignedVector<Tensor<2, spacedim, Number>>, 2> jacobians;
 
       /**
        * The storage of the gradients of the inverse Jacobian
@@ -256,9 +256,8 @@ namespace internal
        * fills the zeroth component and ignores the first one.
        */
       std::array<
-        AlignedVector<Tensor<1,
-                             spacedim *(spacedim + 1) / 2,
-                             Tensor<1, spacedim, VectorizedArrayType>>>,
+        AlignedVector<
+          Tensor<1, spacedim *(spacedim + 1) / 2, Tensor<1, spacedim, Number>>>,
         2>
         jacobian_gradients;
 
@@ -269,7 +268,7 @@ namespace internal
        *
        * Indexed by @p data_index_offsets.
        */
-      std::array<AlignedVector<Tensor<1, spacedim, VectorizedArrayType>>, 2>
+      std::array<AlignedVector<Tensor<1, spacedim, Number>>, 2>
         normals_times_jacobians;
 
       /**
@@ -287,7 +286,7 @@ namespace internal
        *
        * Indexed by @p quadrature_point_offsets.
        */
-      AlignedVector<Point<spacedim, VectorizedArrayType>> quadrature_points;
+      AlignedVector<Point<spacedim, Number>> quadrature_points;
 
       /**
        * Clears all data fields except the descriptor vector.
@@ -308,12 +307,20 @@ namespace internal
        * Get the descriptor from another instance of QuadratureDescriptor,
        * clearing all other data fields.
        */
-      template <typename Number2, typename VectorizedArrayType2>
+      template <typename Number2>
       void
-      copy_descriptor(const MappingInfoStorage<structdim,
-                                               spacedim,
-                                               Number2,
-                                               VectorizedArrayType2> &other);
+      copy_descriptor(
+        const MappingInfoStorage<structdim, spacedim, Number2> &other);
+
+      /**
+       * Helper function to determine which update flags must be set in the
+       * internal functions to initialize all data as requested by the user.
+       */
+      static UpdateFlags
+      compute_update_flags(
+        const UpdateFlags                                     update_flags,
+        const std::vector<dealii::hp::QCollection<spacedim>> &quad =
+          std::vector<dealii::hp::QCollection<spacedim>>());
 
       /**
        * Prints a detailed summary of memory consumption in the different
@@ -335,13 +342,10 @@ namespace internal
 
     /* ------------------- inline functions ----------------------------- */
 
-    template <int structdim,
-              int spacedim,
-              typename Number,
-              typename VectorizedArrayType>
+    template <int structdim, int spacedim, typename Number>
     inline unsigned int
-    MappingInfoStorage<structdim, spacedim, Number, VectorizedArrayType>::
-      quad_index_from_n_q_points(const unsigned int n_q_points) const
+    MappingInfoStorage<structdim, spacedim, Number>::quad_index_from_n_q_points(
+      const unsigned int n_q_points) const
     {
       for (unsigned int i = 0; i < descriptor.size(); ++i)
         if (n_q_points == descriptor[i].n_q_points)
index aff20a206e964d4d1675cca697ac8bf92cf3b032..d4c15ef09ab8c238b1eeff12fd115d105c1279bb 100644 (file)
@@ -40,27 +40,20 @@ namespace internal
 {
   namespace MatrixFreeFunctions
   {
-    template <int structdim,
-              int spacedim,
-              typename Number,
-              typename VectorizedArrayType>
-    MappingInfoStorage<structdim, spacedim, Number, VectorizedArrayType>::
-      QuadratureDescriptor::QuadratureDescriptor()
+    template <int structdim, int spacedim, typename Number>
+    MappingInfoStorage<structdim, spacedim, Number>::QuadratureDescriptor::
+      QuadratureDescriptor()
       : n_q_points(numbers::invalid_unsigned_int)
     {}
 
 
 
-    template <int structdim,
-              int spacedim,
-              typename Number,
-              typename VectorizedArrayType>
+    template <int structdim, int spacedim, typename Number>
     template <int dim_q>
     void
-    MappingInfoStorage<structdim, spacedim, Number, VectorizedArrayType>::
-      QuadratureDescriptor::initialize(
-        const Quadrature<dim_q> &quadrature,
-        const UpdateFlags        update_flags_inner_faces)
+    MappingInfoStorage<structdim, spacedim, Number>::QuadratureDescriptor::
+      initialize(const Quadrature<dim_q> &quadrature,
+                 const UpdateFlags        update_flags_inner_faces)
     {
       Assert(structdim + 1 <= spacedim ||
                update_flags_inner_faces == update_default,
@@ -79,15 +72,11 @@ namespace internal
 
 
 
-    template <int structdim,
-              int spacedim,
-              typename Number,
-              typename VectorizedArrayType>
+    template <int structdim, int spacedim, typename Number>
     void
-    MappingInfoStorage<structdim, spacedim, Number, VectorizedArrayType>::
-      QuadratureDescriptor::initialize(
-        const Quadrature<1> &quadrature_1d,
-        const UpdateFlags    update_flags_inner_faces)
+    MappingInfoStorage<structdim, spacedim, Number>::QuadratureDescriptor::
+      initialize(const Quadrature<1> &quadrature_1d,
+                 const UpdateFlags    update_flags_inner_faces)
     {
       Assert(structdim + 1 <= spacedim ||
                update_flags_inner_faces == update_default,
@@ -137,13 +126,10 @@ namespace internal
 
 
 
-    template <int structdim,
-              int spacedim,
-              typename Number,
-              typename VectorizedArrayType>
+    template <int structdim, int spacedim, typename Number>
     std::size_t
-    MappingInfoStorage<structdim, spacedim, Number, VectorizedArrayType>::
-      QuadratureDescriptor::memory_consumption() const
+    MappingInfoStorage<structdim, spacedim, Number>::QuadratureDescriptor::
+      memory_consumption() const
     {
       std::size_t memory = sizeof(this) + quadrature.memory_consumption() +
                            quadrature_weights.memory_consumption() +
@@ -155,13 +141,9 @@ namespace internal
 
 
 
-    template <int structdim,
-              int spacedim,
-              typename Number,
-              typename VectorizedArrayType>
+    template <int structdim, int spacedim, typename Number>
     void
-    MappingInfoStorage<structdim, spacedim, Number, VectorizedArrayType>::
-      clear_data_fields()
+    MappingInfoStorage<structdim, spacedim, Number>::clear_data_fields()
     {
       data_index_offsets.clear();
       JxW_values.clear();
@@ -178,17 +160,11 @@ namespace internal
 
 
 
-    template <int structdim,
-              int spacedim,
-              typename Number,
-              typename VectorizedArrayType>
-    template <typename Number2, typename VectorizedArrayType2>
+    template <int structdim, int spacedim, typename Number>
+    template <typename Number2>
     void
-    MappingInfoStorage<structdim, spacedim, Number, VectorizedArrayType>::
-      copy_descriptor(const MappingInfoStorage<structdim,
-                                               spacedim,
-                                               Number2,
-                                               VectorizedArrayType2> &other)
+    MappingInfoStorage<structdim, spacedim, Number>::copy_descriptor(
+      const MappingInfoStorage<structdim, spacedim, Number2> &other)
     {
       clear_data_fields();
       descriptor.clear();
@@ -219,13 +195,56 @@ namespace internal
 
 
 
-    template <int structdim,
-              int spacedim,
-              typename Number,
-              typename VectorizedArrayType>
+    template <int structdim, int spacedim, typename Number>
+    UpdateFlags
+    MappingInfoStorage<structdim, spacedim, Number>::compute_update_flags(
+      const UpdateFlags                                     update_flags,
+      const std::vector<dealii::hp::QCollection<spacedim>> &quad)
+    {
+      // this class is build around the evaluation of jacobians, so compute
+      // them in any case. The Jacobians will be inverted manually. Since we
+      // always do support integration, we also include the JxW values
+      UpdateFlags new_flags = update_jacobians | update_JxW_values;
+
+      // for Hessian information, need inverse Jacobians and the derivative of
+      // Jacobians (these two together will give use the gradients of the
+      // inverse Jacobians, which is what we need)
+      if (update_flags & update_hessians ||
+          update_flags & update_jacobian_grads)
+        new_flags |= update_jacobian_grads;
+
+      if (update_flags & update_quadrature_points)
+        new_flags |= update_quadrature_points;
+
+      // there is one more thing: if we have a quadrature formula with only
+      // one quadrature point on the first component, but more points on later
+      // components, we need to have Jacobian gradients anyway in order to
+      // determine whether the Jacobian is constant throughout a cell
+      if (quad.empty() == false)
+        {
+          bool formula_with_one_point = false;
+          for (unsigned int i = 0; i < quad[0].size(); ++i)
+            if (quad[0][i].size() == 1)
+              {
+                formula_with_one_point = true;
+                break;
+              }
+          if (formula_with_one_point == true)
+            for (unsigned int comp = 1; comp < quad.size(); ++comp)
+              for (unsigned int i = 0; i < quad[comp].size(); ++i)
+                if (quad[comp][i].size() > 1)
+                  {
+                    new_flags |= update_jacobian_grads;
+                  }
+        }
+      return new_flags;
+    }
+
+
+
+    template <int structdim, int spacedim, typename Number>
     std::size_t
-    MappingInfoStorage<structdim, spacedim, Number, VectorizedArrayType>::
-      memory_consumption() const
+    MappingInfoStorage<structdim, spacedim, Number>::memory_consumption() const
     {
       return MemoryConsumption::memory_consumption(descriptor) +
              MemoryConsumption::memory_consumption(data_index_offsets) +
@@ -243,14 +262,12 @@ namespace internal
 
 
 
-    template <int structdim,
-              int spacedim,
-              typename Number,
-              typename VectorizedArrayType>
+    template <int structdim, int spacedim, typename Number>
     template <typename StreamType>
     void
-    MappingInfoStorage<structdim, spacedim, Number, VectorizedArrayType>::
-      print_memory_consumption(StreamType &out, const TaskInfo &task_info) const
+    MappingInfoStorage<structdim, spacedim, Number>::print_memory_consumption(
+      StreamType &    out,
+      const TaskInfo &task_info) const
     {
       // print_memory_statistics involves global communication, so we can
       // disable the check here only if no processor has any such data
index 319e35ccb546699bbd0116d4bbb5c0f5b5269043..64f18fae96a94da7a64a4ec2bdf1ac541949c154 100644 (file)
@@ -1067,8 +1067,8 @@ namespace MatrixFreeOperators
       internal::CellwiseInverseMassMatrixImplBasic<dim, VectorizedArrayType>::
         template run<fe_degree>(n_components, fe_eval, in_array, out_array);
     else
-      internal::CellwiseInverseMassFactory<dim, Number, VectorizedArrayType>::
-        apply(n_components, fe_eval, in_array, out_array);
+      internal::CellwiseInverseMassFactory<dim, VectorizedArrayType>::apply(
+        n_components, fe_eval, in_array, out_array);
   }
 
 
@@ -1101,13 +1101,13 @@ namespace MatrixFreeOperators
           in_array,
           out_array);
     else
-      internal::CellwiseInverseMassFactory<dim, Number, VectorizedArrayType>::
-        apply(n_actual_components,
-              given_degree,
-              fe_eval.get_shape_info().data.front().inverse_shape_values_eo,
-              inverse_coefficients,
-              in_array,
-              out_array);
+      internal::CellwiseInverseMassFactory<dim, VectorizedArrayType>::apply(
+        n_actual_components,
+        given_degree,
+        fe_eval.get_shape_info().data.front().inverse_shape_values_eo,
+        inverse_coefficients,
+        in_array,
+        out_array);
   }
 
 
@@ -1138,7 +1138,7 @@ namespace MatrixFreeOperators
                                                           in_array,
                                                           out_array);
     else
-      internal::CellwiseInverseMassFactory<dim, Number, VectorizedArrayType>::
+      internal::CellwiseInverseMassFactory<dim, VectorizedArrayType>::
         transform_from_q_points_to_basis(n_actual_components,
                                          fe_eval,
                                          in_array,
index 468f6f3724e30c90ebe5a4f7c991b248970fd710..6e99a7faff82259ff6b5f7455e06e6fa1fcb7e62 100644 (file)
 for (deal_II_dimension : DIMENSIONS;
      deal_II_scalar_vectorized : REAL_SCALARS_VECTORIZED)
   {
-    template struct dealii::internal::FEEvaluationFactory<
-      deal_II_dimension,
-      deal_II_scalar_vectorized::value_type,
-      deal_II_scalar_vectorized>;
+    template struct dealii::internal::
+      FEEvaluationFactory<deal_II_dimension, deal_II_scalar_vectorized>;
+
+    template struct dealii::internal::
+      FEFaceEvaluationFactory<deal_II_dimension, deal_II_scalar_vectorized>;
 
-    template struct dealii::internal::FEFaceEvaluationFactory<
+    template struct dealii::internal::FEFaceEvaluationGatherFactory<
       deal_II_dimension,
       deal_II_scalar_vectorized::value_type,
       deal_II_scalar_vectorized>;
 
     // inverse mass
-    template struct dealii::internal::CellwiseInverseMassFactory<
-      deal_II_dimension,
-      deal_II_scalar_vectorized::value_type,
-      deal_II_scalar_vectorized>;
+    template struct dealii::internal::
+      CellwiseInverseMassFactory<deal_II_dimension, deal_II_scalar_vectorized>;
   }
index 7b3996bf0b9bc67c882a954c9c51aae29ee473ac..1ebb0afa32a6a5d4c7b3cd66e36c9774c2839449 100644 (file)
@@ -25,14 +25,12 @@ for (deal_II_dimension : DIMENSIONS;
     template struct internal::MatrixFreeFunctions::MappingInfoStorage<
       deal_II_dimension,
       deal_II_dimension,
-      deal_II_scalar_vectorized::value_type,
       deal_II_scalar_vectorized>;
 
 #if deal_II_dimension > 1
     template struct internal::MatrixFreeFunctions::MappingInfoStorage<
       deal_II_dimension - 1,
       deal_II_dimension,
-      deal_II_scalar_vectorized::value_type,
       deal_II_scalar_vectorized>;
 #endif
 

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.