From: David Wells Date: Wed, 25 Oct 2023 01:05:15 +0000 (-0400) Subject: Remove bit manipulations from a test. X-Git-Tag: relicensing~340^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b984f7da83f886cbcc03a3c223bf8f20055e272;p=dealii.git Remove bit manipulations from a test. --- 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();