From: Rene Gassmoeller Date: Tue, 1 Oct 2024 10:25:46 +0000 (+0200) Subject: Return earlier if possible X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17740%2Fhead;p=dealii.git Return earlier if possible --- diff --git a/include/deal.II/matrix_free/fe_point_evaluation.h b/include/deal.II/matrix_free/fe_point_evaluation.h index cb80eb478d..3878f076e9 100644 --- a/include/deal.II/matrix_free/fe_point_evaluation.h +++ b/include/deal.II/matrix_free/fe_point_evaluation.h @@ -2467,18 +2467,18 @@ FEPointEvaluation::evaluate( const StridedArrayView &solution_values, const EvaluationFlags::EvaluationFlags &evaluation_flags) { - if (this->must_reinitialize_pointers) - internal_reinit_single_cell_state_mapping_info(); - - if (this->n_q_points == 0) - return; - Assert(!(evaluation_flags & EvaluationFlags::hessians), ExcNotImplemented()); if (!((evaluation_flags & EvaluationFlags::values) || (evaluation_flags & EvaluationFlags::gradients))) // no evaluation flags return; + if (this->must_reinitialize_pointers) + internal_reinit_single_cell_state_mapping_info(); + + if (this->n_q_points == 0) + return; + AssertDimension(solution_values.size(), this->fe->dofs_per_cell); if (this->fast_path) {