From 8152f845c7ffa9e7313126c42f8f6310e03194ce Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Sat, 1 Apr 2023 09:03:27 +0200 Subject: [PATCH] FEPointEvaluation: disconnect from MappingInfo --- .../deal.II/matrix_free/fe_point_evaluation.h | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/include/deal.II/matrix_free/fe_point_evaluation.h b/include/deal.II/matrix_free/fe_point_evaluation.h index dd447cbe00..c1ef8b53a0 100644 --- a/include/deal.II/matrix_free/fe_point_evaluation.h +++ b/include/deal.II/matrix_free/fe_point_evaluation.h @@ -455,6 +455,11 @@ public: const FiniteElement & fe, const unsigned int first_selected_component = 0); + /** + * Destructor. + */ + ~FEPointEvaluation(); + /** * Set up the mapping information for the given cell, e.g., by computing the * Jacobian of the mapping for the given points if gradients of the functions @@ -786,6 +791,12 @@ private: */ bool fast_path; + /** + * Connection to NonMatching::MappingInfo to check wheter mapping data + * has been invalidated. + */ + boost::signals2::connection connection_is_reinitialized; + /** * Bool indicating if class is reinitialized and data vectors a resized. */ @@ -839,12 +850,20 @@ FEPointEvaluation::FEPointEvaluation( , is_reinitialized(false) { setup(first_selected_component); - mapping_info.connect_is_reinitialized( + connection_is_reinitialized = mapping_info.connect_is_reinitialized( [this]() { this->is_reinitialized = false; }); } +template +FEPointEvaluation::~FEPointEvaluation() +{ + connection_is_reinitialized.disconnect(); +} + + + template void FEPointEvaluation::setup( -- 2.39.5