From a6c356040118730455923a20ac029a421af807f3 Mon Sep 17 00:00:00 2001 From: David Wells Date: Mon, 9 Jan 2023 17:57:36 -0500 Subject: [PATCH] un-hardcode some 6s. This makes it clear that we want to use the maximum number of faces in 3D. --- include/deal.II/grid/tria_accessor.templates.h | 16 ++++++++-------- source/grid/tria.cc | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index 3126e5abc0..1f70704949 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -1074,8 +1074,8 @@ namespace internal const unsigned char orientation = cell.get_triangulation() .levels[cell.level()] - ->face_orientations.get_raw_orientation(cell.index() * 6 + - f); + ->face_orientations.get_raw_orientation( + cell.index() * GeometryInfo<3>::faces_per_cell + f); // It might seem superfluous to spell out the four indices // that get later consumed by a for loop over these four @@ -1098,8 +1098,8 @@ namespace internal const unsigned char orientation = cell.get_triangulation() .levels[cell.level()] - ->face_orientations.get_raw_orientation(cell.index() * 6 + - f); + ->face_orientations.get_raw_orientation( + cell.index() * GeometryInfo<3>::faces_per_cell + f); const std::array my_indices{ {ref_cell.standard_to_real_face_line(0, f, orientation), ref_cell.standard_to_real_face_line(1, f, orientation)}}; @@ -1192,8 +1192,8 @@ namespace internal const unsigned char orientation = cell.get_triangulation() .levels[cell.level()] - ->face_orientations.get_raw_orientation(cell.index() * 6 + - f); + ->face_orientations.get_raw_orientation( + cell.index() * GeometryInfo<3>::faces_per_cell + f); // It might seem superfluous to spell out the four indices and // orientations that get later consumed by a for loop over @@ -1224,8 +1224,8 @@ namespace internal const unsigned char orientation = cell.get_triangulation() .levels[cell.level()] - ->face_orientations.get_raw_orientation(cell.index() * 6 + - f); + ->face_orientations.get_raw_orientation( + cell.index() * GeometryInfo<3>::faces_per_cell + f); const std::array my_indices{ {ref_cell.standard_to_real_face_line(0, f, orientation), ref_cell.standard_to_real_face_line(1, f, orientation)}}; diff --git a/source/grid/tria.cc b/source/grid/tria.cc index f3bd6901b8..7fa1766667 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -14601,7 +14601,7 @@ Triangulation::reset_cell_vertex_indices_cache() const unsigned char orientate = levels[l]->face_orientations.get_raw_orientation( - cell->index() * 6 + face); + cell->index() * GeometryInfo<3>::faces_per_cell + face); std::array vertex_order{ {ref_cell.standard_to_real_face_vertex(0, face, orientate), ref_cell.standard_to_real_face_vertex(1, face, orientate), -- 2.39.5