--- /dev/null
+New: There are new signals in the Triangulation class
+that signal the beginning and end of a parallel::distributed
+refinement and serialization. This allows to connect functions
+that should be called uniquely once before and after
+refinement and serialization for parallel distributed
+Triangulations (something not possible with the existing
+signals).
+<br>
+(Rene Gassmoeller, 2017/09/25)
boost::signals2::signal<unsigned int (const cell_iterator &,
const CellStatus),
CellWeightSum<unsigned int> > cell_weight;
+
+ /**
+ * This signal is triggered at the beginning of execution of the
+ * parallel::distributed::Triangulation::execute_coarsening_and_refinement()
+ * function (which is
+ * itself called by other functions such as Triangulation::refine_global()
+ * ). At the time this signal is triggered, the triangulation is still
+ * unchanged. This signal
+ * is different from the pre_refinement signal, because in the parallel distributed
+ * case the pre_refinement signal is triggered multiple times without a way to
+ * distinguish the last signal call.
+ */
+ boost::signals2::signal<void ()> pre_distributed_refinement;
+
+ /**
+ * This signal is triggered at the end of execution of the
+ * parallel::distributed::Triangulation::execute_coarsening_and_refinement()
+ * function when the triangulation has reached its final state. This signal
+ * is different from the post_refinement signal, because in the parallel distributed
+ * case the post_refinement signal is triggered multiple times without a way to
+ * distinguish the last signal call.
+ */
+ boost::signals2::signal<void ()> post_distributed_refinement;
+
+ /**
+ * This signal is triggered at the beginning of execution of the
+ * parallel::distributed::Triangulation::save()
+ * function. At the time this signal is triggered, the triangulation
+ * is still unchanged.
+ */
+ boost::signals2::signal<void ()> pre_distributed_save;
+
+ /**
+ * This signal is triggered at the end of execution of the
+ * parallel::distributed::Triangulation::load()
+ * function when the triangulation has reached its final state.
+ */
+ boost::signals2::signal<void ()> post_distributed_load;
};
/**
{
Assert(n_attached_deserialize==0,
ExcMessage ("not all SolutionTransfer's got deserialized after the last load()"));
+
+ // signal that serialization is going to happen
+ this->signals.pre_distributed_save();
+
int real_data_size = 0;
if (attached_data_size>0)
real_data_size = attached_data_size+sizeof(CellStatus);
}
this->update_number_cache ();
+
+ // signal that de-serialization is finished
+ this->signals.post_distributed_load();
+
this->update_periodic_face_map();
}
}
}
+ // signal that refinement is going to happen
+ this->signals.pre_distributed_refinement();
+
// now do the work we're supposed to do when we are in charge
refinement_in_progress = true;
this->prepare_coarsening_and_refinement ();
refinement_in_progress = false;
this->update_number_cache ();
+
+ // signal that refinement is finished,
+ // this is triggered before update_periodic_face_map
+ // to be consistent with the serial triangulation class
+ this->signals.post_distributed_refinement();
+
this->update_periodic_face_map();
}