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

index 78ca6cecbb3edb0e8ed149a3bce7ca15c5f9749b..8d234f529f8bff4a14a331b0cbad538148b48c41 100644 (file)
@@ -447,13 +447,16 @@ namespace
                         SubCellData &             subcelldata)
   {
     unsigned int tmp[GeometryInfo<3>::vertices_per_cell];
+    static constexpr std::array<unsigned int,
+                                GeometryInfo<3>::vertices_per_cell>
+      local_vertex_numbering{{0, 1, 5, 4, 2, 3, 7, 6}};
     for (auto &cell : cells)
       if (cell.vertices.size() == GeometryInfo<3>::vertices_per_cell)
         {
           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];
         }
 
     // now points in boundary quads

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.