boost::signals2::signal<void ()> create;
boost::signals2::signal<void ()> pre_refinement;
boost::signals2::signal<void ()> post_refinement;
+ /**
+ * @note the signal parameter @p cell is correspond to the new active cell
+ * after coarsening is done rather than a current active cell.
+ * In another word, all children of @p cell will be deleted after coarsening
+ * and @p cell will become the new active cell then.
+ */
+ boost::signals2::signal<void (const Triangulation<dim, spacedim>::cell_iterator &cell)> pre_coarsening_on_cell;
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;
if (levels.size() >= 2)
for (cell = last(); cell!=endc; --cell)
if (cell->level()<=static_cast<int>(levels.size()-2) && cell->user_flag_set())
- // use a separate function,
- // since this is dimension
- // specific
- internal::Triangulation::Implementation
- ::delete_children (*this, cell, line_cell_count, quad_cell_count);
+ {
+ // inform all listeners that cell coarsening is going to happen
+ signals.pre_coarsening_on_cell(cell);
+ // use a separate function,
+ // since this is dimension
+ // specific
+ internal::Triangulation::Implementation
+ ::delete_children (*this, cell, line_cell_count, quad_cell_count);
+ }
// re-compute number of lines and
// quads