From 9b984f7da83f886cbcc03a3c223bf8f20055e272 Mon Sep 17 00:00:00 2001 From: David Wells Date: Tue, 24 Oct 2023 21:05:15 -0400 Subject: [PATCH] Remove bit manipulations from a test. --- tests/dofs/dof_tools_21_b.cc | 14 +++++++++----- tests/dofs/dof_tools_21_c.cc | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/tests/dofs/dof_tools_21_b.cc b/tests/dofs/dof_tools_21_b.cc index adc85f5502..153b74c27e 100644 --- a/tests/dofs/dof_tools_21_b.cc +++ b/tests/dofs/dof_tools_21_b.cc @@ -318,8 +318,8 @@ print_matching(DoFHandler &dof_handler, const auto orientation = GridTools::orthogonal_equality( - face_1, face_2, dim == 2 ? 1 : 2, dealii::Tensor<1, spacedim>()); - AssertThrow(orientation, ExcMessage(" not match! oh noze!! ")); + face_1, face_2, dim == 2 ? 1 : 2, Tensor<1, spacedim>()); + AssertThrow(orientation, ExcInternalError()); const auto o = *orientation; deallog << "Orientation: " << o[0] << o[1] << o[2] << std::endl; @@ -329,13 +329,17 @@ print_matching(DoFHandler &dof_handler, constraint_matrix.print(deallog.get_file_stream()); constraint_matrix.close(); + const auto reverse_orientation = GridTools::orthogonal_equality( + face_2, face_1, dim == 2 ? 1 : 2, Tensor<1, spacedim>()); + AssertThrow(reverse_orientation, ExcInternalError()); + const auto ro = *reverse_orientation; DoFTools::make_periodicity_constraints(face_2, face_1, constraint_matrix_reverse, velocity_mask, - o[0], - o[0] ? o[1] ^ o[2] : o[1], - o[2]); + ro[0], + ro[1], + ro[2]); deallog << "Reverse Matching:" << std::endl; constraint_matrix_reverse.print(deallog.get_file_stream()); constraint_matrix_reverse.close(); diff --git a/tests/dofs/dof_tools_21_c.cc b/tests/dofs/dof_tools_21_c.cc index 116796598b..d155d86806 100644 --- a/tests/dofs/dof_tools_21_c.cc +++ b/tests/dofs/dof_tools_21_c.cc @@ -324,8 +324,8 @@ print_matching(DoFHandler &dof_handler, const auto orientation = GridTools::orthogonal_equality( - face_1, face_2, dim == 2 ? 1 : 2, dealii::Tensor<1, spacedim>()); - AssertThrow(orientation, ExcMessage(" not match! oh noze!! ")); + face_1, face_2, dim == 2 ? 1 : 2, Tensor<1, spacedim>()); + AssertThrow(orientation, ExcInternalError()); const auto o = *orientation; deallog << "Orientation: " << o[0] << o[1] << o[2] << std::endl; @@ -335,13 +335,17 @@ print_matching(DoFHandler &dof_handler, constraint_matrix.print(deallog.get_file_stream()); constraint_matrix.close(); + const auto reverse_orientation = GridTools::orthogonal_equality( + face_2, face_1, dim == 2 ? 1 : 2, Tensor<1, spacedim>()); + AssertThrow(reverse_orientation, ExcInternalError()); + const auto ro = *reverse_orientation; DoFTools::make_periodicity_constraints(face_2, face_1, constraint_matrix_reverse, velocity_mask, - o[0], - o[0] ? o[1] ^ o[2] : o[1], - o[2]); + ro[0], + ro[1], + ro[2]); deallog << "Reverse Matching:" << std::endl; constraint_matrix_reverse.print(deallog.get_file_stream()); constraint_matrix_reverse.close(); -- 2.39.5