From 7996db3dbc03606d9ef66a2f5d6a73db6447ccb8 Mon Sep 17 00:00:00 2001 From: David Wells Date: Wed, 9 Jun 2021 16:02:46 -0400 Subject: [PATCH] Un-hardcode some constants. --- source/grid/tria.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/grid/tria.cc b/source/grid/tria.cc index d6e41c71f9..640051c5c7 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -5342,7 +5342,7 @@ namespace internal // 2) create new lines (property is set later) boost::container::small_vector< typename Triangulation::raw_line_iterator, - 4> + GeometryInfo::lines_per_cell> new_lines(quad->n_lines()); { for (unsigned int i = 0; i < new_lines.size(); ++i) @@ -5423,8 +5423,9 @@ namespace internal boost::container::small_vector< typename Triangulation::raw_line_iterator, 12> - lines(quad->n_lines() * 3); - + lines(reference_face_type == ReferenceCells::Quadrilateral ? + 12 : + 9); { unsigned int k = 0; @@ -6206,7 +6207,9 @@ namespace internal cell_face_vertices_hex : cell_face_vertices_tet; - for (unsigned int c = 0; c < 8; ++c) + for (unsigned int c = 0; + c < GeometryInfo::max_children_per_cell; + ++c) { auto &new_hex = new_hexes[c]; -- 2.39.5