]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix one problem with misoriented faces. There's another one lurking somewhere, though...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 1 Oct 2003 22:57:59 +0000 (22:57 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 1 Oct 2003 22:57:59 +0000 (22:57 +0000)
git-svn-id: https://svn.dealii.org/trunk@8085 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/numerics/error_estimator.cc

index 51fe74f0c8409f4f15b0a7719bde9584aabc5d53..a9c4bf9884997ecc2e6c3c681020895b03b59ac6 100644 (file)
@@ -987,14 +987,26 @@ integrate_over_irregular_face (const DoFHandler<dim>               &dof_handler,
     {
                                       // get an iterator pointing to the
                                       // cell behind the present subface
+      const bool orientation_flag
+        = (dim != 3 ?
+           true :
+           cell->get_face_orientation(face_no) == true
+           &&
+           neighbor->get_face_orientation(neighbor_neighbor) == true);
+      static const unsigned int subface_translation[4]
+        = { 0, 3, 2, 1 };
+      const unsigned int neighbor_child_index
+        = (GeometryInfo<dim>::
+           child_cell_on_face(neighbor_neighbor,
+                              (orientation_flag ?
+                               subface_no :
+                               subface_translation[subface_no])));
       const active_cell_iterator neighbor_child
-       = neighbor->child(GeometryInfo<dim>::
-                         child_cell_on_face(neighbor_neighbor,subface_no));
+       = neighbor->child(neighbor_child_index);
       Assert (neighbor_child->face(neighbor_neighbor) ==
              cell->face(face_no)->child(subface_no),
              ExcInternalError());
-      Assert (!neighbor->child(GeometryInfo<dim>::
-                              child_cell_on_face(neighbor_neighbor,subface_no))->has_children(),
+      Assert (!neighbor->child(neighbor_child_index)->has_children(),
              ExcInternalError());
       
                                       // restrict the finite element on the

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.