From: wolf Date: Wed, 1 Oct 2003 22:57:59 +0000 (+0000) Subject: Fix one problem with misoriented faces. There's another one lurking somewhere, though... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=151f0e8ea9db5d434a6df280fa4eaec474eee016;p=dealii-svn.git Fix one problem with misoriented faces. There's another one lurking somewhere, though, see mesh_3d_12. git-svn-id: https://svn.dealii.org/trunk@8085 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/numerics/error_estimator.cc b/deal.II/deal.II/source/numerics/error_estimator.cc index 51fe74f0c8..a9c4bf9884 100644 --- a/deal.II/deal.II/source/numerics/error_estimator.cc +++ b/deal.II/deal.II/source/numerics/error_estimator.cc @@ -987,14 +987,26 @@ integrate_over_irregular_face (const DoFHandler &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:: + child_cell_on_face(neighbor_neighbor, + (orientation_flag ? + subface_no : + subface_translation[subface_no]))); const active_cell_iterator neighbor_child - = neighbor->child(GeometryInfo:: - 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:: - 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