Skip to content

Commit 4be946d

Browse files
committed
Made BoundaryInfo::boundary_ids for _children_on_boundary
1 parent 471836f commit 4be946d

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/mesh/boundary_info.C

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,8 +1235,15 @@ void BoundaryInfo::boundary_ids (const Elem * const elem,
12351235
// Clear out any previous contents
12361236
vec_to_fill.clear();
12371237

1238-
// Only level-0 elements store BCs. If this is not a level-0
1239-
// element get its level-0 parent and infer the BCs.
1238+
// Search BC on the current element. If we find anything, we should return
1239+
for (const auto & pr : as_range(_boundary_side_id.equal_range(elem)))
1240+
if (pr.second.first == side)
1241+
vec_to_fill.push_back(pr.second.second);
1242+
1243+
if (vec_to_fill.size())
1244+
return;
1245+
1246+
// We check the top parent now
12401247
const Elem * searched_elem = elem;
12411248
if (elem->level() != 0)
12421249
{
@@ -1283,7 +1290,7 @@ void BoundaryInfo::raw_boundary_ids (const Elem * const elem,
12831290
vec_to_fill.clear();
12841291

12851292
// Only level-0 elements store BCs.
1286-
if (elem->parent())
1293+
if (elem->parent() && !_children_on_boundary)
12871294
return;
12881295

12891296
// Check each element in the range to see if its side matches the requested side.

0 commit comments

Comments
 (0)