From 074803dd5b1ad1d82718a8fefef6a305806728e4 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Wed, 27 Jan 2021 11:01:19 +0100 Subject: [PATCH] Fix FEPointEvaluation if only grad is requested --- include/deal.II/fe/fe_point_evaluation.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/deal.II/fe/fe_point_evaluation.h b/include/deal.II/fe/fe_point_evaluation.h index eeeae8efcc..7be7c2dc51 100644 --- a/include/deal.II/fe/fe_point_evaluation.h +++ b/include/deal.II/fe/fe_point_evaluation.h @@ -519,13 +519,13 @@ FEPointEvaluation::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::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::access(values[q], d) += @@ -543,12 +543,12 @@ FEPointEvaluation::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::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) += -- 2.39.5