]> https://gitweb.dealii.org/ - dealii.git/commitdiff
execute_refinement_isotropic(): Add a loop.
authorDavid Wells <drwells@email.unc.edu>
Sat, 6 Apr 2024 17:15:47 +0000 (13:15 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 8 Apr 2024 15:24:41 +0000 (11:24 -0400)
source/grid/tria.cc

index 473c0c64b19ddb70b518e3d5cf2c7137c187a38e..dc080be1e31d8d4de5f117ac350ed712bfdf84ad 100644 (file)
@@ -5078,21 +5078,17 @@ namespace internal
                 children[1]->set_bounding_object_indices(
                   {next_unused_vertex, line->vertex_index(1)});
 
-                children[0]->set_used_flag();
-                children[1]->set_used_flag();
-                children[0]->clear_children();
-                children[1]->clear_children();
-                children[0]->clear_user_data();
-                children[1]->clear_user_data();
-                children[0]->clear_user_flag();
-                children[1]->clear_user_flag();
-
-
-                children[0]->set_boundary_id_internal(line->boundary_id());
-                children[1]->set_boundary_id_internal(line->boundary_id());
-
-                children[0]->set_manifold_id(line->manifold_id());
-                children[1]->set_manifold_id(line->manifold_id());
+                for (auto &child : children)
+                  {
+                    child->set_used_flag();
+                    child->clear_children();
+                    child->clear_user_data();
+                    child->clear_user_flag();
+                    child->set_boundary_id_internal(line->boundary_id());
+                    child->set_manifold_id(line->manifold_id());
+                    // Line orientation is relative to the cell it is on so
+                    // those cannot be set at this point.
+                  }
 
                 line->clear_user_flag();
               }

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.