From: Martin Kronbichler Date: Tue, 26 Mar 2024 16:53:41 +0000 (+0100) Subject: FEEvaluation: Ensure assertions in get_value/gradient are working X-Git-Tag: v9.6.0-rc1~451^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16789%2Fhead;p=dealii.git FEEvaluation: Ensure assertions in get_value/gradient are working --- diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index 913a8418f0..83d3eb462e 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -6636,12 +6636,12 @@ FEEvaluationvalues_quad_initialized = true; - if (evaluation_flag_actual & EvaluationFlags::gradients) - this->gradients_quad_initialized = true; - if (evaluation_flag_actual & EvaluationFlags::hessians) - this->hessians_quad_initialized = true; + this->values_quad_initialized = + evaluation_flag_actual & EvaluationFlags::values; + this->gradients_quad_initialized = + evaluation_flag_actual & EvaluationFlags::gradients; + this->hessians_quad_initialized = + evaluation_flag_actual & EvaluationFlags::hessians; # endif } @@ -7340,12 +7340,12 @@ FEFaceEvaluationvalues_quad_initialized = true; - if (evaluation_flag_actual & EvaluationFlags::gradients) - this->gradients_quad_initialized = true; - if ((evaluation_flag_actual & EvaluationFlags::hessians) != 0u) - this->hessians_quad_initialized = true; + this->values_quad_initialized = + evaluation_flag_actual & EvaluationFlags::values; + this->gradients_quad_initialized = + evaluation_flag_actual & EvaluationFlags::gradients; + this->hessians_quad_initialized = + evaluation_flag_actual & EvaluationFlags::hessians; # endif } @@ -7474,12 +7474,12 @@ FEFaceEvaluationvalues_quad_initialized = true; - if (evaluation_flag_actual & EvaluationFlags::gradients) - this->gradients_quad_initialized = true; - if ((evaluation_flag_actual & EvaluationFlags::hessians) != 0u) - this->hessians_quad_initialized = true; + this->values_quad_initialized = + evaluation_flag_actual & EvaluationFlags::values; + this->gradients_quad_initialized = + evaluation_flag_actual & EvaluationFlags::gradients; + this->hessians_quad_initialized = + evaluation_flag_actual & EvaluationFlags::hessians; # endif } @@ -7821,12 +7821,10 @@ FEFaceEvaluationvalues_quad_initialized = true; - if (evaluation_flag & EvaluationFlags::gradients) - this->gradients_quad_initialized = true; - if (evaluation_flag & EvaluationFlags::hessians) - this->hessians_quad_initialized = true; + this->values_quad_initialized = evaluation_flag & EvaluationFlags::values; + this->gradients_quad_initialized = + evaluation_flag & EvaluationFlags::gradients; + this->hessians_quad_initialized = evaluation_flag & EvaluationFlags::hessians; # endif }