From 0e5ff0a050c1488c227195dbb96351e41bae8cf6 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sun, 20 Aug 2023 21:56:24 -0400 Subject: [PATCH] Explicitly spell out a loop. --- source/fe/fe_values_views_internal.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/fe/fe_values_views_internal.cc b/source/fe/fe_values_views_internal.cc index ab6abb8a6e..030db4d57a 100644 --- a/source/fe/fe_values_views_internal.cc +++ b/source/fe/fe_values_views_internal.cc @@ -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; -- 2.39.5