libMesh
boundary_info.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2026 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 
20 #ifndef LIBMESH_BOUNDARY_INFO_H
21 #define LIBMESH_BOUNDARY_INFO_H
22 
23 // Local includes
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/id_types.h"
26 #include "libmesh/parallel_object.h"
27 
28 // C++ includes
29 #include <cstddef>
30 #include <map>
31 #include <set>
32 #include <vector>
33 #include <tuple>
34 
35 namespace libMesh
36 {
37 
38 
39 // Forward declarations
40 class Elem;
41 class Node;
42 class MeshBase;
43 class UnstructuredMesh;
44 
45 
58 {
59 protected:
60  friend class MeshBase;
61 
68  BoundaryInfo (MeshBase & m);
69 
70  void set_mesh (MeshBase & m) { _mesh = &m; }
71 
72 public:
81  BoundaryInfo & operator=(const BoundaryInfo & other_boundary_info);
82 
86  bool operator== (const BoundaryInfo & other_boundary_info) const;
87 
88  bool operator!= (const BoundaryInfo & other_boundary_info) const
89  {
90  return !(*this == other_boundary_info);
91  }
92 
96  ~BoundaryInfo ();
97 
102  void clear ();
103 
111  void regenerate_id_sets ();
112 
122 
130  void sync (UnstructuredMesh & boundary_mesh);
131 
143  void sync (const std::set<boundary_id_type> & requested_boundary_ids,
144  UnstructuredMesh & boundary_mesh);
145 
156  void sync (const std::set<boundary_id_type> & requested_boundary_ids,
157  UnstructuredMesh & boundary_mesh,
158  const std::set<subdomain_id_type> & subdomains_relative_to);
159 
171  void get_side_and_node_maps (UnstructuredMesh & boundary_mesh,
172  std::map<dof_id_type, dof_id_type> & node_id_map,
173  std::map<dof_id_type, unsigned char> & side_id_map,
174  Real tolerance=1.e-6);
175 
186  void add_elements (const std::set<boundary_id_type> & requested_boundary_ids,
187  UnstructuredMesh & boundary_mesh,
188  bool store_parent_side_ids = false);
189 
196  void add_elements(const std::set<boundary_id_type> & requested_boundary_ids,
197  UnstructuredMesh & boundary_mesh,
198  const std::set<subdomain_id_type> & subdomains_relative_to,
199  bool store_parent_side_ids = false);
200 
205  void add_node (const Node * node,
206  const boundary_id_type id);
207 
212  void add_node (const dof_id_type node,
213  const boundary_id_type id);
214 
219  void add_node (const Node * node,
220  const std::vector<boundary_id_type> & ids);
221 
226 
232  void add_edge (const dof_id_type elem,
233  const unsigned short int edge,
234  const boundary_id_type id);
235 
241  void add_edge (const Elem * elem,
242  const unsigned short int edge,
243  const boundary_id_type id);
244 
250  void add_edge (const Elem * elem,
251  const unsigned short int edge,
252  const std::vector<boundary_id_type> & ids);
253 
259  void add_shellface (const dof_id_type elem,
260  const unsigned short int shellface,
261  const boundary_id_type id);
262 
268  void add_shellface (const Elem * elem,
269  const unsigned short int shellface,
270  const boundary_id_type id);
271 
277  void add_shellface (const Elem * elem,
278  const unsigned short int shellface,
279  const std::vector<boundary_id_type> & ids);
280 
285  void add_side (const dof_id_type elem,
286  const unsigned short int side,
287  const boundary_id_type id);
288 
293  void add_side (const Elem * elem,
294  const unsigned short int side,
295  const boundary_id_type id);
296 
301  void add_side (const Elem * elem,
302  const unsigned short int side,
303  const std::vector<boundary_id_type> & ids);
304 
309  void remove (const Node * node);
310 
315  void remove (const Elem * elem);
316 
320  void remove_node (const Node * node,
321  const boundary_id_type id);
322 
327  void remove_edge (const Elem * elem,
328  const unsigned short int edge);
329 
334  void remove_edge (const Elem * elem,
335  const unsigned short int edge,
336  const boundary_id_type id);
337 
342  void remove_shellface (const Elem * elem,
343  const unsigned short int shellface);
344 
349  void remove_shellface (const Elem * elem,
350  const unsigned short int shellface,
351  const boundary_id_type id);
352 
357  void remove_side (const Elem * elem,
358  const unsigned short int side);
359 
364  void remove_side (const Elem * elem,
365  const unsigned short int side,
366  const boundary_id_type id);
367 
376  boundary_id_type other_sideset_id,
377  bool clear_nodeset_data = false);
378 
391  void remove_id (boundary_id_type id, bool global = false);
392 
402  void remove_side_id (boundary_id_type id, bool global = false);
403 
413  void remove_edge_id (boundary_id_type id, bool global = false);
414 
425  void remove_shellface_id (boundary_id_type id, bool global = false);
426 
436  void remove_node_id (boundary_id_type id, bool global = false);
437 
442  void renumber_id (boundary_id_type old_id, boundary_id_type new_id);
443 
448  void renumber_side_id (boundary_id_type old_id, boundary_id_type new_id);
449 
454  void renumber_edge_id (boundary_id_type old_id, boundary_id_type new_id);
455 
461 
466  void renumber_node_id (boundary_id_type old_id, boundary_id_type new_id);
467 
475  std::size_t n_boundary_ids () const { return _boundary_ids.size(); }
476 
480  bool has_boundary_id (const Node * const node,
481  const boundary_id_type id) const;
482 
487  void boundary_ids (const Node * node,
488  std::vector<boundary_id_type> & vec_to_fill) const;
489 
493  unsigned int n_boundary_ids (const Node * node) const;
494 
501  unsigned int n_edge_boundary_ids (const Elem * const elem,
502  const unsigned short int edge) const;
503 
510  void edge_boundary_ids (const Elem * const elem,
511  const unsigned short int edge,
512  std::vector<boundary_id_type> & vec_to_fill) const;
513 
523  void raw_edge_boundary_ids (const Elem * const elem,
524  const unsigned short int edge,
525  std::vector<boundary_id_type> & vec_to_fill) const;
526 
533  unsigned int n_shellface_boundary_ids (const Elem * const elem,
534  const unsigned short int shellface) const;
535 
542  void shellface_boundary_ids (const Elem * const elem,
543  const unsigned short int shellface,
544  std::vector<boundary_id_type> & vec_to_fill) const;
545 
555  void raw_shellface_boundary_ids (const Elem * const elem,
556  const unsigned short int shellface,
557  std::vector<boundary_id_type> & vec_to_fill) const;
558 
563  bool has_boundary_id (const Elem * const elem,
564  const unsigned short int side,
565  const boundary_id_type id) const;
566 
571  unsigned int n_boundary_ids (const Elem * const elem,
572  const unsigned short int side) const;
573 
578  unsigned int n_raw_boundary_ids (const Elem * const elem,
579  const unsigned short int side) const;
580 
585  void side_boundary_ids (const Elem * const elem,
586  std::vector<std::vector<boundary_id_type>> & vec_to_fill) const;
587 
592  void boundary_ids (const Elem * const elem,
593  const unsigned short int side,
594  std::vector<boundary_id_type> & vec_to_fill) const;
595 
603  void raw_boundary_ids (const Elem * const elem,
604  const unsigned short int side,
605  std::vector<boundary_id_type> & vec_to_fill) const;
606 
607  /*
608  * Copy boundary ids associated with old_elem (but not its nodes)
609  * from old_boundary_info (which may be this) into this boundary
610  * info, associating them with new_elem.
611  */
612  void copy_boundary_ids (const BoundaryInfo & old_boundary_info,
613  const Elem * const old_elem,
614  const Elem * const new_elem);
615 
623  unsigned int side_with_boundary_id(const Elem * const elem,
624  const boundary_id_type boundary_id) const;
625 
630  std::vector<unsigned int>
631  sides_with_boundary_id(const Elem * const elem,
632  const boundary_id_type boundary_id) const;
633 
640  void build_node_boundary_ids(std::vector<boundary_id_type> & b_ids) const;
641 
648  void build_side_boundary_ids(std::vector<boundary_id_type> & b_ids) const;
649 
656  void build_shellface_boundary_ids(std::vector<boundary_id_type> & b_ids) const;
657 
658 #ifdef LIBMESH_ENABLE_AMR
659 
670  void transfer_boundary_ids_from_children(const Elem * const parent);
671 #endif
672 
678  std::size_t n_boundary_conds () const;
679 
686  std::size_t n_edge_conds () const;
687 
694  std::size_t n_shellface_conds () const;
695 
701  std::size_t n_nodeset_conds () const;
702 
715  typedef std::tuple<dof_id_type, boundary_id_type> NodeBCTuple;
717  std::vector<NodeBCTuple> build_node_list(NodeBCTupleSortBy sort_by = NodeBCTupleSortBy::NODE_ID) const;
718 
727  void build_node_list_from_side_list(const std::set<boundary_id_type> & sideset_list = {});
728 
735  void build_side_list_from_node_list(const std::set<boundary_id_type> & nodeset_list = {});
736 
749  typedef std::tuple<dof_id_type, unsigned short int, boundary_id_type> BCTuple;
751  std::vector<BCTuple> build_side_list(BCTupleSortBy sort_by = BCTupleSortBy::ELEM_ID) const;
752 
759  std::vector<BCTuple> build_active_side_list () const;
760 
767  std::vector<BCTuple> build_edge_list() const;
768 
775  std::vector<BCTuple> build_shellface_list() const;
776 
784  void parallel_sync_side_ids();
785  void parallel_sync_node_ids();
786 
794  const std::set<boundary_id_type> & get_boundary_ids () const
795  { return _boundary_ids; }
796 
801  const std::set<boundary_id_type> & get_global_boundary_ids () const;
802 
807  const std::set<boundary_id_type> & get_side_boundary_ids () const
808  { return _side_boundary_ids; }
809 
816  const std::set<boundary_id_type> & get_edge_boundary_ids () const
817  { return _edge_boundary_ids; }
818 
825  const std::set<boundary_id_type> & get_shellface_boundary_ids () const
826  { return _shellface_boundary_ids; }
827 
832  const std::set<boundary_id_type> & get_node_boundary_ids () const
833  { return _node_boundary_ids; }
834 
835 
839  void print_info (std::ostream & out_stream=libMesh::out) const;
840 
844  void print_summary (std::ostream & out_stream=libMesh::out) const;
845 
849  const std::string & get_sideset_name(boundary_id_type id) const;
850 
855  std::string & sideset_name(boundary_id_type id);
856 
860  const std::string & get_nodeset_name(boundary_id_type id) const;
861 
866  std::string & nodeset_name(boundary_id_type id);
867 
871  const std::string & get_edgeset_name(boundary_id_type id) const;
872 
876  std::string & edgeset_name(boundary_id_type id);
877 
882  boundary_id_type get_id_by_name(std::string_view name) const;
883 
887  std::map<boundary_id_type, std::string> & set_sideset_name_map ()
888  { return _ss_id_to_name; }
889  const std::map<boundary_id_type, std::string> & get_sideset_name_map () const
890  { return _ss_id_to_name; }
891 
895  std::map<boundary_id_type, std::string> & set_nodeset_name_map ()
896  { return _ns_id_to_name; }
897  const std::map<boundary_id_type, std::string> & get_nodeset_name_map () const
898  { return _ns_id_to_name; }
899 
903  std::map<boundary_id_type, std::string> & set_edgeset_name_map ()
904  { return _es_id_to_name; }
905  const std::map<boundary_id_type, std::string> & get_edgeset_name_map () const
906  { return _es_id_to_name; }
907 
913 
917  const std::multimap<const Node *, boundary_id_type> & get_nodeset_map () const
918  { return _boundary_node_id; }
919 
923  const std::multimap<const Elem *, std::pair<unsigned short int, boundary_id_type>> & get_edgeset_map () const
924  { return _boundary_edge_id; }
925 
929  const std::multimap<const Elem *, std::pair<unsigned short int, boundary_id_type>> & get_sideset_map() const
930  { return _boundary_side_id; }
931 
936  { return _children_on_boundary; }
937 
941  void allow_children_on_boundary_side(const bool children_on_boundary)
942  { _children_on_boundary = children_on_boundary; }
943 
944 private:
945 
952  void libmesh_assert_valid_multimaps() const;
953 
959  void _find_id_maps (const std::set<boundary_id_type> & requested_boundary_ids,
960  dof_id_type first_free_node_id,
961  std::map<dof_id_type, dof_id_type> * node_id_map,
962  dof_id_type first_free_elem_id,
963  std::map<std::pair<dof_id_type, unsigned char>, dof_id_type> * side_id_map,
964  const std::set<subdomain_id_type> & subdomains_relative_to);
965 
970 
975  std::multimap<const Node *,
977 
982  std::multimap<const Elem *,
983  std::pair<unsigned short int, boundary_id_type>>
985 
990  std::multimap<const Elem *,
991  std::pair<unsigned short int, boundary_id_type>>
993 
998  std::multimap<const Elem *,
999  std::pair<unsigned short int, boundary_id_type>>
1001 
1002  /*
1003  * Whether or not children elements are associated with any boundary
1004  * It is false by default. The flag will be turned on if `add_side`
1005  * function is called with a child element
1006  */
1008 
1018  std::set<boundary_id_type> _boundary_ids;
1019 
1030  std::set<boundary_id_type> _global_boundary_ids;
1031 
1041  std::set<boundary_id_type> _side_boundary_ids;
1042 
1052  std::set<boundary_id_type> _edge_boundary_ids;
1053 
1063  std::set<boundary_id_type> _node_boundary_ids;
1064 
1075  std::set<boundary_id_type> _shellface_boundary_ids;
1076 
1084  std::map<boundary_id_type, std::string> _ss_id_to_name;
1085 
1093  std::map<boundary_id_type, std::string> _ns_id_to_name;
1094 
1102  std::map<boundary_id_type, std::string> _es_id_to_name;
1103 };
1104 
1105 } // namespace libMesh
1106 
1107 #endif // LIBMESH_BOUNDARY_INFO_H
void remove_shellface_id(boundary_id_type id, bool global=false)
Removes all shellfaces with boundary id id from the BoundaryInfo object, removes it from the set of s...
std::string name(const ElemQuality q)
This function returns a string containing some name for q.
Definition: elem_quality.C:42
void renumber_shellface_id(boundary_id_type old_id, boundary_id_type new_id)
Changes all shellfaces with boundary id old_id to instead be labeled by boundary id new_id...
void remove_id(boundary_id_type id, bool global=false)
Removes all entities (nodes, sides, edges, shellfaces) with boundary id id from their respective cont...
void libmesh_assert_valid_multimaps() const
Helper method for ensuring that our multimaps don&#39;t contain entries with duplicate keys and values...
std::size_t n_boundary_conds() const
void allow_children_on_boundary_side(const bool children_on_boundary)
Whether or not to allow directly setting boundary sides on child elements.
std::map< boundary_id_type, std::string > _ns_id_to_name
This structure maintains the mapping of named node sets for file formats (Exodus, Gmsh) that support ...
std::tuple< dof_id_type, unsigned short int, boundary_id_type > BCTuple
Create a list of (element_id, side_id, boundary_id) tuples for relevant sides.
std::set< boundary_id_type > _node_boundary_ids
Set of user-specified boundary IDs for nodes only.
const std::set< boundary_id_type > & get_side_boundary_ids() const
std::vector< BCTuple > build_shellface_list() const
Create a list of (element_id, shellface_id, boundary_id) tuples for all relevant shellfaces.
void raw_boundary_ids(const Elem *const elem, const unsigned short int side, std::vector< boundary_id_type > &vec_to_fill) const
std::vector< BCTuple > build_active_side_list() const
Create a list of (element_id, side_id, boundary_id) tuples for all relevant active sides...
void remove_edge(const Elem *elem, const unsigned short int edge)
Removes all boundary conditions associated with edge edge of element elem, if any exist...
A Node is like a Point, but with more information.
Definition: node.h:52
std::string & nodeset_name(boundary_id_type id)
bool has_boundary_id(const Node *const node, const boundary_id_type id) const
std::set< boundary_id_type > _edge_boundary_ids
Set of user-specified boundary IDs for edges only.
void sync(UnstructuredMesh &boundary_mesh)
Generates boundary_mesh data structures corresponding to the mesh data structures.
void add_elements(const std::set< boundary_id_type > &requested_boundary_ids, UnstructuredMesh &boundary_mesh, bool store_parent_side_ids=false)
Generates elements along the boundary of our _mesh, which use pre-existing nodes on the boundary_mesh...
~BoundaryInfo()
Destructor.
std::vector< unsigned int > sides_with_boundary_id(const Elem *const elem, const boundary_id_type boundary_id) const
void remove_node(const Node *node, const boundary_id_type id)
Removes boundary id id from node node, if it exists.
void synchronize_global_id_set()
Synchronizes the boundary_ids set on each processor to determine global_boundary_ids.
std::size_t n_edge_conds() const
void side_boundary_ids(const Elem *const elem, std::vector< std::vector< boundary_id_type >> &vec_to_fill) const
BoundaryInfo(MeshBase &m)
Constructor.
bool operator==(const BoundaryInfo &other_boundary_info) const
This tests for data equality via element ids.
void remove_shellface(const Elem *elem, const unsigned short int shellface)
Removes all boundary conditions associated with shell face shellface of element elem, if any exist.
std::size_t n_shellface_conds() const
void raw_edge_boundary_ids(const Elem *const elem, const unsigned short int edge, std::vector< boundary_id_type > &vec_to_fill) const
unsigned int n_shellface_boundary_ids(const Elem *const elem, const unsigned short int shellface) const
void build_node_list_from_side_list(const std::set< boundary_id_type > &sideset_list={})
Adds nodes with boundary ids based on the side&#39;s boundary ids they are connected to.
std::set< boundary_id_type > _boundary_ids
A collection of user-specified boundary ids for sides, edges, nodes, and shell faces.
void remove_side_id(boundary_id_type id, bool global=false)
Removes all sides with boundary id id from the BoundaryInfo object, removes it from the set of side b...
const std::map< boundary_id_type, std::string > & get_sideset_name_map() const
unsigned int side_with_boundary_id(const Elem *const elem, const boundary_id_type boundary_id) const
This is the base class from which all geometric element types are derived.
Definition: elem.h:94
std::set< boundary_id_type > _side_boundary_ids
Set of user-specified boundary IDs for sides only.
void build_side_boundary_ids(std::vector< boundary_id_type > &b_ids) const
Builds the list of unique side boundary ids.
void shellface_boundary_ids(const Elem *const elem, const unsigned short int shellface, std::vector< boundary_id_type > &vec_to_fill) const
void boundary_ids(const Node *node, std::vector< boundary_id_type > &vec_to_fill) const
Fills a user-provided std::vector with the boundary ids associated with Node node.
MeshBase * _mesh
A pointer to the Mesh this boundary info pertains to.
The libMesh namespace provides an interface to certain functionality in the library.
std::vector< BCTuple > build_side_list(BCTupleSortBy sort_by=BCTupleSortBy::ELEM_ID) const
void renumber_id(boundary_id_type old_id, boundary_id_type new_id)
Changes all entities (nodes, sides, edges, shellfaces) with boundary id old_id to instead be labeled ...
std::multimap< const Elem *, std::pair< unsigned short int, boundary_id_type > > _boundary_side_id
Data structure that maps sides of elements to boundary ids.
std::set< boundary_id_type > _global_boundary_ids
A collection of user-specified boundary ids for sides, edges, nodes, and shell faces.
This is the MeshBase class.
Definition: mesh_base.h:85
std::size_t n_boundary_ids() const
void build_side_list_from_node_list(const std::set< boundary_id_type > &nodeset_list={})
Adds sides to a sideset if every node on that side are in the same sideset.
const std::set< boundary_id_type > & get_node_boundary_ids() const
std::map< boundary_id_type, std::string > _ss_id_to_name
This structure maintains the mapping of named side sets for file formats (Exodus, Gmsh) that support ...
std::tuple< dof_id_type, boundary_id_type > NodeBCTuple
Create a list of (node_id, boundary_id) tuples for all relevant nodes.
void renumber_side_id(boundary_id_type old_id, boundary_id_type new_id)
Changes all sides with boundary id old_id to instead be labeled by boundary id new_id.
boundary_id_type get_id_by_name(std::string_view name) const
void clear_boundary_node_ids()
Clears all the boundary information from all of the nodes in the mesh.
std::map< boundary_id_type, std::string > & set_sideset_name_map()
void add_node(const Node *node, const boundary_id_type id)
Add Node node with boundary id id to the boundary information data structures.
void remove_edge_id(boundary_id_type id, bool global=false)
Removes all edges with boundary id id from the BoundaryInfo object, removes it from the set of edge b...
const std::map< boundary_id_type, std::string > & get_nodeset_name_map() const
const std::string & get_edgeset_name(boundary_id_type id) const
int8_t boundary_id_type
Definition: id_types.h:51
static const boundary_id_type invalid_id
Number used for internal use.
unsigned int n_raw_boundary_ids(const Elem *const elem, const unsigned short int side) const
std::map< boundary_id_type, std::string > _es_id_to_name
This structure maintains the mapping of named edge sets for file formats (Exodus, Gmsh) that support ...
std::multimap< const Node *, boundary_id_type > _boundary_node_id
Data structure that maps nodes in the mesh to boundary ids.
The UnstructuredMesh class is derived from the MeshBase class.
void print_info(std::ostream &out_stream=libMesh::out) const
Prints the boundary information data structure.
void raw_shellface_boundary_ids(const Elem *const elem, const unsigned short int shellface, std::vector< boundary_id_type > &vec_to_fill) const
const std::map< boundary_id_type, std::string > & get_edgeset_name_map() const
void parallel_sync_side_ids()
Synchronize the boundary element side and node across processors.
The BoundaryInfo class contains information relevant to boundary conditions including storing faces...
Definition: boundary_info.h:57
std::vector< BCTuple > build_edge_list() const
Create a list of (element_id, edge_id, boundary_id) tuples for all relevant edges.
An object whose state is distributed along a set of processors.
void regenerate_id_sets()
Clears and regenerates the cached sets of ids.
const std::string & get_nodeset_name(boundary_id_type id) const
void clear()
Clears the underlying data structures and restores the object to a pristine state with no data stored...
const std::multimap< const Elem *, std::pair< unsigned short int, boundary_id_type > > & get_sideset_map() const
std::string & sideset_name(boundary_id_type id)
void renumber_node_id(boundary_id_type old_id, boundary_id_type new_id)
Changes all nodes with boundary id old_id to instead be labeled by boundary id new_id.
BoundaryInfo & operator=(const BoundaryInfo &other_boundary_info)
Copy assignment operator.
const std::set< boundary_id_type > & get_boundary_ids() const
void build_node_boundary_ids(std::vector< boundary_id_type > &b_ids) const
Builds the list of unique node boundary ids.
void remove_side(const Elem *elem, const unsigned short int side)
Removes all boundary conditions associated with side side of element elem, if any exist...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int n_edge_boundary_ids(const Elem *const elem, const unsigned short int edge) const
void copy_boundary_ids(const BoundaryInfo &old_boundary_info, const Elem *const old_elem, const Elem *const new_elem)
std::map< boundary_id_type, std::string > & set_nodeset_name_map()
void clear_stitched_boundary_side_ids(boundary_id_type sideset_id, boundary_id_type other_sideset_id, bool clear_nodeset_data=false)
Clear sideset information along a stitched mesh interface.
OStreamProxy out
const std::set< boundary_id_type > & get_edge_boundary_ids() const
void add_side(const dof_id_type elem, const unsigned short int side, const boundary_id_type id)
Add side side of element number elem with boundary id id to the boundary information data structure...
const std::string & get_sideset_name(boundary_id_type id) const
const std::set< boundary_id_type > & get_global_boundary_ids() const
void add_shellface(const dof_id_type elem, const unsigned short int shellface, const boundary_id_type id)
Add shell face shellface of element number elem with boundary id id to the boundary information data ...
std::size_t n_nodeset_conds() const
std::string & edgeset_name(boundary_id_type id)
const std::set< boundary_id_type > & get_shellface_boundary_ids() const
void renumber_edge_id(boundary_id_type old_id, boundary_id_type new_id)
Changes all edges with boundary id old_id to instead be labeled by boundary id new_id.
void set_mesh(MeshBase &m)
Definition: boundary_info.h:70
bool operator!=(const BoundaryInfo &other_boundary_info) const
Definition: boundary_info.h:88
std::vector< NodeBCTuple > build_node_list(NodeBCTupleSortBy sort_by=NodeBCTupleSortBy::NODE_ID) const
void edge_boundary_ids(const Elem *const elem, const unsigned short int edge, std::vector< boundary_id_type > &vec_to_fill) const
std::set< boundary_id_type > _shellface_boundary_ids
Set of user-specified boundary IDs for shellfaces only.
bool is_children_on_boundary_side() const
void _find_id_maps(const std::set< boundary_id_type > &requested_boundary_ids, dof_id_type first_free_node_id, std::map< dof_id_type, dof_id_type > *node_id_map, dof_id_type first_free_elem_id, std::map< std::pair< dof_id_type, unsigned char >, dof_id_type > *side_id_map, const std::set< subdomain_id_type > &subdomains_relative_to)
Helper method for finding consistent maps of interior to boundary dof_object ids. ...
std::multimap< const Elem *, std::pair< unsigned short int, boundary_id_type > > _boundary_shellface_id
Data structure that maps faces of shell elements to boundary ids.
void print_summary(std::ostream &out_stream=libMesh::out) const
Prints a summary of the boundary information.
void remove_node_id(boundary_id_type id, bool global=false)
Removes all nodes with boundary id id from the BoundaryInfo object, removes it from the set of node b...
const std::multimap< const Node *, boundary_id_type > & get_nodeset_map() const
void build_shellface_boundary_ids(std::vector< boundary_id_type > &b_ids) const
Builds the list of unique shellface boundary ids.
std::multimap< const Elem *, std::pair< unsigned short int, boundary_id_type > > _boundary_edge_id
Data structure that maps edges of elements to boundary ids.
void get_side_and_node_maps(UnstructuredMesh &boundary_mesh, std::map< dof_id_type, dof_id_type > &node_id_map, std::map< dof_id_type, unsigned char > &side_id_map, Real tolerance=1.e-6)
Suppose we have used sync to create boundary_mesh.
const std::multimap< const Elem *, std::pair< unsigned short int, boundary_id_type > > & get_edgeset_map() const
uint8_t dof_id_type
Definition: id_types.h:67
std::map< boundary_id_type, std::string > & set_edgeset_name_map()
void add_edge(const dof_id_type elem, const unsigned short int edge, const boundary_id_type id)
Add edge edge of element number elem with boundary id id to the boundary information data structure...
void transfer_boundary_ids_from_children(const Elem *const parent)
Update parent&#39;s boundary id list so that this information is consistent with its children.