]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add signal post_refinement_on_cell to Triangulation.
authorLei Qiao <qiaol618@gmail.com>
Mon, 12 Oct 2015 23:53:55 +0000 (18:53 -0500)
committerLei Qiao <qiaol618@gmail.com>
Thu, 22 Oct 2015 14:50:22 +0000 (09:50 -0500)
include/deal.II/grid/tria.h
source/grid/tria.cc

index d3eeaef749f122defc13890af8485a49110a033f..a4dfba2c24a5a58da96597663dcd4d53a55689b5 100644 (file)
@@ -1921,6 +1921,7 @@ public:
     boost::signals2::signal<void ()> create;
     boost::signals2::signal<void ()> pre_refinement;
     boost::signals2::signal<void ()> post_refinement;
+    boost::signals2::signal<void (const Triangulation<dim, spacedim>::cell_iterator &cell)> post_refinement_on_cell;
     boost::signals2::signal<void (const Triangulation<dim, spacedim> &original_tria)> copy;
     boost::signals2::signal<void ()> clear;
     boost::signals2::signal<void ()> any_change;
index adbafbc39a05498f38e98c3186c8fa5e73862a7a..a68cf0a8ff1324d5ea19238b1c5e178259872479 100644 (file)
@@ -4385,6 +4385,8 @@ namespace internal
                           right_neighbor->set_neighbor (nbnb, second_child);
                         }
                     }
+                  // inform all listeners that cell refinement is done
+                  triangulation.signals.post_refinement_on_cell(cell);
                 }
           }
 
@@ -4742,6 +4744,8 @@ namespace internal
                                               internal::int2type<dim>(),
                                               internal::int2type<spacedim>()))
                     cells_with_distorted_children.distorted_cells.push_back (cell);
+                  // inform all listeners that cell refinement is done
+                  triangulation.signals.post_refinement_on_cell(cell);
                 }
           }
 
@@ -8354,6 +8358,9 @@ namespace internal
 
                   // note that the refinement flag was already cleared
                   // at the beginning of this loop
+
+                  // inform all listeners that cell refinement is done
+                  triangulation.signals.post_refinement_on_cell(hex);
                 }
           }
 
@@ -8751,7 +8758,7 @@ Triangulation (const MeshSmoothing smooth_grid,
         = new std::map<unsigned int, types::manifold_id>();
     }
 
-  // connect the any_change signal to the other signals
+  // connect the any_change signal to the other top level signals
   signals.create.connect (signals.any_change);
   signals.post_refinement.connect (signals.any_change);
   signals.clear.connect (signals.any_change);

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.