]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Minor fixes to get_boundary_ids_01 9871/head
authorDaniel Arndt <arndtd@ornl.gov>
Fri, 10 Apr 2020 15:25:52 +0000 (11:25 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Fri, 10 Apr 2020 15:26:54 +0000 (11:26 -0400)
tests/distributed_grids/get_boundary_ids_01.cc

index 3020c84b201909bfc8ca38a08f8d0e3200527ded..aa0ff97e4f065d1eb005e08c02d3cf8727e38ce2 100644 (file)
@@ -14,7 +14,7 @@
 // ---------------------------------------------------------------------
 
 
-// create a tria mesh and copy it
+// Test parallel::TriangulationBase::get_boundary_ids()
 
 #include <deal.II/distributed/tria.h>
 
@@ -29,7 +29,7 @@ test()
   parallel::distributed::Triangulation<dim> tria(MPI_COMM_WORLD);
   GridGenerator::subdivided_hyper_cube(tria, 4);
 
-  for (auto cell : tria.active_cell_iterators())
+  for (auto &cell : tria.active_cell_iterators())
     if (cell->is_locally_owned())
       for (const unsigned int face : GeometryInfo<dim>::face_indices())
         {
@@ -43,7 +43,7 @@ test()
             cell->face(face)->set_all_boundary_ids(4);
         }
 
-  for (auto i : tria.get_boundary_ids())
+  for (const auto i : tria.get_boundary_ids())
     deallog << i << " ";
   deallog << std::endl;
 }

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.