]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add comments. Fix code.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 29 Dec 2008 03:17:05 +0000 (03:17 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 29 Dec 2008 03:17:05 +0000 (03:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@18038 0785d39b-7218-0410-832d-ea1e28bc413d

tests/fail/kelly_crash_02.cc

index f528dbbd69d5187ce226aac5a0f67fe511dcee24..60de53c1433cbca9e385937893490c5908c6deb3 100644 (file)
 // cell->face(f)->at_boundary() and cell->at_boundary(f) did not always return
 // the same thing, although they of course should. as a result, the
 // KellyErrorEstimator forgot to work on certain faces
+//
+// the problem turned out to be that we were setting a boundary indicator for
+// an interior face. while cell->face(f)->at_boundary() checks for a boundary
+// indicator != 255, cell->at_boundary(f) checks whether the cell has no
+// neighbor in position f. The latter was false (there was a neighbor) but the
+// former true, thus the discrepancy.
+//
+// the problem was fixed by fixing the code
 
 char logname[] = "kelly_crash_02/output";
 
@@ -199,7 +207,9 @@ void test ()
     for (unsigned int f=0; f<GeometryInfo<dim>::faces_per_cell; ++f)
       if ((cell->face(f)->center()[2] != -4)
          &&
-         (cell->face(f)->center()[2] != 7))
+         (cell->face(f)->center()[2] != 7)
+         &&
+         (cell->face(f)->at_boundary()))
        cell->face(f)->set_boundary_indicator (1);
   
   triangulation.refine_global (1);

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.