* pair of numbers, face_no and
* subface_no, with the following
* property:
- * <tt>cell->neighbor(neighbor)->face(face_no)->child(subface_no)==cell->face(neighbor)</tt>.
+ * <tt>cell->neighbor(neighbor)->neighbor_child_on_subface(face_no,subface_no)==cell</tt>.
*
* This function is impossible
* for <tt>dim==1</tt>.
if (face_guess->has_children())
for (unsigned int subface_no=0; subface_no<face_guess->n_children(); ++subface_no)
if (face_guess->child_index(subface_no)==this_face_index)
- return std::make_pair (face_no_guess, subface_no);
+ // return the result, but don't forget
+ // to take care of possible rotation,
+ // flip and wrong orientation of the
+ // neighbor's face...
+ return std::make_pair (face_no_guess,
+ GeometryInfo<dim>::real_to_standard_face_vertex(subface_no,
+ neighbor_cell->face_orientation(face_no_guess),
+ neighbor_cell->face_flip(face_no_guess),
+ neighbor_cell->face_rotation(face_no_guess)));
// if the guess was false, then
// we need to loop over all faces
if (face->has_children())
for (unsigned int subface_no=0; subface_no<face->n_children(); ++subface_no)
if (face->child_index(subface_no)==this_face_index)
- return std::make_pair (face_no, subface_no);
+ // return the result, but don't forget
+ // to take care of possible rotation,
+ // flip and wrong orientation of the
+ // neighbor's face...
+ return std::make_pair (face_no,
+ GeometryInfo<dim>::real_to_standard_face_vertex(subface_no,
+ neighbor_cell->face_orientation(face_no),
+ neighbor_cell->face_flip(face_no),
+ neighbor_cell->face_rotation(face_no)));
}
}