|
PolyFEM
|
Boundary primitive IDs for a single element. More...
#include <LocalBoundary.hpp>
Public Member Functions | |
| LocalBoundary (const int global_element_id, BoundaryType type) | |
| Construct a new Local Boundary object for a given element. | |
| LocalBoundary (const LocalBoundary &other) | |
| Copy constructor. | |
| void | add_boundary_primitive (const int global_index, const int local_index) |
| Mark a boundary primitive as a part of the global boundary. | |
| int | size () const |
| Number of boundary primitives for the element. | |
| bool | empty () const |
| Check if the element has any boundary primitives. | |
| int | element_id () const |
| Get the element's ID. | |
| BoundaryType | type () const |
| Get the type of boundary for the element. | |
| int | local_primitive_id (const int index) const |
| Get the i-th boundary primitive's local ID. | |
| int | global_primitive_id (const int index) const |
| Get the i-th boundary primitive's global ID. | |
| int | operator[] (const int index) const |
| Get the i-th boundary primitive's local ID. | |
| void | remove_from (const LocalBoundary &other) |
| Remove all boundary primitives that are also in another LocalBoundary. | |
| void | remove_tag_for_index (const int index) |
| Remove a boundary primitive from the element. | |
Private Attributes | |
| std::vector< int > | global_primitive_id_ |
| Global IDs of the boundary primitives. | |
| std::vector< int > | local_primitive_id_ |
| Local IDs of the boundary primitives. | |
| const int | global_element_id_ |
| Element ID. | |
| const BoundaryType | type_ |
| Type of boundary primitives for the element. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const LocalBoundary &lb) |
| Print the LocalBoundary to an output stream. | |
Boundary primitive IDs for a single element.
Definition at line 25 of file LocalBoundary.hpp.
| polyfem::mesh::LocalBoundary::LocalBoundary | ( | const int | global_element_id, |
| BoundaryType | type | ||
| ) |
Construct a new Local Boundary object for a given element.
| global_element_id | Element ID |
| type | Type of boundary for the element |
Definition at line 5 of file LocalBoundary.cpp.
| polyfem::mesh::LocalBoundary::LocalBoundary | ( | const LocalBoundary & | other | ) |
Copy constructor.
| other | LocalBoundary to copy |
Definition at line 10 of file LocalBoundary.cpp.
| void polyfem::mesh::LocalBoundary::add_boundary_primitive | ( | const int | global_index, |
| const int | local_index | ||
| ) |
Mark a boundary primitive as a part of the global boundary.
| global_index | Global index of the boundary primitive |
| local_index | Local index of the boundary primitive |
Definition at line 16 of file LocalBoundary.cpp.
References global_primitive_id_, and local_primitive_id_.
Referenced by polyfem::assembler::Problem::setup_bc().
|
inline |
Get the element's ID.
Definition at line 52 of file LocalBoundary.hpp.
References global_element_id_.
Referenced by polyfem::utils::BoundarySampler::boundary_quadrature(), polyfem::utils::BoundarySampler::boundary_quadrature(), and polyfem::utils::BoundarySampler::sample_boundary().
|
inline |
Check if the element has any boundary primitives.
Definition at line 48 of file LocalBoundary.hpp.
References size().
Referenced by polyfem::assembler::Problem::setup_bc().
|
inline |
Get the i-th boundary primitive's global ID.
| index | Index of the boundary primitive. |
Definition at line 66 of file LocalBoundary.hpp.
References global_primitive_id_.
Referenced by polyfem::utils::BoundarySampler::boundary_quadrature(), polyfem::utils::BoundarySampler::boundary_quadrature(), and polyfem::utils::BoundarySampler::sample_boundary().
|
inline |
Get the i-th boundary primitive's local ID.
| index | Index of the boundary primitive. |
Definition at line 61 of file LocalBoundary.hpp.
References local_primitive_id_.
Referenced by operator[]().
|
inline |
Get the i-th boundary primitive's local ID.
| index | Index of the boundary primitive. |
Definition at line 71 of file LocalBoundary.hpp.
References local_primitive_id().
| void polyfem::mesh::LocalBoundary::remove_from | ( | const LocalBoundary & | other | ) |
Remove all boundary primitives that are also in another LocalBoundary.
| other | Other LocalBoundary to remove from this one. |
Definition at line 22 of file LocalBoundary.cpp.
References remove_tag_for_index(), and size().
| void polyfem::mesh::LocalBoundary::remove_tag_for_index | ( | const int | index | ) |
Remove a boundary primitive from the element.
| index | Index of the boundary primitive to remove. |
Definition at line 43 of file LocalBoundary.cpp.
References global_primitive_id_, and local_primitive_id_.
Referenced by remove_from().
|
inline |
Number of boundary primitives for the element.
Definition at line 44 of file LocalBoundary.hpp.
References local_primitive_id_.
Referenced by polyfem::utils::BoundarySampler::boundary_quadrature(), polyfem::utils::BoundarySampler::boundary_quadrature(), empty(), remove_from(), and polyfem::utils::BoundarySampler::sample_boundary().
|
inline |
Get the type of boundary for the element.
Definition at line 56 of file LocalBoundary.hpp.
References type_.
Referenced by polyfem::utils::BoundarySampler::boundary_quadrature(), polyfem::utils::BoundarySampler::boundary_quadrature(), and polyfem::utils::BoundarySampler::sample_boundary().
|
friend |
Print the LocalBoundary to an output stream.
| os | Output stream |
| lb | LocalBoundary to print |
Definition at line 49 of file LocalBoundary.cpp.
|
private |
|
private |
Global IDs of the boundary primitives.
Definition at line 89 of file LocalBoundary.hpp.
Referenced by add_boundary_primitive(), global_primitive_id(), and remove_tag_for_index().
|
private |
Local IDs of the boundary primitives.
Definition at line 91 of file LocalBoundary.hpp.
Referenced by add_boundary_primitive(), local_primitive_id(), remove_tag_for_index(), and size().
|
private |
Type of boundary primitives for the element.
Definition at line 96 of file LocalBoundary.hpp.
Referenced by type().