]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix check for neighbor_child_on_subface
authorhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 28 Oct 2004 14:19:28 +0000 (14:19 +0000)
committerhartmann <hartmann@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 28 Oct 2004 14:19:28 +0000 (14:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@9730 0785d39b-7218-0410-832d-ea1e28bc413d

tests/bits/mesh_3d_15.cc

index 30eb28a3afbd5a234ab38056de9b8a8a2452404e..b77239e3d1569a96b5d5cbf1444e862fe96fa45c 100644 (file)
@@ -62,28 +62,14 @@ void check_this (Triangulation<3> &tria)
             const unsigned int neighbor_neighbor
               = cell->neighbor_of_neighbor (face_no);
 
-                                             // 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 ==
+           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)==
                     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.