From: Peter Munch Date: Mon, 19 Jul 2021 19:30:19 +0000 (+0200) Subject: Make internal::MatrixFreeFunctions::ConstraintTypes enum X-Git-Tag: v9.4.0-rc1~1134^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2afb1594660c9658836a060758a3b701bcd35b2;p=dealii.git Make internal::MatrixFreeFunctions::ConstraintTypes enum --- diff --git a/include/deal.II/matrix_free/hanging_nodes_internal.h b/include/deal.II/matrix_free/hanging_nodes_internal.h index 0dc758cee9..cdb01af156 100644 --- a/include/deal.II/matrix_free/hanging_nodes_internal.h +++ b/include/deal.II/matrix_free/hanging_nodes_internal.h @@ -100,38 +100,39 @@ namespace internal const DoFHandler & dof_handler; }; - // Here is the system for how we store constraint types in a binary mask. - // This is not a complete contradiction-free system, i.e., there are - // invalid states that we just assume that we never get. - - // If the mask is zero, there are no constraints. Then, there are three - // different fields with one bit per dimension. The first field determines - // the type, or the position of an element along each direction. The - // second field determines if there is a constrained face with that - // direction as normal. The last field determines if there is a - // constrained edge of a given pair of coordinate planes, but where - // neither of the corresponding faces are constrained (only valid in 3D). - - // The element is placed in the 'first position' along *-axis. These also - // determine which face is constrained. For example, in 2D, if - // face_x and type are set, then x = 0 is constrained. - - namespace ConstraintTypes + /** + * Here is the system for how we store constraint types in a binary mask. + * This is not a complete contradiction-free system, i.e., there are + * invalid states that we just assume that we never get. + * + * If the mask is zero, there are no constraints. Then, there are three + * different fields with one bit per dimension. The first field determines + * the type, or the position of an element along each direction. The + * second field determines if there is a constrained face with that + * direction as normal. The last field determines if there is a + * constrained edge of a given pair of coordinate planes, but where + * neither of the corresponding faces are constrained (only valid in 3D). + * + * The element is placed in the 'first position' along *-axis. These also + * determine which face is constrained. For example, in 2D, if + * face_x and type are set, then x = 0 is constrained. + */ + enum ConstraintTypes : unsigned int { - constexpr unsigned int type_x = 1 << 0; - constexpr unsigned int type_y = 1 << 1; - constexpr unsigned int type_z = 1 << 2; + type_x = 1 << 0, + type_y = 1 << 1, + type_z = 1 << 2, // Element has as a constraint at * = 0 or * = fe_degree face - constexpr unsigned int face_x = 1 << 3; - constexpr unsigned int face_y = 1 << 4; - constexpr unsigned int face_z = 1 << 5; + face_x = 1 << 3, + face_y = 1 << 4, + face_z = 1 << 5, // Element has as a constraint at * = 0 or * = fe_degree edge - constexpr unsigned int edge_xy = 1 << 6; - constexpr unsigned int edge_yz = 1 << 7; - constexpr unsigned int edge_zx = 1 << 8; - } // namespace ConstraintTypes + edge_xy = 1 << 6, + edge_yz = 1 << 7, + edge_zx = 1 << 8 + }; template