From 284d94910e2d028b88a8dcedaee94dfaf5014cab Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 12 Nov 2021 18:02:28 -0700 Subject: [PATCH] Convert loops in some tests to reference-cell-independent form. --- tests/grid/grid_in.cc | 2 +- tests/grid/grid_in_3d.cc | 2 +- tests/grid/grid_in_3d_02.cc | 2 +- tests/grid/grid_in_abaqus_01.cc | 2 +- tests/grid/grid_in_abaqus_02.cc | 2 +- tests/grid/grid_in_gmsh_01.cc | 2 +- tests/grid/grid_in_gmsh_01_v4.cc | 2 +- tests/grid/grid_in_gmsh_01_v41.cc | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/grid/grid_in.cc b/tests/grid/grid_in.cc index bfa2cf9f05..4b0a724e62 100644 --- a/tests/grid/grid_in.cc +++ b/tests/grid/grid_in.cc @@ -89,7 +89,7 @@ test2() tria.begin_active(); c != tria.end(); ++c, ++index) - for (const unsigned int i : GeometryInfo::vertex_indices()) + for (const unsigned int i : c->vertex_indices()) hash += (index * i * c->vertex_index(i)) % (tria.n_active_cells() + 1); deallog << hash << std::endl; } diff --git a/tests/grid/grid_in_3d.cc b/tests/grid/grid_in_3d.cc index 1bf2058dfe..6611812943 100644 --- a/tests/grid/grid_in_3d.cc +++ b/tests/grid/grid_in_3d.cc @@ -59,7 +59,7 @@ test(const char *filename) for (Triangulation::active_cell_iterator c = tria.begin_active(); c != tria.end(); ++c, ++index) - for (const unsigned int i : GeometryInfo::vertex_indices()) + for (const unsigned int i : c->vertex_indices()) hash += (index * i * c->vertex_index(i)) % (tria.n_active_cells() + 1); deallog << " hash=" << hash << std::endl; } diff --git a/tests/grid/grid_in_3d_02.cc b/tests/grid/grid_in_3d_02.cc index c119fb1caa..4ad16cec88 100644 --- a/tests/grid/grid_in_3d_02.cc +++ b/tests/grid/grid_in_3d_02.cc @@ -62,7 +62,7 @@ test(const char *filename) for (Triangulation::active_cell_iterator c = tria.begin_active(); c != tria.end(); ++c, ++index) - for (const unsigned int i : GeometryInfo::vertex_indices()) + for (const unsigned int i : c->vertex_indices()) hash += (index * i * c->vertex_index(i)) % (tria.n_active_cells() + 1); deallog << " hash=" << hash << std::endl; diff --git a/tests/grid/grid_in_abaqus_01.cc b/tests/grid/grid_in_abaqus_01.cc index e4437405e7..e7199dcd29 100644 --- a/tests/grid/grid_in_abaqus_01.cc +++ b/tests/grid/grid_in_abaqus_01.cc @@ -44,7 +44,7 @@ abaqus_grid(const char *name) tria.begin_active(); c != tria.end(); ++c, ++index) - for (const unsigned int i : GeometryInfo::vertex_indices()) + for (const unsigned int i : c->vertex_indices()) hash += (index * i * c->vertex_index(i)) % (tria.n_active_cells() + 1); deallog << " hash=" << hash << std::endl; } diff --git a/tests/grid/grid_in_abaqus_02.cc b/tests/grid/grid_in_abaqus_02.cc index e5f199bca5..e4dfc678e2 100644 --- a/tests/grid/grid_in_abaqus_02.cc +++ b/tests/grid/grid_in_abaqus_02.cc @@ -50,7 +50,7 @@ abaqus_grid(const std::string path_and_name, tria.begin_active(); c != tria.end(); ++c, ++index) - for (const unsigned int i : GeometryInfo::vertex_indices()) + for (const unsigned int i : c->vertex_indices()) hash += (index * i * c->vertex_index(i)) % (tria.n_active_cells() + 1); deallog << " hash=" << hash << std::endl; diff --git a/tests/grid/grid_in_gmsh_01.cc b/tests/grid/grid_in_gmsh_01.cc index 645f2db5d5..0765e309b6 100644 --- a/tests/grid/grid_in_gmsh_01.cc +++ b/tests/grid/grid_in_gmsh_01.cc @@ -44,7 +44,7 @@ gmsh_grid(const char *name) tria.begin_active(); c != tria.end(); ++c, ++index) - for (const unsigned int i : GeometryInfo::vertex_indices()) + for (const unsigned int i : c->vertex_indices()) hash += (index * i * c->vertex_index(i)) % (tria.n_active_cells() + 1); deallog << " hash=" << hash << std::endl; } diff --git a/tests/grid/grid_in_gmsh_01_v4.cc b/tests/grid/grid_in_gmsh_01_v4.cc index 5d2e8aeb22..a32538da11 100644 --- a/tests/grid/grid_in_gmsh_01_v4.cc +++ b/tests/grid/grid_in_gmsh_01_v4.cc @@ -61,7 +61,7 @@ gmsh_grid(const char *name_v2, const char *name_v4) { AssertThrow(cell_v2->material_id() == cell_v4->material_id(), ExcInternalError()); - for (const unsigned int i : GeometryInfo::vertex_indices()) + for (const unsigned int i : cell_v2->vertex_indices()) { AssertThrow((cell_v2->vertex(i) - cell_v4->vertex(i)).norm() < 1.e-10, ExcInternalError()); diff --git a/tests/grid/grid_in_gmsh_01_v41.cc b/tests/grid/grid_in_gmsh_01_v41.cc index 16b480df0a..22b8c6d45f 100644 --- a/tests/grid/grid_in_gmsh_01_v41.cc +++ b/tests/grid/grid_in_gmsh_01_v41.cc @@ -61,7 +61,7 @@ gmsh_grid(const char *name_v2, const char *name_v41) { AssertThrow(cell_v2->material_id() == cell_v41->material_id(), ExcInternalError()); - for (const unsigned int i : GeometryInfo::vertex_indices()) + for (const unsigned int i : cell_v2->vertex_indices()) { AssertThrow((cell_v2->vertex(i) - cell_v41->vertex(i)).norm() < 1.e-10, -- 2.39.5