From: Peter Munch Date: Thu, 6 Jan 2022 12:45:28 +0000 (+0100) Subject: FEPointEvaluation: fix types for multiple components X-Git-Tag: v9.4.0-rc1~658^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b424655be3fc41d8092315601439a4cd0e73bedd;p=dealii.git FEPointEvaluation: fix types for multiple components --- 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]);