From 9ce5d99b65feb3c3c263fc7f7d6af676d4c02162 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 6 Apr 2024 13:15:47 -0400 Subject: [PATCH] execute_refinement_isotropic(): Add a loop. --- source/grid/tria.cc | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 473c0c64b1..dc080be1e3 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -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(); } -- 2.39.5