From: Martin Kronbichler Date: Fri, 3 May 2024 15:16:42 +0000 (+0200) Subject: FEPointEvaluation: Use separate reinit function for clearer separation X-Git-Tag: v9.6.0-rc1~224^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F16958%2Fhead;p=dealii.git FEPointEvaluation: Use separate reinit function for clearer separation --- diff --git a/include/deal.II/matrix_free/fe_point_evaluation.h b/include/deal.II/matrix_free/fe_point_evaluation.h index c8428b20be..ef56931f7e 100644 --- a/include/deal.II/matrix_free/fe_point_evaluation.h +++ b/include/deal.II/matrix_free/fe_point_evaluation.h @@ -1454,6 +1454,14 @@ private: const StridedArrayView &solution_values, const EvaluationFlags::EvaluationFlags &integration_flags, const bool sum_into_values); + + /** + * Internal function to initialize the pointers of this class when an + * external MappingInfo has already queried the mapping for the relevant + * information. + */ + void + internal_reinit_single_cell_state_mapping_info(); }; @@ -2268,7 +2276,8 @@ FEPointEvaluation::FEPointEvaluation( template inline void -FEPointEvaluation::reinit() +FEPointEvaluation:: + internal_reinit_single_cell_state_mapping_info() { this->current_cell_index = numbers::invalid_unsigned_int; this->current_face_number = numbers::invalid_unsigned_int; @@ -2281,6 +2290,16 @@ FEPointEvaluation::reinit() +template +inline void +FEPointEvaluation::reinit() +{ + internal_reinit_single_cell_state_mapping_info(); + this->must_reinitialize_pointers = false; +} + + + template inline void FEPointEvaluation::reinit( @@ -2358,7 +2377,7 @@ FEPointEvaluation::evaluate( const EvaluationFlags::EvaluationFlags &evaluation_flags) { if (this->must_reinitialize_pointers) - reinit(); + internal_reinit_single_cell_state_mapping_info(); if (this->n_q_points == 0) return; @@ -3011,7 +3030,7 @@ FEPointEvaluation::do_integrate( const bool sum_into_values) { if (this->must_reinitialize_pointers) - reinit(); + internal_reinit_single_cell_state_mapping_info(); Assert(!(integration_flags & EvaluationFlags::hessians), ExcNotImplemented());