]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add one assertion that we presently violate.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Sep 2003 21:45:05 +0000 (21:45 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Sep 2003 21:45:05 +0000 (21:45 +0000)
git-svn-id: https://svn.dealii.org/trunk@8032 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/tria.cc

index 3552e0dae0752379833087aa0e11be8875337e83..b3739d92065d244337b4fef5c44f3c68c7881db4 100644 (file)
@@ -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

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.