]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Undo erroneous check-in
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Nov 2004 02:00:00 +0000 (02:00 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 16 Nov 2004 02:00:00 +0000 (02:00 +0000)
git-svn-id: https://svn.dealii.org/trunk@9763 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/mesh_3d_15.cc

index b77239e3d1569a96b5d5cbf1444e862fe96fa45c..30eb28a3afbd5a234ab38056de9b8a8a2452404e 100644 (file)
@@ -62,14 +62,28 @@ void check_this (Triangulation<3> &tria)
             const unsigned int neighbor_neighbor
               = cell->neighbor_of_neighbor (face_no);
 
-           const DoFHandler<3>::face_iterator subface=
-             cell->face(face_no)->child(subface_no);
-           unsigned int i=0;
-           for (; i<GeometryInfo<3>::children_per_cell; ++i)
-             if (neighbor->child(i)->face(neighbor_neighbor)==subface)
-               break;
-
-            Assert (neighbor->child(i)==
+                                             // see whether face and
+                                             // the neighbor's
+                                             // counterface share the
+                                             // same indexing of
+                                             // children. if not so,
+                                             // translate child
+                                             // indices
+            const bool face_orientations_match
+              = (neighbor->face_orientation(neighbor_neighbor) ==
+                 cell->face_orientation(face_no));
+            static const unsigned int subface_translation[4]
+              = { 0, 3, 2, 1 };
+            const unsigned int neighbor_child_index
+              = (GeometryInfo<3>::
+                 child_cell_on_face(neighbor_neighbor,
+                                    (face_orientations_match ?
+                                     subface_no :
+                                     subface_translation[subface_no])));
+            const DoFHandler<3>::active_cell_iterator neighbor_child
+              = neighbor->child(neighbor_child_index);
+
+            Assert (neighbor_child ==
                     cell->neighbor_child_on_subface (face_no,
                                                      subface_no),
                     ExcInternalError());

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.