Skip to content

Commit 210f356

Browse files
authored
Merge pull request #3636 from lindsayad/remove-global-boundary-id
Add option for removing global boundary ID in remove_id
2 parents 713688a + 8ef80f6 commit 210f356

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

include/mesh/boundary_info.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,9 +373,12 @@ class BoundaryInfo : public ParallelObject
373373
* \p id's existence from the BoundaryInfo object. That is, after
374374
* calling remove_id(), \p id will no longer be in the sets returned by
375375
* get_boundary_ids(), get_side_boundary_ids(), etc., and will not
376-
* be in the bc_id_list vector returned by build_side_list(), etc.
376+
* be in the bc_id_list vector returned by build_side_list(), etc. Set
377+
* the \p global parameter to true if this is being called for all processes
378+
* in the object's communicator, in which case we will remove the id from
379+
* the global boundary ID container
377380
*/
378-
void remove_id (boundary_id_type id);
381+
void remove_id (boundary_id_type id, bool global = false);
379382

380383
/**
381384
* Changes all entities (nodes, sides, edges, shellfaces) with boundary

src/mesh/boundary_info.C

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1779,7 +1779,7 @@ void BoundaryInfo::remove_side (const Elem * elem,
17791779

17801780

17811781

1782-
void BoundaryInfo::remove_id (boundary_id_type id)
1782+
void BoundaryInfo::remove_id (boundary_id_type id, const bool global)
17831783
{
17841784
// Erase id from ids containers
17851785
_boundary_ids.erase(id);
@@ -1790,6 +1790,8 @@ void BoundaryInfo::remove_id (boundary_id_type id)
17901790
_ss_id_to_name.erase(id);
17911791
_ns_id_to_name.erase(id);
17921792
_es_id_to_name.erase(id);
1793+
if (global)
1794+
_global_boundary_ids.erase(id);
17931795

17941796
// Erase (*, id) entries from map.
17951797
erase_if(_boundary_node_id,

0 commit comments

Comments
 (0)