]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Convert loops in some tests to reference-cell-independent form. 12942/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Sat, 13 Nov 2021 01:02:28 +0000 (18:02 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 13 Nov 2021 04:32:38 +0000 (21:32 -0700)
tests/grid/grid_in.cc
tests/grid/grid_in_3d.cc
tests/grid/grid_in_3d_02.cc
tests/grid/grid_in_abaqus_01.cc
tests/grid/grid_in_abaqus_02.cc
tests/grid/grid_in_gmsh_01.cc
tests/grid/grid_in_gmsh_01_v4.cc
tests/grid/grid_in_gmsh_01_v41.cc

index bfa2cf9f05a2457bfaac4a4bda8c16d249999c85..4b0a724e6246b60d6abca3586e822561a86db65f 100644 (file)
@@ -89,7 +89,7 @@ test2()
          tria.begin_active();
        c != tria.end();
        ++c, ++index)
-    for (const unsigned int i : GeometryInfo<dim>::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;
 }
index 1bf2058dfe3682350fb7212a68bd191cc3787fad..6611812943a668f6241dde1f217d2a8cfab7eb47 100644 (file)
@@ -59,7 +59,7 @@ test(const char *filename)
   for (Triangulation<dim>::active_cell_iterator c = tria.begin_active();
        c != tria.end();
        ++c, ++index)
-    for (const unsigned int i : GeometryInfo<dim>::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;
 }
index c119fb1caadfeaef75e7669b500135f4c1319945..4ad16cec88c1092d2fd269563b07110131c544f5 100644 (file)
@@ -62,7 +62,7 @@ test(const char *filename)
   for (Triangulation<dim>::active_cell_iterator c = tria.begin_active();
        c != tria.end();
        ++c, ++index)
-    for (const unsigned int i : GeometryInfo<dim>::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;
 
index e4437405e7ac583bbdbd501bd1fffc53249c75f9..e7199dcd291cfe60d2fe4c8c2f273974154445d0 100644 (file)
@@ -44,7 +44,7 @@ abaqus_grid(const char *name)
          tria.begin_active();
        c != tria.end();
        ++c, ++index)
-    for (const unsigned int i : GeometryInfo<dim>::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;
 }
index e5f199bca51db7afa967ef888c3cd5f8cac55d80..e4dfc678e2e5c377acb703724c72247d67af401b 100644 (file)
@@ -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<dim>::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;
 
index 645f2db5d5f59ec8b794ca4f8f55266b292e5c62..0765e309b67e9913a10fc4f63fc9bd32d5214f0e 100644 (file)
@@ -44,7 +44,7 @@ gmsh_grid(const char *name)
          tria.begin_active();
        c != tria.end();
        ++c, ++index)
-    for (const unsigned int i : GeometryInfo<dim>::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;
 }
index 5d2e8aeb223f2ae70d5c771ee630d22770d95642..a32538da113206989bac509a08436b78c6e11085 100644 (file)
@@ -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<dim>::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());
index 16b480df0a65196aa5acc91e85ff94adc0e83ceb..22b8c6d45f5f3770a2831207970f3b747a912337 100644 (file)
@@ -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<dim>::vertex_indices())
+      for (const unsigned int i : cell_v2->vertex_indices())
         {
           AssertThrow((cell_v2->vertex(i) - cell_v41->vertex(i)).norm() <
                         1.e-10,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.