Skip to content

Commit 4dcbeef

Browse files
GiudGiudjwpeterson
andcommitted
Return a tad earlier to avoid some calls
Co-authored-by: John W. Peterson <jwpeterson@gmail.com>
1 parent 6c8a256 commit 4dcbeef

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/mesh/boundary_info.C

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1541,13 +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();
15461545

15471546
// No sides, no boundary ids
1548-
if (!elem->n_sides())
1547+
if (!num_sides)
15491548
return;
15501549

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

0 commit comments

Comments
 (0)