]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Explicitly spell out a loop. 15895/head
authorDavid Wells <drwells@email.unc.edu>
Mon, 21 Aug 2023 01:56:24 +0000 (21:56 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 21 Aug 2023 01:56:24 +0000 (21:56 -0400)
source/fe/fe_values_views_internal.cc

index ab6abb8a6e202082089b4843fd297f6e98782a12..030db4d57a26d941e20331ae42f0f44e1649d3b5 100644 (file)
@@ -355,9 +355,13 @@ namespace FEValuesViews
                 &shape_gradients[snc][0];
               for (unsigned int q_point = 0; q_point < n_quadrature_points;
                    ++q_point)
-                symmetric_gradients[q_point] +=
-                  value * dealii::SymmetricTensor<2, spacedim>(
-                            symmetrize_single_row(comp, *shape_gradient_ptr++));
+                {
+                  for (unsigned int d = 0; d < dim; ++d)
+                    symmetric_gradients[q_point][comp][d] +=
+                      0.5 * value * (*shape_gradient_ptr)[d];
+                  symmetric_gradients[q_point][comp][comp] +=
+                    0.5 * value * (*shape_gradient_ptr++)[comp];
+                }
             }
           else
             for (unsigned int q_point = 0; q_point < n_quadrature_points;

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.