]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix GridGenerator::merge_triangulations() for simplex meshes 12979/head
authorPeter Munch <peterrmuench@gmail.com>
Mon, 22 Nov 2021 10:28:34 +0000 (11:28 +0100)
committerPeter Munch <peterrmuench@gmail.com>
Mon, 22 Nov 2021 15:11:30 +0000 (16:11 +0100)
source/grid/grid_generator.cc

index 36f03a9226be323ec938fe1152a96af746aaa227..7d961f01ba10f4b399dad661c29d45dc78deaf7c 100644 (file)
@@ -6463,7 +6463,11 @@ namespace GridGenerator
 
     // reorder the cells to ensure that they satisfy the convention for
     // edge and face directions
-    GridTools::consistently_order_cells(cells);
+    if (std::all_of(cells.begin(), cells.end(), [](const auto &cell) {
+          return cell.vertices.size() ==
+                 ReferenceCells::get_hypercube<dim>().n_vertices();
+        }))
+      GridTools::consistently_order_cells(cells);
     result.clear();
     result.create_triangulation(vertices, cells, subcell_data);
   }

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.