From ae6b03d93f3679a3d37bc6f413923fe9b5a853b1 Mon Sep 17 00:00:00 2001 From: bangerth Date: Fri, 3 Jun 2011 01:59:59 +0000 Subject: [PATCH] copy_triangulation now also triggers the 'create' signal. It didn't before, but that appears to me as an oversight back in the day. git-svn-id: https://svn.dealii.org/trunk@23780 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/doc/news/changes.h | 8 ++++++++ deal.II/include/deal.II/grid/tria.h | 5 ++++- deal.II/source/grid/tria.cc | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/deal.II/doc/news/changes.h b/deal.II/doc/news/changes.h index 75d53930a5..16d9059000 100644 --- a/deal.II/doc/news/changes.h +++ b/deal.II/doc/news/changes.h @@ -71,6 +71,14 @@ particular virtual functions inherited from a base class. While the old mechanism should continue to work, you should consider upgrading. For more information on the signals mechanism, see the documentation of the Triangulation class. + +In addition to the change above, the new implementation now offers two +more signals one can subscribe to: Triangulation::Signals::clead for +when the triangulation is cleared, and Triangulation::Signals::any_change +that can be used for any operation that changes the mesh. Furthermore, +in a change from previous behavior, the Triangulations::Signal::create +signal is now also triggered when another triangulation is copied to +the one that owns the signal.
(Wolfgang Bangerth, 2011/06/01) diff --git a/deal.II/include/deal.II/grid/tria.h b/deal.II/include/deal.II/grid/tria.h index 71860e83a4..46c1ec9797 100644 --- a/deal.II/include/deal.II/grid/tria.h +++ b/deal.II/include/deal.II/grid/tria.h @@ -1226,7 +1226,8 @@ namespace internal * actions by which the triangulation can modify itself and potentially * require follow-up action elsewhere: * - creation: This signal is triggered whenever the - * Triangulation::create_triangulation is called + * Triangulation::create_triangulation or Triangulation::copy_triangulation + * is called * - pre-refinement: This signal is triggered at the beginning * of execution of the Triangulation::execute_coarsening_and_refinement * function (which is itself called by other functions such as @@ -1833,6 +1834,8 @@ class Triangulation : public Subscriptor * @note Calling this function triggers * the 'copy' signal on old_tria, i.e. * the triangulation being copied from. + * It also triggers the 'create' signal of + * the current triangulation. * See the section on signals in the * general documentation for more information. * diff --git a/deal.II/source/grid/tria.cc b/deal.II/source/grid/tria.cc index 611fee0721..2ad8aa8c39 100644 --- a/deal.II/source/grid/tria.cc +++ b/deal.II/source/grid/tria.cc @@ -9536,6 +9536,9 @@ copy_triangulation (const Triangulation &old_tria) // inform RefinementListeners of old_tria of // the copy operation old_tria.signals.copy (*this); + // also inform all listeners that the + // triangulation has been created + signals.create(); // note that we need not copy the // subscriptor! -- 2.39.5