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 _active_nodes, _element_status, _mesh, _vec_active_eles, _vec_active_nodes, DBUG(), MeshLib::Properties::existsPropertyVector(), MeshLib::Mesh::getElement(), MeshLib::Mesh::getElements(), MeshLib::Mesh::getNode(), getNumberOfActiveElements(), getNumberOfActiveNodes(), MeshLib::Mesh::getNumberOfElements(), MeshLib::Mesh::getNumberOfNodes(), MeshLib::Mesh::getProperties(), MeshLib::Properties::getPropertyVector(), and setElementStatus().
std::vector< MeshLib::Element * > const & MeshLib::ElementStatus::getActiveElements | ( | ) | const |
Returns a vector of active element IDs.
Definition at line 84 of file ElementStatus.cpp.
References _hasAnyInactive, _mesh, _vec_active_eles, and MeshLib::Mesh::getElements().
std::vector< MeshLib::Node * > const & MeshLib::ElementStatus::getActiveNodes | ( | ) | const |
Returns a vector of active node IDs.
Definition at line 94 of file ElementStatus.cpp.
References _hasAnyInactive, _mesh, _vec_active_nodes, and MeshLib::Mesh::getNodes().
std::size_t MeshLib::ElementStatus::getNumberOfActiveElements | ( | ) | const |
Returns the total number of active elements.
Definition at line 110 of file ElementStatus.cpp.
References _element_status.
Referenced by ElementStatus().
std::size_t MeshLib::ElementStatus::getNumberOfActiveNodes | ( | ) | const |
Returns the total number of active nodes.
Definition at line 104 of file ElementStatus.cpp.
References _active_nodes.
Referenced by ElementStatus().
|
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 _active_nodes, and MathLib::Point3dWithID::getID().
|
private |
Sets the status of element i.
Definition at line 116 of file ElementStatus.cpp.
References _active_nodes, _element_status, _mesh, MeshLib::Mesh::getElement(), MathLib::Point3dWithID::getID(), MeshLib::Element::getNodes(), and MeshLib::Element::getNumberOfNodes().
Referenced by ElementStatus().
|
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(), ElementStatus(), getNumberOfActiveNodes(), isActiveNode(), and setElementStatus().
|
private |
Element status for each mesh element (active/inactive = true/false)
Definition at line 62 of file ElementStatus.h.
Referenced by ElementStatus(), getNumberOfActiveElements(), isActive(), and setElementStatus().
|
private |
Definition at line 66 of file ElementStatus.h.
Referenced by getActiveElements(), and getActiveNodes().
|
private |
The mesh for which the element status is administrated.
Definition at line 60 of file ElementStatus.h.
Referenced by ElementStatus(), ElementStatus(), getActiveElements(), getActiveNodes(), and setElementStatus().
|
private |
Definition at line 68 of file ElementStatus.h.
Referenced by ElementStatus(), and getActiveElements().
|
private |
Definition at line 67 of file ElementStatus.h.
Referenced by ElementStatus(), and getActiveNodes().