]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
move error checks further to the top so we can fail earlier
authorheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 15 Feb 2013 23:03:50 +0000 (23:03 +0000)
committerheister <heister@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 15 Feb 2013 23:03:50 +0000 (23:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@28417 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/distributed/tria.cc

index f5dbb393bb55a3bb8a0cb899bb8145cffdbb25f3..e43d03dc290512f362196308bd6ec15ce3b6cdc2 100644 (file)
@@ -2837,6 +2837,18 @@ namespace parallel
           return;
         }
 
+      // do not allow anisotropic refinement
+#ifdef DEBUG
+      for (typename Triangulation<dim,spacedim>::active_cell_iterator
+                 cell = this->begin_active();
+                 cell != this->end(); ++cell)
+              if (cell->is_locally_owned() && cell->refine_flag_set())
+                  Assert (cell->refine_flag_set() ==
+                          RefinementPossibilities<dim>::isotropic_refinement,
+                          ExcMessage ("This class does not support anisotropic refinement"));
+#endif
+
+
       // now do the work we're
       // supposed to do when we are
       // in charge
@@ -2856,17 +2868,6 @@ namespace parallel
             cell->clear_refine_flag ();
             cell->clear_coarsen_flag ();
           }
-        else
-          // if this is a cell we do
-          // own, make sure they are
-          // not refined
-          // anisotropically since we
-          // don't support this
-          if (cell->refine_flag_set())
-            Assert (cell->refine_flag_set() ==
-                    RefinementPossibilities<dim>::isotropic_refinement,
-                    ExcMessage ("This class does not support anisotropic refinement"));
-
 
 
       // count how many cells will be refined

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.