OGS
|
Definition at line 25 of file ElementStatus.h.
#include <ElementStatus.h>
Public Member Functions | |
ElementStatus (MeshLib::Mesh const *const mesh, bool hasAnyInactive=false) | |
Constructor assuming all nodes and elements. | |
ElementStatus (MeshLib::Mesh const *const mesh, std::vector< int > const &vec_inactive_matIDs) | |
Constructor taking a vector of inactive material IDs. | |
std::vector< MeshLib::Element * > const & | getActiveElements () const |
Returns a vector of active element IDs. | |
std::vector< MeshLib::Node * > const & | getActiveNodes () const |
Returns a vector of active node IDs. | |
bool | isActive (std::size_t i) const |
Returns the status of element i. | |
bool | isActiveNode (MeshLib::Node const *node) const |
Returns the status of the given node. | |
std::size_t | getNumberOfActiveNodes () const |
Returns the total number of active nodes. | |
std::size_t | getNumberOfActiveElements () const |
Returns the total number of active elements. | |
Private Member Functions | |
void | setElementStatus (std::size_t i, bool status) |
Sets the status of element i. | |
Private Attributes | |
MeshLib::Mesh const *const | _mesh |
The mesh for which the element status is administrated. | |
std::vector< bool > | _element_status |
Element status for each mesh element (active/inactive = true/false) | |
std::vector< unsigned char > | _active_nodes |
Node status for each mesh node (value = number of active elements connected to node, 0 means inactive) | |
bool const | _hasAnyInactive |
std::vector< MeshLib::Node * > | _vec_active_nodes |
std::vector< MeshLib::Element * > | _vec_active_eles |
|
explicit |
Constructor assuming all nodes and elements.
Definition at line 23 of file ElementStatus.cpp.
References _active_nodes, _mesh, MeshLib::Mesh::getElementsConnectedToNode(), and MeshLib::Mesh::getNodes().
MeshLib::ElementStatus::ElementStatus | ( | MeshLib::Mesh const *const | mesh, |
std::vector< int > const & | vec_inactive_matIDs ) |
Constructor taking a vector of inactive material IDs.
Definition at line 34 of file ElementStatus.cpp.
References MeshLib::Properties::existsPropertyVector(), and MeshLib::Mesh::getProperties().
std::vector< MeshLib::Element * > const & MeshLib::ElementStatus::getActiveElements | ( | ) | const |
Returns a vector of active element IDs.
Definition at line 84 of file ElementStatus.cpp.
std::vector< MeshLib::Node * > const & MeshLib::ElementStatus::getActiveNodes | ( | ) | const |
Returns a vector of active node IDs.
Definition at line 94 of file ElementStatus.cpp.
std::size_t MeshLib::ElementStatus::getNumberOfActiveElements | ( | ) | const |
Returns the total number of active elements.
Definition at line 110 of file ElementStatus.cpp.
std::size_t MeshLib::ElementStatus::getNumberOfActiveNodes | ( | ) | const |
Returns the total number of active nodes.
Definition at line 104 of file ElementStatus.cpp.
|
inline |
Returns the status of element i.
Definition at line 44 of file ElementStatus.h.
References _element_status.
bool MeshLib::ElementStatus::isActiveNode | ( | MeshLib::Node const * | node | ) | const |
Returns the status of the given node.
Definition at line 135 of file ElementStatus.cpp.
References MathLib::Point3dWithID::getID().
|
private |
Sets the status of element i.
Definition at line 116 of file ElementStatus.cpp.
References MathLib::Point3dWithID::getID().
|
private |
Node status for each mesh node (value = number of active elements connected to node, 0 means inactive)
Definition at line 64 of file ElementStatus.h.
Referenced by ElementStatus().
|
private |
Element status for each mesh element (active/inactive = true/false)
Definition at line 62 of file ElementStatus.h.
Referenced by isActive().
|
private |
Definition at line 66 of file ElementStatus.h.
|
private |
The mesh for which the element status is administrated.
Definition at line 60 of file ElementStatus.h.
Referenced by ElementStatus().
|
private |
Definition at line 68 of file ElementStatus.h.
|
private |
Definition at line 67 of file ElementStatus.h.