]> https://gitweb.dealii.org/ - dealii.git/commitdiff
FEPointEvaluation: disconnect from MappingInfo 15015/head
authorPeter Munch <peterrmuench@gmail.com>
Sat, 1 Apr 2023 07:03:27 +0000 (09:03 +0200)
committerPeter Munch <peterrmuench@gmail.com>
Sat, 1 Apr 2023 07:03:27 +0000 (09:03 +0200)
include/deal.II/matrix_free/fe_point_evaluation.h

index dd447cbe005f7fc255f9e77c83890e2c391eba40..c1ef8b53a060636feaf8ba0273b57c96be6016cb 100644 (file)
@@ -455,6 +455,11 @@ public:
                     const FiniteElement<dim> &               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<n_components, dim, spacedim, Number>::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 <int n_components, int dim, int spacedim, typename Number>
+FEPointEvaluation<n_components, dim, spacedim, Number>::~FEPointEvaluation()
+{
+  connection_is_reinitialized.disconnect();
+}
+
+
+
 template <int n_components, int dim, int spacedim, typename Number>
 void
 FEPointEvaluation<n_components, dim, spacedim, Number>::setup(

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.