From de63f4ccdf772cc1bda38ce0e3b27583e8f0274c Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 27 Jan 2022 13:07:42 -0700 Subject: [PATCH] Avoid a couple of references to GeometryInfo. --- source/grid/manifold.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/grid/manifold.cc b/source/grid/manifold.cc index 71f0d0573d..35d13739ef 100644 --- a/source/grid/manifold.cc +++ b/source/grid/manifold.cc @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -304,7 +305,7 @@ Manifold::get_normals_at_vertices( const typename Triangulation::face_iterator &face, FaceVertexNormals & n) const { - for (unsigned int v = 0; v < GeometryInfo::vertices_per_face; ++v) + for (unsigned int v = 0; v < face->reference_cell().n_vertices(); ++v) { n[v] = normal_vector(face, face->vertex(v)); n[v] /= n[v].norm(); @@ -762,10 +763,10 @@ FlatManifold<2>::get_normals_at_vertices( Manifold<2, 2>::FaceVertexNormals & face_vertex_normals) const { const Tensor<1, 2> tangent = face->vertex(1) - face->vertex(0); - for (unsigned int vertex = 0; vertex < GeometryInfo<2>::vertices_per_face; - ++vertex) + // We're in 2d. Faces are edges: + for (const unsigned int vertex : ReferenceCells::Line.vertex_indices()) // compute normals from tangent - face_vertex_normals[vertex] = Point<2>(tangent[1], -tangent[0]); + face_vertex_normals[vertex] = Tensor<1, 2>({tangent[1], -tangent[0]}); } -- 2.39.5