From 0d0a1db33017d9d50564a5ebc1b12db13b84e379 Mon Sep 17 00:00:00 2001 From: Marc Fehling Date: Fri, 14 May 2021 16:59:50 -0600 Subject: [PATCH] Use `char face_orientation`. --- include/deal.II/grid/reference_cell.h | 38 +++++++++++++++------------ 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/include/deal.II/grid/reference_cell.h b/include/deal.II/grid/reference_cell.h index 4aea94003a..1b25b65c72 100644 --- a/include/deal.II/grid/reference_cell.h +++ b/include/deal.II/grid/reference_cell.h @@ -320,22 +320,19 @@ 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 + * The face_orientation argument is meant exclusively for + * quadrilaterals and hexahedra at the moment. It determines how this function + * handles faces oriented in the standard and non-standard orientation. It + * represents a bit-code for the overall face_orientation, + * face_flip and face_rotation and defaults to the standard + * orientation. 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 bool face_orientation = true, - const bool face_flip = false, - const bool face_rotation = false) const; + child_cell_on_face(const unsigned int face_n, + const unsigned int subface_n, + const unsigned char face_orientation = 1) const; /** * For a given vertex in a cell, return a pair of a face index and a @@ -942,11 +939,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 bool face_orientation, - const bool face_flip, - const bool face_rotation) const +ReferenceCell::child_cell_on_face( + const unsigned int face, + const unsigned int subface, + const unsigned char face_orientation_raw) const { AssertIndexRange(face, n_faces()); @@ -967,6 +963,10 @@ ReferenceCell::child_cell_on_face(const unsigned int face, } else if (*this == ReferenceCells::Quadrilateral) { + const bool face_orientation = Utilities::get_bit(face_orientation_raw, 0); + const bool face_flip = Utilities::get_bit(face_orientation_raw, 2); + const bool face_rotation = Utilities::get_bit(face_orientation_raw, 1); + return GeometryInfo<2>::child_cell_on_face( RefinementCase<2>(RefinementPossibilities<2>::no_refinement), face, @@ -989,6 +989,10 @@ ReferenceCell::child_cell_on_face(const unsigned int face, } else if (*this == ReferenceCells::Hexahedron) { + const bool face_orientation = Utilities::get_bit(face_orientation_raw, 0); + const bool face_flip = Utilities::get_bit(face_orientation_raw, 2); + const bool face_rotation = Utilities::get_bit(face_orientation_raw, 1); + return GeometryInfo<3>::child_cell_on_face( RefinementCase<3>(RefinementPossibilities<3>::no_refinement), face, -- 2.39.5