Skip to content

Commit

Permalink
Fix GridGenerator::merge_triangulations() for simplex meshes
Browse files Browse the repository at this point in the history
  • Loading branch information
peterrum committed Nov 22, 2021
1 parent 0ea7d45 commit 7a17b27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/grid/grid_generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7a17b27

Please sign in to comment.