]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Shortcut tensor product path in case of collocation
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 2 Apr 2020 05:52:43 +0000 (07:52 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 2 Apr 2020 05:52:43 +0000 (07:52 +0200)
source/fe/mapping_q_generic.cc

index b466aef730bca5c49b7d6918f32ffaf66ad0fa75..973275b15133e2bf70de6e2a75b7623e49879221 100644 (file)
@@ -1517,6 +1517,19 @@ namespace internal
         Assert(!evaluate_hessians || n_q_points == jacobian_grads.size(),
                ExcDimensionMismatch(n_q_points, jacobian_grads.size()));
 
+        // shortcut in case we have an identity interpolation and only request
+        // the quadrature points
+        if (evaluate_values && !evaluate_gradients & !evaluate_hessians &&
+            data.shape_info.element_type ==
+              internal::MatrixFreeFunctions::tensor_symmetric_collocation)
+          {
+            for (unsigned int q = 0; q < n_q_points; ++q)
+              quadrature_points[q] =
+                data.mapping_support_points[data.shape_info
+                                              .lexicographic_numbering[q]];
+            return;
+          }
+
         // prepare arrays
         if (evaluate_values || evaluate_gradients || evaluate_hessians)
           {

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.