From: Peter Munch Date: Thu, 11 Nov 2021 22:07:20 +0000 (+0100) Subject: MatrixFreeFunctions::ConstraintKinds: rename and reorder X-Git-Tag: v9.4.0-rc1~847^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12936%2Fhead;p=dealii.git MatrixFreeFunctions::ConstraintKinds: rename and reorder --- diff --git a/include/deal.II/matrix_free/cuda_hanging_nodes_internal.h b/include/deal.II/matrix_free/cuda_hanging_nodes_internal.h index d76f56fa25..69f57b0e30 100644 --- a/include/deal.II/matrix_free/cuda_hanging_nodes_internal.h +++ b/include/deal.II/matrix_free/cuda_hanging_nodes_internal.h @@ -209,10 +209,10 @@ namespace CUDAWrappers dealii::internal::MatrixFreeFunctions::ConstraintKinds::face_y; const auto edge = (direction == 0) ? - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_yz : + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_x : (direction == 1) ? - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_zx : - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_xy; + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_y : + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_z; const auto constrained_face = constraint_mask & (face1 | face2 | edge); const unsigned int interp_idx = (direction == 0) ? x_idx : diff --git a/include/deal.II/matrix_free/evaluation_kernels_hanging_nodes.h b/include/deal.II/matrix_free/evaluation_kernels_hanging_nodes.h index 6b9deb6ded..72b75809c9 100644 --- a/include/deal.II/matrix_free/evaluation_kernels_hanging_nodes.h +++ b/include/deal.II/matrix_free/evaluation_kernels_hanging_nodes.h @@ -319,75 +319,75 @@ namespace internal const bool is_edge_2 = is_set(mask, - MatrixFreeFunctions::ConstraintKinds::edge_yz) && + MatrixFreeFunctions::ConstraintKinds::edge_x) && is_set(mask, MatrixFreeFunctions::ConstraintKinds::type_y) && is_set(mask, MatrixFreeFunctions::ConstraintKinds::type_z); const bool is_edge_3 = is_set(mask, - MatrixFreeFunctions::ConstraintKinds::edge_yz) && + MatrixFreeFunctions::ConstraintKinds::edge_x) && not_set(mask, MatrixFreeFunctions::ConstraintKinds::type_y) && is_set(mask, MatrixFreeFunctions::ConstraintKinds::type_z); const bool is_edge_6 = is_set(mask, - MatrixFreeFunctions::ConstraintKinds::edge_yz) && + MatrixFreeFunctions::ConstraintKinds::edge_x) && is_set(mask, MatrixFreeFunctions::ConstraintKinds::type_y) && not_set(mask, MatrixFreeFunctions::ConstraintKinds::type_z); const bool is_edge_7 = is_set(mask, - MatrixFreeFunctions::ConstraintKinds::edge_yz) && + MatrixFreeFunctions::ConstraintKinds::edge_x) && not_set(mask, MatrixFreeFunctions::ConstraintKinds::type_y) && not_set(mask, MatrixFreeFunctions::ConstraintKinds::type_z); const bool is_edge_0 = is_set(mask, - MatrixFreeFunctions::ConstraintKinds::edge_zx) && + MatrixFreeFunctions::ConstraintKinds::edge_y) && is_set(mask, MatrixFreeFunctions::ConstraintKinds::type_x) && is_set(mask, MatrixFreeFunctions::ConstraintKinds::type_z); const bool is_edge_1 = is_set(mask, - MatrixFreeFunctions::ConstraintKinds::edge_zx) && + MatrixFreeFunctions::ConstraintKinds::edge_y) && not_set(mask, MatrixFreeFunctions::ConstraintKinds::type_x) && is_set(mask, MatrixFreeFunctions::ConstraintKinds::type_z); const bool is_edge_4 = is_set(mask, - MatrixFreeFunctions::ConstraintKinds::edge_zx) && + MatrixFreeFunctions::ConstraintKinds::edge_y) && is_set(mask, MatrixFreeFunctions::ConstraintKinds::type_x) && not_set(mask, MatrixFreeFunctions::ConstraintKinds::type_z); const bool is_edge_5 = is_set(mask, - MatrixFreeFunctions::ConstraintKinds::edge_zx) && + MatrixFreeFunctions::ConstraintKinds::edge_y) && not_set(mask, MatrixFreeFunctions::ConstraintKinds::type_x) && not_set(mask, MatrixFreeFunctions::ConstraintKinds::type_z); const bool is_edge_8 = is_set(mask, - MatrixFreeFunctions::ConstraintKinds::edge_xy) && + MatrixFreeFunctions::ConstraintKinds::edge_z) && is_set(mask, MatrixFreeFunctions::ConstraintKinds::type_x) && is_set(mask, MatrixFreeFunctions::ConstraintKinds::type_y); const bool is_edge_9 = is_set(mask, - MatrixFreeFunctions::ConstraintKinds::edge_xy) && + MatrixFreeFunctions::ConstraintKinds::edge_z) && not_set(mask, MatrixFreeFunctions::ConstraintKinds::type_x) && is_set(mask, MatrixFreeFunctions::ConstraintKinds::type_y); const bool is_edge_10 = is_set(mask, - MatrixFreeFunctions::ConstraintKinds::edge_xy) && + MatrixFreeFunctions::ConstraintKinds::edge_z) && is_set(mask, MatrixFreeFunctions::ConstraintKinds::type_x) && not_set(mask, MatrixFreeFunctions::ConstraintKinds::type_y); const bool is_edge_11 = is_set(mask, - MatrixFreeFunctions::ConstraintKinds::edge_xy) && + MatrixFreeFunctions::ConstraintKinds::edge_z) && not_set(mask, MatrixFreeFunctions::ConstraintKinds::type_x) && not_set(mask, MatrixFreeFunctions::ConstraintKinds::type_y); diff --git a/include/deal.II/matrix_free/hanging_nodes_internal.h b/include/deal.II/matrix_free/hanging_nodes_internal.h index 5ec5e367dd..fc42419b4e 100644 --- a/include/deal.II/matrix_free/hanging_nodes_internal.h +++ b/include/deal.II/matrix_free/hanging_nodes_internal.h @@ -42,8 +42,7 @@ namespace internal * 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). + * constrained edge in that direction (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 @@ -63,9 +62,9 @@ namespace internal face_z = 1 << 5, // Element has as a constraint at * = 0 or * = fe_degree edge - edge_xy = 1 << 6, - edge_yz = 1 << 7, - edge_zx = 1 << 8 + edge_x = 1 << 6, + edge_y = 1 << 7, + edge_z = 1 << 8 }; @@ -552,51 +551,51 @@ namespace internal // and what is the type along the edge. const ConstraintKinds line_to_edge[12][4] = { {ConstraintKinds::face_x | ConstraintKinds::face_z, - ConstraintKinds::edge_zx, + ConstraintKinds::edge_y, ConstraintKinds::type_x | ConstraintKinds::type_z, ConstraintKinds::type_y}, {ConstraintKinds::face_x | ConstraintKinds::face_z, - ConstraintKinds::edge_zx, + ConstraintKinds::edge_y, ConstraintKinds::type_z, ConstraintKinds::type_y}, {ConstraintKinds::face_y | ConstraintKinds::face_z, - ConstraintKinds::edge_yz, + ConstraintKinds::edge_x, ConstraintKinds::type_y | ConstraintKinds::type_z, ConstraintKinds::type_x}, {ConstraintKinds::face_y | ConstraintKinds::face_z, - ConstraintKinds::edge_yz, + ConstraintKinds::edge_x, ConstraintKinds::type_z, ConstraintKinds::type_x}, {ConstraintKinds::face_x | ConstraintKinds::face_z, - ConstraintKinds::edge_zx, + ConstraintKinds::edge_y, ConstraintKinds::type_x, ConstraintKinds::type_y}, {ConstraintKinds::face_x | ConstraintKinds::face_z, - ConstraintKinds::edge_zx, + ConstraintKinds::edge_y, ConstraintKinds::unconstrained, ConstraintKinds::type_y}, {ConstraintKinds::face_y | ConstraintKinds::face_z, - ConstraintKinds::edge_yz, + ConstraintKinds::edge_x, ConstraintKinds::type_y, ConstraintKinds::type_x}, {ConstraintKinds::face_y | ConstraintKinds::face_z, - ConstraintKinds::edge_yz, + ConstraintKinds::edge_x, ConstraintKinds::unconstrained, ConstraintKinds::type_x}, {ConstraintKinds::face_x | ConstraintKinds::face_y, - ConstraintKinds::edge_xy, + ConstraintKinds::edge_z, ConstraintKinds::type_x | ConstraintKinds::type_y, ConstraintKinds::type_z}, {ConstraintKinds::face_x | ConstraintKinds::face_y, - ConstraintKinds::edge_xy, + ConstraintKinds::edge_z, ConstraintKinds::type_y, ConstraintKinds::type_z}, {ConstraintKinds::face_x | ConstraintKinds::face_y, - ConstraintKinds::edge_xy, + ConstraintKinds::edge_z, ConstraintKinds::type_x, ConstraintKinds::type_z}, {ConstraintKinds::face_x | ConstraintKinds::face_y, - ConstraintKinds::edge_xy, + ConstraintKinds::edge_z, ConstraintKinds::unconstrained, ConstraintKinds::type_z}}; diff --git a/tests/matrix_free/hanging_node_kernels_01.cc b/tests/matrix_free/hanging_node_kernels_01.cc index d93b708336..00b03382c2 100644 --- a/tests/matrix_free/hanging_node_kernels_01.cc +++ b/tests/matrix_free/hanging_node_kernels_01.cc @@ -306,10 +306,10 @@ namespace dealii dealii::internal::MatrixFreeFunctions::ConstraintKinds::face_y; const auto edge = (direction == 0) ? - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_yz : + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_x : (direction == 1) ? - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_zx : - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_xy; + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_y : + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_z; for (unsigned int v = 0; v < Number::size(); ++v) { @@ -564,112 +564,112 @@ main(int argc, char **argv) { // edge 2 test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_yz | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_x | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_y | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_z); test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_yz | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_x | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_y | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_z | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_x); // edge 3 test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_yz | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_x | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_z); test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_yz | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_x | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_z | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_x); // edge 6 test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_yz | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_x | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_y); test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_yz | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_x | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_y | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_x); // edge 7 test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_yz); + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_x); test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_yz | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_x | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_x); // edge 0 test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_zx | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_y | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_x | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_z); test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_zx | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_y | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_x | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_z | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_y); // edge 1 test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_zx | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_y | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_z); test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_zx | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_y | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_z | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_y); // edge 4 test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_zx | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_y | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_x); test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_zx | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_y | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_x | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_y); // edge 5 test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_zx); + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_y); test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_zx | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_y | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_y); // edge 8 test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_xy | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_z | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_x | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_y); test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_xy | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_z | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_x | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_y | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_z); // edge 9 test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_xy | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_z | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_y); test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_xy | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_z | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_y | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_z); // edge 10 test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_xy | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_z | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_x); test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_xy | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_z | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_x | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_z); // edge 11 test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_xy); + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_z); test<3>(degree, - dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_xy | + dealii::internal::MatrixFreeFunctions::ConstraintKinds::edge_z | dealii::internal::MatrixFreeFunctions::ConstraintKinds::type_z);