From: Timo Heister Date: Fri, 15 Feb 2013 23:03:50 +0000 (+0000) Subject: move error checks further to the top so we can fail earlier X-Git-Tag: v8.0.0~1274 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10d5b08244594283a8eba049beb42759ca99606a;p=dealii.git move error checks further to the top so we can fail earlier git-svn-id: https://svn.dealii.org/trunk@28417 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/distributed/tria.cc b/deal.II/source/distributed/tria.cc index f5dbb393bb..e43d03dc29 100644 --- a/deal.II/source/distributed/tria.cc +++ b/deal.II/source/distributed/tria.cc @@ -2837,6 +2837,18 @@ namespace parallel return; } + // do not allow anisotropic refinement +#ifdef DEBUG + for (typename Triangulation::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::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::isotropic_refinement, - ExcMessage ("This class does not support anisotropic refinement")); - // count how many cells will be refined