File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -1235,9 +1235,16 @@ 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.
1240- const Elem * searched_elem = elem ;
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
1247+ const Elem * searched_elem = nullptr ;
12411248 if (elem -> level () != 0 )
12421249 {
12431250 if (elem -> neighbor_ptr (side ) == nullptr )
@@ -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.
You can’t perform that action at this time.
0 commit comments