]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Switch SymmetricTensor -> Tensor for better performance. 11114/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 29 Oct 2020 11:17:39 +0000 (12:17 +0100)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Thu, 29 Oct 2020 11:17:39 +0000 (12:17 +0100)
include/deal.II/fe/mapping_q_internal.h

index 9ea8c9c231a0cc87156d1fb743891e62f8582317..bb3c28ca593efe251f9f9cd9d5ef5080b74d2fe8 100644 (file)
@@ -912,7 +912,7 @@ namespace internal
             return;
           }
 
-        SymmetricTensor<2, n_functions> matrix;
+        Tensor<2, n_functions>          matrix;
         std::array<double, n_functions> shape_values;
         for (unsigned int q = 0; q < unit_support_points.size(); ++q)
           {
@@ -935,7 +935,7 @@ namespace internal
             // reference point positions which sets up an inverse
             // interpolation.
             for (unsigned int i = 0; i < n_functions; ++i)
-              for (unsigned int j = 0; j <= i; ++j)
+              for (unsigned int j = 0; j < n_functions; ++j)
                 matrix[i][j] += shape_values[i] * shape_values[j];
             for (unsigned int i = 0; i < n_functions; ++i)
               coefficients[i] += shape_values[i] * unit_support_points[q];

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.