From: Martin Kronbichler Date: Tue, 20 Jul 2021 15:58:42 +0000 (+0200) Subject: Merge pull request #12577 from peterrum/hn_generalize X-Git-Tag: v9.4.0-rc1~1132 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab8bd4a63af2cd649bf2c81f4941adff2b2d522e;p=dealii.git Merge pull request #12577 from peterrum/hn_generalize Generalize HangingNodes --- ab8bd4a63af2cd649bf2c81f4941adff2b2d522e diff --cc include/deal.II/matrix_free/hanging_nodes_internal.h index cdb01af156,65efcf13f7..bb8a5eea23 --- a/include/deal.II/matrix_free/hanging_nodes_internal.h +++ b/include/deal.II/matrix_free/hanging_nodes_internal.h @@@ -89,50 -89,43 +89,44 @@@ namespace interna void transpose_subface_index(unsigned int &subface) const; - using cell_iterator = typename DoFHandler::cell_iterator; - using active_cell_iterator = - typename DoFHandler::active_cell_iterator; - const unsigned int n_raw_lines; - std::vector>> - line_to_cells; - const std::vector &lexicographic_mapping; - const unsigned int fe_degree; - const DoFHandler & dof_handler; + std::vector::cell_iterator, unsigned int>>> + line_to_cells; }; - // 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