]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Rename a few variables and use range based loop in mesh classifer test.
authorSimon Sticko <simon@sticko.se>
Tue, 10 May 2022 06:35:58 +0000 (08:35 +0200)
committerSimon Sticko <simon@sticko.se>
Tue, 10 May 2022 06:42:56 +0000 (08:42 +0200)
tests/non_matching/mesh_classifier.cc

index 3330a08ce2686251086ed6b7cbfaaca003c35195..a0dbf8fb0c322eb0a0311818d08789cec0b8144d 100644 (file)
@@ -73,15 +73,15 @@ print_cell_and_face_locations(
   const NonMatching::MeshClassifier<dim> &                 classifier,
   const typename Triangulation<dim>::active_cell_iterator &cell)
 {
-  const NonMatching::LocationToLevelSet cell_position =
+  const NonMatching::LocationToLevelSet cell_location =
     classifier.location_to_level_set(cell);
-  deallog << "cell " << location_to_string(cell_position) << std::endl;
+  deallog << "cell " << location_to_string(cell_location) << std::endl;
 
-  for (unsigned int i = 0; i < GeometryInfo<dim>::faces_per_cell; ++i)
+  for (unsigned int f : cell->face_indices())
     {
-      const NonMatching::LocationToLevelSet cell_position =
-        classifier.location_to_level_set(cell, i);
-      deallog << "face " << i << ' ' << location_to_string(cell_position)
+      const NonMatching::LocationToLevelSet face_location =
+        classifier.location_to_level_set(cell, f);
+      deallog << "face " << f << ' ' << location_to_string(face_location)
               << 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.