]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify the logic during parallel::distributed mesh refinement.
authorWolfgang Bangerth <bangerth@colostate.edu>
Sun, 1 Oct 2017 22:03:42 +0000 (16:03 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 1 Oct 2017 22:59:41 +0000 (16:59 -0600)
Specifically, rather than let a function call itself recursively and catch that,
make sure we call the function of the base class right away.

source/distributed/tria.cc

index 0812303743bbed667ac8dae53355cf6e1ed31039..9a58141f05d5de2b919241e220e367f046f4ec54 100644 (file)
@@ -2561,7 +2561,7 @@ namespace parallel
 
             try
               {
-                this->execute_coarsening_and_refinement();
+                dealii::Triangulation<dim,spacedim>::execute_coarsening_and_refinement();
               }
             catch (const typename Triangulation<dim, spacedim>::DistortedCellList &)
               {
@@ -2682,7 +2682,7 @@ namespace parallel
 
           try
             {
-              this->execute_coarsening_and_refinement();
+              dealii::Triangulation<dim,spacedim>::execute_coarsening_and_refinement();
             }
           catch (const typename Triangulation<dim,spacedim>::DistortedCellList &)
             {
@@ -2835,11 +2835,7 @@ namespace parallel
     Triangulation<dim, spacedim>::execute_coarsening_and_refinement ()
     {
       // first make sure that recursive calls are handled correctly
-      if (refinement_in_progress == true)
-        {
-          dealii::Triangulation<dim,spacedim>::execute_coarsening_and_refinement ();
-          return;
-        }
+      Assert (refinement_in_progress == false, ExcInternalError());
 
       // do not allow anisotropic refinement
 #ifdef DEBUG

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.