libMesh
boundary_info.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2025 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 
712 #ifdef LIBMESH_ENABLE_DEPRECATED
713  void build_node_list (std::vector<dof_id_type> & node_id_list,
714  std::vector<boundary_id_type> & bc_id_list) const;
715 #endif
716 
729  typedef std::tuple<dof_id_type, boundary_id_type> NodeBCTuple;
731  std::vector<NodeBCTuple> build_node_list(NodeBCTupleSortBy sort_by = NodeBCTupleSortBy::NODE_ID) const;
732 
741  void build_node_list_from_side_list(const std::set<boundary_id_type> & sideset_list = {});
742 
749  void build_side_list_from_node_list(const std::set<boundary_id_type> & nodeset_list = {});
750 
761 #ifdef LIBMESH_ENABLE_DEPRECATED
762  void build_side_list (std::vector<dof_id_type> & element_id_list,
763  std::vector<unsigned short int> & side_list,
764  std::vector<boundary_id_type> & bc_id_list) const;
765 #endif
766 
778  typedef std::tuple<dof_id_type, unsigned short int, boundary_id_type> BCTuple;
780  std::vector<BCTuple> build_side_list(BCTupleSortBy sort_by = BCTupleSortBy::ELEM_ID) const;
781 
792 #ifdef LIBMESH_ENABLE_DEPRECATED
793  void build_active_side_list (std::vector<dof_id_type> & element_id_list,
794  std::vector<unsigned short int> & side_list,
795  std::vector<boundary_id_type> & bc_id_list) const;
796 #endif
797 
803  std::vector<BCTuple> build_active_side_list () const;
804 
815 #ifdef LIBMESH_ENABLE_DEPRECATED
816  void build_edge_list (std::vector<dof_id_type> & element_id_list,
817  std::vector<unsigned short int> & edge_list,
818  std::vector<boundary_id_type> & bc_id_list) const;
819 #endif
820 
826  std::vector<BCTuple> build_edge_list() const;
827 
838 #ifdef LIBMESH_ENABLE_DEPRECATED
839  void build_shellface_list (std::vector<dof_id_type> & element_id_list,
840  std::vector<unsigned short int> & shellface_list,
841  std::vector<boundary_id_type> & bc_id_list) const;
842 #endif
843 
849  std::vector<BCTuple> build_shellface_list() const;
850 
858  void parallel_sync_side_ids();
859  void parallel_sync_node_ids();
860 
868  const std::set<boundary_id_type> & get_boundary_ids () const
869  { return _boundary_ids; }
870 
875  const std::set<boundary_id_type> & get_global_boundary_ids () const;
876 
881  const std::set<boundary_id_type> & get_side_boundary_ids () const
882  { return _side_boundary_ids; }
883 
890  const std::set<boundary_id_type> & get_edge_boundary_ids () const
891  { return _edge_boundary_ids; }
892 
899  const std::set<boundary_id_type> & get_shellface_boundary_ids () const
900  { return _shellface_boundary_ids; }
901 
906  const std::set<boundary_id_type> & get_node_boundary_ids () const
907  { return _node_boundary_ids; }
908 
909 
913  void print_info (std::ostream & out_stream=libMesh::out) const;
914 
918  void print_summary (std::ostream & out_stream=libMesh::out) const;
919 
923  const std::string & get_sideset_name(boundary_id_type id) const;
924 
929  std::string & sideset_name(boundary_id_type id);
930 
934  const std::string & get_nodeset_name(boundary_id_type id) const;
935 
940  std::string & nodeset_name(boundary_id_type id);
941 
945  const std::string & get_edgeset_name(boundary_id_type id) const;
946 
950  std::string & edgeset_name(boundary_id_type id);
951 
956  boundary_id_type get_id_by_name(std::string_view name) const;
957 
961  std::map<boundary_id_type, std::string> & set_sideset_name_map ()
962  { return _ss_id_to_name; }
963  const std::map<boundary_id_type, std::string> & get_sideset_name_map () const
964  { return _ss_id_to_name; }
965 
969  std::map<boundary_id_type, std::string> & set_nodeset_name_map ()
970  { return _ns_id_to_name; }
971  const std::map<boundary_id_type, std::string> & get_nodeset_name_map () const
972  { return _ns_id_to_name; }
973 
977  std::map<boundary_id_type, std::string> & set_edgeset_name_map ()
978  { return _es_id_to_name; }
979  const std::map<boundary_id_type, std::string> & get_edgeset_name_map () const
980  { return _es_id_to_name; }
981 
987 
991  const std::multimap<const Node *, boundary_id_type> & get_nodeset_map () const
992  { return _boundary_node_id; }
993 
997  const std::multimap<const Elem *, std::pair<unsigned short int, boundary_id_type>> & get_edgeset_map () const
998  { return _boundary_edge_id; }
999 
1003  const std::multimap<const Elem *, std::pair<unsigned short int, boundary_id_type>> & get_sideset_map() const
1004  { return _boundary_side_id; }
1005 
1010  { return _children_on_boundary; }
1011 
1015  void allow_children_on_boundary_side(const bool children_on_boundary)
1016  { _children_on_boundary = children_on_boundary; }
1017 
1018 private:
1019 
1026  void libmesh_assert_valid_multimaps() const;
1027 
1033  void _find_id_maps (const std::set<boundary_id_type> & requested_boundary_ids,
1034  dof_id_type first_free_node_id,
1035  std::map<dof_id_type, dof_id_type> * node_id_map,
1036  dof_id_type first_free_elem_id,
1037  std::map<std::pair<dof_id_type, unsigned char>, dof_id_type> * side_id_map,
1038  const std::set<subdomain_id_type> & subdomains_relative_to);
1039 
1044 
1049  std::multimap<const Node *,
1051 
1056  std::multimap<const Elem *,
1057  std::pair<unsigned short int, boundary_id_type>>
1059 
1064  std::multimap<const Elem *,
1065  std::pair<unsigned short int, boundary_id_type>>
1067 
1072  std::multimap<const Elem *,
1073  std::pair<unsigned short int, boundary_id_type>>
1075 
1076  /*
1077  * Whether or not children elements are associated with any boundary
1078  * It is false by default. The flag will be turned on if `add_side`
1079  * function is called with a child element
1080  */
1082 
1092  std::set<boundary_id_type> _boundary_ids;
1093 
1104  std::set<boundary_id_type> _global_boundary_ids;
1105 
1115  std::set<boundary_id_type> _side_boundary_ids;
1116 
1126  std::set<boundary_id_type> _edge_boundary_ids;
1127 
1137  std::set<boundary_id_type> _node_boundary_ids;
1138 
1149  std::set<boundary_id_type> _shellface_boundary_ids;
1150 
1158  std::map<boundary_id_type, std::string> _ss_id_to_name;
1159 
1167  std::map<boundary_id_type, std::string> _ns_id_to_name;
1168 
1176  std::map<boundary_id_type, std::string> _es_id_to_name;
1177 };
1178 
1179 } // namespace libMesh
1180 
1181 #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
As above, but the library creates and fills in a vector of (elem-id, side-id, bc-id) triplets and ret...
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
As above, but the library creates and fills in a vector of (elem-id, side-id, bc-id) triplets and ret...
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
As above, but the library creates and fills in a vector of (elem-id, side-id, bc-id) triplets and ret...
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.
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:75
std::size_t n_boundary_ids() const
void build_side_list(std::vector< dof_id_type > &element_id_list, std::vector< unsigned short int > &side_list, std::vector< boundary_id_type > &bc_id_list) const
Creates a list of element numbers, sides, and ids for those sides.
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
As above, but the library creates and fills in a vector of (node-id, bc-id) pairs and returns it to t...
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 build_node_list(std::vector< dof_id_type > &node_id_list, std::vector< boundary_id_type > &bc_id_list) const
Creates a list of nodes and ids for those nodes.
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
As above, but the library creates and fills in a vector of (elem-id, side-id, bc-id) triplets and ret...
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
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.