From b9c821ae50d05cb8584ad6a6a7af83c8261ae976 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Tue, 23 Jul 2024 19:03:59 +0200 Subject: [PATCH] FEEvaluation: Allow submit_value with Tensor<1,1> more often --- include/deal.II/matrix_free/fe_evaluation.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index 78ddb7e298..4dff2cd9ee 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -355,14 +355,14 @@ public: submit_value(const value_type val_in, const unsigned int q_point); /** - * In 1D, the value_type and gradient_type can be unintentionally mixed - * up because FEEvaluationBase does not distinguish between scalar accessors - * and vector-valued accessors and the respective types, but solely in terms - * of the number of components and dimension. Thus, enable the use of - * submit_value() also for tensors with a single component. + * For scalar elements, the value_type and gradient_type can be + * unintentionally mixed up because FEEvaluationBase does not distinguish + * between scalar accessors and vector-valued accessors and the respective + * types, but solely in terms of the number of components and dimension. Thus, + * enable the use of submit_value() also for tensors with a single component. */ - template > + template > void submit_value(const Tensor<1, 1, VectorizedArrayType> val_in, const unsigned int q_point); @@ -4911,7 +4911,7 @@ FEEvaluationBase:: submit_value(const Tensor<1, 1, VectorizedArrayType> val_in, const unsigned int q_point) { - static_assert(n_components == 1 && dim == 1, + static_assert(n_components == 1, "Do not try to modify the default template parameters used for" " selectively enabling this function via std::enable_if!"); submit_value(val_in[0], q_point); -- 2.39.5