]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace ucd_to_deal with a local vertex numbering in grid_reordering.cc 14681/head
authorNils Margenberg <margenbn@hsu-hh.de>
Sun, 15 Jan 2023 21:09:30 +0000 (22:09 +0100)
committerNils Margenberg <margenbn@hsu-hh.de>
Sun, 15 Jan 2023 21:09:30 +0000 (22:09 +0100)
source/grid/grid_reordering.cc

index d031215988607191b058df52183d24abab27c80a..7e37ecd9f1c684194efe8cfe4a24a546ac579e32 100644 (file)
@@ -40,6 +40,9 @@ namespace
    * do the reordering of their
    * arguments in-place.
    */
+  constexpr std::array<unsigned int, 8> local_vertex_numbering{
+    {0, 1, 5, 4, 2, 3, 7, 6}};
+
   void
   reorder_new_to_old_style(std::vector<CellData<1>> &)
   {}
@@ -62,7 +65,7 @@ namespace
         for (const unsigned int i : GeometryInfo<3>::vertex_indices())
           tmp[i] = cell.vertices[i];
         for (const unsigned int i : GeometryInfo<3>::vertex_indices())
-          cell.vertices[i] = tmp[GeometryInfo<3>::ucd_to_deal[i]];
+          cell.vertices[i] = tmp[local_vertex_numbering[i]];
       }
   }
 
@@ -93,7 +96,7 @@ namespace
         for (const unsigned int i : GeometryInfo<3>::vertex_indices())
           tmp[i] = cell.vertices[i];
         for (const unsigned int i : GeometryInfo<3>::vertex_indices())
-          cell.vertices[GeometryInfo<3>::ucd_to_deal[i]] = tmp[i];
+          cell.vertices[local_vertex_numbering[i]] = tmp[i];
       }
   }
 } // namespace

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.