Skip to content

Commit

Permalink
Remove boundary deletion upon child boundary transfer.
Browse files Browse the repository at this point in the history
  • Loading branch information
grmnptr committed Mar 1, 2023
1 parent 6f1ae70 commit 9124dcc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/mesh/boundary_info.C
Original file line number Diff line number Diff line change
Expand Up @@ -1890,16 +1890,9 @@ BoundaryInfo::transfer_boundary_ids_from_children(const Elem * const parent)
// This is where the decision is made. If 50% of the children have the tags,
// we propagate them upwards upon coarsening. Otherwise, they are deleted.
for (const auto & boundary : boundary_counts)
{
if (boundary.second / number_of_sides_on_children > 0.5)
this->add_side(parent, side_i, boundary.first);
else
this->remove_side(parent, side_i, boundary.first);
}
}

for (const auto & child_i : make_range(parent->n_children()))
this->remove(parent->child_ptr(child_i));
}

std::size_t BoundaryInfo::n_boundary_conds () const
Expand Down
2 changes: 2 additions & 0 deletions tests/mesh/boundary_info.C
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,8 @@ public:
if (c(0) < 1)
{
CPPUNIT_ASSERT(bi.has_boundary_id(elem, 1, 5));
// We clean this boundary for the next round of tests
bi.remove_side(elem, 1, 5);
// we will refine this element again
elem->set_refinement_flag(Elem::REFINE);
}
Expand Down

0 comments on commit 9124dcc

Please sign in to comment.