From: Nils Margenberg Date: Sun, 15 Jan 2023 21:09:30 +0000 (+0100) Subject: Replace ucd_to_deal with a local vertex numbering in grid_reordering.cc X-Git-Tag: v9.5.0-rc1~642^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F14681%2Fhead;p=dealii.git Replace ucd_to_deal with a local vertex numbering in grid_reordering.cc --- diff --git a/source/grid/grid_reordering.cc b/source/grid/grid_reordering.cc index d031215988..7e37ecd9f1 100644 --- a/source/grid/grid_reordering.cc +++ b/source/grid/grid_reordering.cc @@ -40,6 +40,9 @@ namespace * do the reordering of their * arguments in-place. */ + constexpr std::array local_vertex_numbering{ + {0, 1, 5, 4, 2, 3, 7, 6}}; + void reorder_new_to_old_style(std::vector> &) {} @@ -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