From: David Wells Date: Fri, 16 Apr 2021 17:03:17 +0000 (-0400) Subject: Make the vertex swapping algorithm work with the new-style ordering. X-Git-Tag: v9.3.0-rc1~216^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7df92c7ab76f4fea69304b3df403d6afefe2b82c;p=dealii.git Make the vertex swapping algorithm work with the new-style ordering. This is necessary for the tecplot reader, which relies on this behavior. --- diff --git a/source/grid/grid_reordering.cc b/source/grid/grid_reordering.cc index 90f93551c6..922af99583 100644 --- a/source/grid/grid_reordering.cc +++ b/source/grid/grid_reordering.cc @@ -1179,7 +1179,10 @@ GridReordering<2>::invert_all_cells_of_negative_grid( if (GridTools::cell_measure<2>(all_vertices, vertices_lex) < 0) { ++n_negative_cells; - std::swap(cell.vertices[1], cell.vertices[3]); + if (use_new_style_ordering) + std::swap(cell.vertices[1], cell.vertices[2]); + else + std::swap(cell.vertices[1], cell.vertices[3]); // Check whether the resulting cell is now ok. // If not, then the grid is seriously broken and