From b424655be3fc41d8092315601439a4cd0e73bedd Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Thu, 6 Jan 2022 13:45:28 +0100 Subject: [PATCH] FEPointEvaluation: fix types for multiple components --- .../deal.II/matrix_free/fe_point_evaluation.h | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/include/deal.II/matrix_free/fe_point_evaluation.h b/include/deal.II/matrix_free/fe_point_evaluation.h index 6f26a70e8f..f00ee94623 100644 --- a/include/deal.II/matrix_free/fe_point_evaluation.h +++ b/include/deal.II/matrix_free/fe_point_evaluation.h @@ -270,13 +270,13 @@ namespace internal return value[component]; } - static Tensor<1, dim> & + static Tensor<1, dim, Number> & access(gradient_type &value, const unsigned int component) { return value[component]; } - static const Tensor<1, dim> & + static const Tensor<1, dim, Number> & access(const gradient_type &value, const unsigned int component) { return value[component]; @@ -926,9 +926,12 @@ FEPointEvaluation::evaluate( Number>::set_gradient(val_and_grad.second, j, unit_gradients[i + j]); - gradients[i + j] = apply_transformation( + gradients[i + j] = static_cast< + typename internal::FEPointEvaluation:: + EvaluatorTypeTraits:: + gradient_type>(apply_transformation( mapping_data.inverse_jacobians[i + j].transpose(), - unit_gradients[i + j]); + unit_gradients[i + j])); } } } @@ -1055,8 +1058,11 @@ FEPointEvaluation::integrate( Assert(update_flags_mapping & update_inverse_jacobians, ExcNotInitialized()); gradients[i + j] = - apply_transformation(mapping_data.inverse_jacobians[i + j], - gradients[i + j]); + static_cast:: + gradient_type>( + apply_transformation(mapping_data.inverse_jacobians[i + j], + gradients[i + j])); internal::FEPointEvaluation:: EvaluatorTypeTraits::get_gradient( gradient, j, gradients[i + j]); -- 2.39.5