From f9b59e0792b7fa73c93341712e3033156c57b458 Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Thu, 28 Feb 2019 13:24:55 +0100 Subject: [PATCH] Complete signals for distributed_save|load. --- include/deal.II/grid/tria.h | 15 +++++++++++++++ source/distributed/tria.cc | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h index 45e90441ff..b47941a4ea 100644 --- a/include/deal.II/grid/tria.h +++ b/include/deal.II/grid/tria.h @@ -2335,6 +2335,21 @@ public: */ boost::signals2::signal pre_distributed_save; + /** + * This signal is triggered at the end of execution of the + * parallel::distributed::Triangulation::save() + * function when the triangulation has reached its final state. + */ + boost::signals2::signal post_distributed_save; + + /** + * This signal is triggered at the beginning of execution of the + * parallel::distributed::Triangulation::load() + * function. At the time this signal is triggered, the triangulation + * is still unchanged. + */ + boost::signals2::signal pre_distributed_load; + /** * This signal is triggered at the end of execution of the * parallel::distributed::Triangulation::load() diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index 5fe3afb1c8..9da8894cd1 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -2753,6 +2753,9 @@ namespace parallel tria->cell_attached_data.pack_callbacks_fixed.clear(); tria->cell_attached_data.pack_callbacks_variable.clear(); } + + // signal that serialization has finished + this->signals.post_distributed_save(); } @@ -2771,6 +2774,8 @@ namespace parallel ExcMessage( "Triangulation may only contain coarse cells when calling load().")); + // signal that de-serialization is going to happen + this->signals.pre_distributed_load(); if (parallel_ghost != nullptr) { -- 2.39.5