From: wolf Date: Mon, 16 Aug 1999 08:12:28 +0000 (+0000) Subject: Make execute_coarsening_and_refinement a virtual function. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5b1ecf39757a2b5171912d8e6fe8b6d4c5fb01a;p=dealii-svn.git Make execute_coarsening_and_refinement a virtual function. protected/private restructuring. git-svn-id: https://svn.dealii.org/trunk@1694 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/grid/tria.h b/deal.II/deal.II/include/grid/tria.h index 0e3b28771d..11d130e502 100644 --- a/deal.II/deal.II/include/grid/tria.h +++ b/deal.II/deal.II/include/grid/tria.h @@ -1634,7 +1634,7 @@ class Triangulation * Delete the object and all levels of * the hierarchy. */ - ~Triangulation (); + virtual ~Triangulation (); /** * Assign a boundary object to @@ -1809,7 +1809,10 @@ class Triangulation * and #execute_coarsening_and_refinement()#. * This function actually starts the * refinement process, so you have no way - * to store the refinement flags. + * to store the refinement flags unless + * you overload the + * #execute_coarsening_and_refinement# + * function. */ void refine_global (const unsigned int times); @@ -1931,8 +1934,13 @@ class Triangulation * * See the general docs for more * information. + * + * Note that this function is #virtual# to + * allow derived classes to insert hooks, + * such as saving refinement flags and the + * like. */ - void execute_coarsening_and_refinement (); + virtual void execute_coarsening_and_refinement (); /** * Do both preparation for refinement and @@ -2996,22 +3004,6 @@ class Triangulation //@} protected: - /** - * Refine all cells on all levels which - * were previously flagged for refinement. - */ - void execute_refinement (); - - /** - * Coarsen all cells which were flagged for - * coarsening, or rather: delete all - * children of those cells of which all - * child cells are flagged for coarsening - * and several other constraints hold (see - * the general doc of this class). - */ - void execute_coarsening (); - /** * Write a bool vector to the given stream, * writing a pre- and a postfix magica @@ -3048,6 +3040,23 @@ class Triangulation const unsigned int magic_number2, istream &in); + private: + /** + * Refine all cells on all levels which + * were previously flagged for refinement. + */ + void execute_refinement (); + + /** + * Coarsen all cells which were flagged for + * coarsening, or rather: delete all + * children of those cells of which all + * child cells are flagged for coarsening + * and several other constraints hold (see + * the general doc of this class). + */ + void execute_coarsening (); + /** * Actually delete a cell, or rather all * it children, which is the