From d89e75c5bf524d49a7b749291bafbea3cd614406 Mon Sep 17 00:00:00 2001 From: heister Date: Fri, 15 Feb 2013 23:03:50 +0000 Subject: [PATCH] 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 --- deal.II/source/distributed/tria.cc | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) 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 -- 2.39.5