]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix FEPointEvaluation if only grad is requested 11639/head
authorPeter Munch <peterrmuench@gmail.com>
Wed, 27 Jan 2021 10:01:19 +0000 (11:01 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Wed, 27 Jan 2021 10:01:19 +0000 (11:01 +0100)
include/deal.II/fe/fe_point_evaluation.h

index eeeae8efcc87ba9ff356e225bf9908a124f8eaf3..7be7c2dc51f00fe61dde62a92b84c014a5eaab2d 100644 (file)
@@ -519,13 +519,13 @@ FEPointEvaluation<n_components, dim, spacedim>::evaluate(
               for (unsigned int d = 0; d < n_components; ++d)
                 if (nonzero_shape_function_component[i][d] &&
                     (fe->is_primitive(i) || fe->is_primitive()))
-                  for (unsigned int q = 0; q < values.size(); ++q)
+                  for (unsigned int q = 0; q < unit_points.size(); ++q)
                     internal::FEPointEvaluation::
                       EvaluatorTypeTraits<dim, n_components>::access(values[q],
                                                                      d) +=
                       fe_values.shape_value(i, q) * value;
                 else if (nonzero_shape_function_component[i][d])
-                  for (unsigned int q = 0; q < values.size(); ++q)
+                  for (unsigned int q = 0; q < unit_points.size(); ++q)
                     internal::FEPointEvaluation::
                       EvaluatorTypeTraits<dim, n_components>::access(values[q],
                                                                      d) +=
@@ -543,12 +543,12 @@ FEPointEvaluation<n_components, dim, spacedim>::evaluate(
               for (unsigned int d = 0; d < n_components; ++d)
                 if (nonzero_shape_function_component[i][d] &&
                     (fe->is_primitive(i) || fe->is_primitive()))
-                  for (unsigned int q = 0; q < values.size(); ++q)
+                  for (unsigned int q = 0; q < unit_points.size(); ++q)
                     internal::FEPointEvaluation::
                       EvaluatorTypeTraits<dim, n_components>::access(
                         gradients[q], d) += fe_values.shape_grad(i, q) * value;
                 else if (nonzero_shape_function_component[i][d])
-                  for (unsigned int q = 0; q < values.size(); ++q)
+                  for (unsigned int q = 0; q < unit_points.size(); ++q)
                     internal::FEPointEvaluation::EvaluatorTypeTraits<
                       dim,
                       n_components>::access(gradients[q], d) +=

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.