From: David Wells Date: Wed, 9 Jun 2021 20:02:46 +0000 (-0400) Subject: Un-hardcode some constants. X-Git-Tag: v9.4.0-rc1~1233^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7996db3dbc03606d9ef66a2f5d6a73db6447ccb8;p=dealii.git Un-hardcode some constants. --- 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];