From 6e1bf644d07a81bb03a1dbcb54f64a85ed5b8a58 Mon Sep 17 00:00:00 2001 From: wolf Date: Wed, 24 Sep 2003 21:45:05 +0000 Subject: [PATCH] Add one assertion that we presently violate. git-svn-id: https://svn.dealii.org/trunk@8032 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/grid/tria.cc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/deal.II/deal.II/source/grid/tria.cc b/deal.II/deal.II/source/grid/tria.cc index 3552e0dae0..b3739d9206 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -8255,15 +8255,26 @@ void Triangulation<3>::delete_children (cell_iterator &cell) { std::make_pair(cell->line(9), false), std::make_pair(cell->line(10), false), std::make_pair(cell->line(11), false) }; + // if in debug mode: make sure that // none of the lines of this cell // is twice refined; else, deleting // this cell's children will result - // in an invalid state + // in an invalid state. also check + // that each of the lines for which + // we consider deleting the + // children in fact has children + // (the bits/coarsening_3d test + // tripped over this initially) for (unsigned int line=0; line<12; ++line) - for (unsigned int c=0; c<2; ++c) - Assert (!cell->line(line)->child(c)->has_children(), - ExcInternalError()); + { + Assert (cell->line(line)->has_children(), + ExcInternalError()); + for (unsigned int c=0; c<2; ++c) + Assert (!cell->line(line)->child(c)->has_children(), + ExcInternalError()); + } + // next make a map out of this for // simpler access to the flag -- 2.39.5