From: Martin Kronbichler Date: Tue, 23 Jul 2024 17:03:59 +0000 (+0200) Subject: FEEvaluation: Allow submit_value with Tensor<1,1> more often X-Git-Tag: v9.6.0-rc1~10^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9c821ae50d05cb8584ad6a6a7af83c8261ae976;p=dealii.git FEEvaluation: Allow submit_value with Tensor<1,1> more often --- 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);