]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove bit manipulations from a test.
authorDavid Wells <drwells@email.unc.edu>
Wed, 25 Oct 2023 01:05:15 +0000 (21:05 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 30 Oct 2023 20:03:00 +0000 (16:03 -0400)
tests/dofs/dof_tools_21_b.cc
tests/dofs/dof_tools_21_c.cc

index adc85f55021972f076f8920aa7b42cd6be2e2f38..153b74c27ea475a05ddcbac65a65befaea4d1a6c 100644 (file)
@@ -318,8 +318,8 @@ print_matching(DoFHandler<dim, spacedim> &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<dim, spacedim> &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();
index 116796598b4320c3bef127b7660991fbf7db533b..d155d86806bdba1ec483a1efcc709717adbec687 100644 (file)
@@ -324,8 +324,8 @@ print_matching(DoFHandler<dim, spacedim> &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<dim, spacedim> &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();

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.