Skip to content

Commit 2594faa

Browse files
committed
Merge remote-tracking branch 'GiudGiud/PR_patch_sidesets2' into devel
2 parents 6e3c813 + 4dcbeef commit 2594faa

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/mesh/boundary_info.C

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,9 +1541,14 @@ void BoundaryInfo::side_boundary_ids (const Elem * const elem,
15411541

15421542
// Clear out any previous contents
15431543
vec_to_fill.clear();
1544-
// We are going to gather boundary ids for each side
1545-
vec_to_fill.resize(elem->n_sides());
1544+
auto num_sides = elem->n_sides();
1545+
1546+
// No sides, no boundary ids
1547+
if (!num_sides)
1548+
return;
15461549

1550+
// We are going to gather boundary ids for each side
1551+
vec_to_fill.resize(num_sides);
15471552
// In most cases only level-0 elements store BCs.
15481553
// In certain applications (such as time-dependent domains), however, children
15491554
// need to store BCs too. This case is covered with the _children_on_boundary

0 commit comments

Comments
 (0)