From: Marc Fehling Date: Fri, 14 May 2021 21:19:57 +0000 (-0600) Subject: Add orientation flags to ReferenceCell::child_cell_on_face(). X-Git-Tag: v9.3.0-rc1~70^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b6dbf3264f2916653fa1693ef80d877b8644d8d;p=dealii.git Add orientation flags to ReferenceCell::child_cell_on_face(). --- diff --git a/include/deal.II/grid/reference_cell.h b/include/deal.II/grid/reference_cell.h index 711fa35937..4aea94003a 100644 --- a/include/deal.II/grid/reference_cell.h +++ b/include/deal.II/grid/reference_cell.h @@ -294,24 +294,24 @@ public: * * For example, in 2D the layout of a quadrilateral cell is as follows: * @verbatim - * . 3 - * . 2-->--3 - * . | | - * . 0 ^ ^ 1 - * . | | - * . 0-->--1 - * . 2 + * 3 + * 2-->--3 + * | | + * 0 ^ ^ 1 + * | | + * 0-->--1 + * 2 * @endverbatim * Vertices and faces are indicated with their numbers, faces also with * their directions. * * Now, when refined, the layout is like this: * @verbatim - * *--*--* - * | 2|3 | - * *--*--* - * | 0|1 | - * *--*--* + * *---*---* + * | 2 | 3 | + * *---*---* + * | 0 | 1 | + * *---*---* * @endverbatim * * Thus, the child cells on face 0 are (ordered in the direction of the @@ -319,10 +319,23 @@ public: * * For three spatial dimensions, the exact order of the children is laid * down in the general documentation of this class. + * + * The face_orientation, face_flip and + * face_rotation arguments are meant exclusively for quadrialaterals + * and hexahedra at the moment. They determine how this function handles faces + * oriented in the standard and non-standard orientation. + * face_orientation defaults to true, face_flip and + * face_rotation default to false (standard orientation) and + * has no effect in 2d. The concept of face orientations is explained in this + * @ref GlossFaceOrientation "glossary" + * entry. */ unsigned int child_cell_on_face(const unsigned int face_n, - const unsigned int subface_n) const; + const unsigned int subface_n, + const bool face_orientation = true, + const bool face_flip = false, + const bool face_rotation = false) const; /** * For a given vertex in a cell, return a pair of a face index and a @@ -930,7 +943,10 @@ ReferenceCell::face_reference_cell(const unsigned int face_no) const inline unsigned int ReferenceCell::child_cell_on_face(const unsigned int face, - const unsigned int subface) const + const unsigned int subface, + const bool face_orientation, + const bool face_flip, + const bool face_rotation) const { AssertIndexRange(face, n_faces()); @@ -951,7 +967,13 @@ ReferenceCell::child_cell_on_face(const unsigned int face, } else if (*this == ReferenceCells::Quadrilateral) { - Assert(false, ExcNotImplemented()); + return GeometryInfo<2>::child_cell_on_face( + RefinementCase<2>(RefinementPossibilities<2>::no_refinement), + face, + subface, + face_orientation, + face_flip, + face_rotation); } else if (*this == ReferenceCells::Tetrahedron) { @@ -967,7 +989,13 @@ ReferenceCell::child_cell_on_face(const unsigned int face, } else if (*this == ReferenceCells::Hexahedron) { - Assert(false, ExcNotImplemented()); + return GeometryInfo<3>::child_cell_on_face( + RefinementCase<3>(RefinementPossibilities<3>::no_refinement), + face, + subface, + face_orientation, + face_flip, + face_rotation); } Assert(false, ExcNotImplemented());