From: Wolfgang Bangerth Date: Thu, 27 Jan 2022 20:07:42 +0000 (-0700) Subject: Avoid a couple of references to GeometryInfo. X-Git-Tag: v9.4.0-rc1~556^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de63f4ccdf772cc1bda38ce0e3b27583e8f0274c;p=dealii.git Avoid a couple of references to GeometryInfo. --- 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]}); }