From 781e24dd73047cee8ff115451757855b3cbe8447 Mon Sep 17 00:00:00 2001 From: Rene Gassmoeller Date: Tue, 1 Oct 2024 12:25:46 +0200 Subject: [PATCH] Return earlier if possible --- include/deal.II/matrix_free/fe_point_evaluation.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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) { -- 2.39.5