From: David Wells Date: Sat, 21 Jan 2023 13:38:41 +0000 (-0500) Subject: Triangulation: Use lines_per_face for indexing. X-Git-Tag: v9.5.0-rc1~612^2~5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21e1f80e7f5c1fb2f7f9922363c92c9cbf3bf1ec;p=dealii.git Triangulation: Use lines_per_face for indexing. It's more descriptive as this array is only used in 3D. --- diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index f27a9ef592..e438be2d24 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -959,13 +959,13 @@ namespace internal { Assert(accessor.used(), TriaAccessorExceptions::ExcCellNotUsed()); AssertIndexRange(line, accessor.n_lines()); - Assert(accessor.present_index * GeometryInfo<2>::lines_per_cell + line < + Assert(accessor.present_index * GeometryInfo<3>::lines_per_face + line < accessor.tria->faces->quads_line_orientations.size(), ExcInternalError()); // quads as part of 3d hexes can have non-standard orientation accessor.tria->faces->quads_line_orientations - [accessor.present_index * GeometryInfo<2>::lines_per_cell + line] = + [accessor.present_index * GeometryInfo<3>::lines_per_face + line] = value; } diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 2b5ee8ac43..e466b78451 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -1122,7 +1122,7 @@ namespace internal { // reserve the field of the derived class tria_faces.quads_line_orientations.resize( - new_size * GeometryInfo<2>::lines_per_cell, true); + new_size * GeometryInfo<3>::lines_per_face, true); auto &q_is_q = tria_faces.quad_is_quadrilateral; q_is_q.reserve(new_size); @@ -2345,7 +2345,7 @@ namespace internal ++i, ++j, ++k) { // set line index - quads_0.cells[q * GeometryInfo<2>::faces_per_cell + j] = + quads_0.cells[q * GeometryInfo<3>::lines_per_face + j] = crs.col[i]; // set line orientations @@ -2357,7 +2357,7 @@ namespace internal Assert(raw_orientation == 0u || raw_orientation == 1u, ExcInternalError()); faces.quads_line_orientations - [q * GeometryInfo<2>::faces_per_cell + j] = + [q * GeometryInfo<3>::lines_per_face + j] = raw_orientation == 1u; } } @@ -2623,7 +2623,7 @@ namespace internal { const unsigned int dim = faces.dim; - const unsigned int max_faces_per_cell = 2 * structdim; + const unsigned int max_lines_per_face = 2 * structdim; if (dim == 3 && structdim == 2) { @@ -2631,7 +2631,7 @@ namespace internal faces.quad_is_quadrilateral.assign(size, true); // quad line orientations - faces.quads_line_orientations.assign(size * max_faces_per_cell, + faces.quads_line_orientations.assign(size * max_lines_per_face, true); } }