]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Clean up get_combined_orientation() in 1D. 16200/head
authorDavid Wells <drwells@email.unc.edu>
Thu, 26 Oct 2023 21:07:36 +0000 (17:07 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 30 Oct 2023 20:03:00 +0000 (16:03 -0400)
include/deal.II/grid/reference_cell.h

index 8167ab01b1523904bd286a5b46aa82292d83770d..f7ab3ec133ef62f5127227c29a44d5a4f9fc0ba4 100644 (file)
@@ -2775,14 +2775,20 @@ ReferenceCell::get_combined_orientation(
 
   switch (this->kind)
     {
+      case ReferenceCells::Vertex:
+        // Things are always default-oriented in 1D
+        if (v0_equals({vertices_1[0]}))
+          return default_combined_face_orientation();
+        break;
+
       case ReferenceCells::Line:
         // line_orientation=true
         if (v0_equals({vertices_1[0], vertices_1[1]}))
-          return 1;
+          return default_combined_face_orientation();
 
         // line_orientation=false
         if (v0_equals({vertices_1[1], vertices_1[0]}))
-          return 0;
+          return reversed_combined_line_orientation();
         break;
       case ReferenceCells::Triangle:
         // face_orientation=true, face_rotation=false, face_flip=false

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.