diff --git a/MeshLib/ElementStatus.cpp b/MeshLib/ElementStatus.cpp index 924f9808bcdeaa0978322da8b24bb2eb795a8575..f245e2d6fa85eabc797639bc84967a010d7a25f6 100644 --- a/MeshLib/ElementStatus.cpp +++ b/MeshLib/ElementStatus.cpp @@ -125,4 +125,9 @@ void ElementStatus::setElementStatus(std::size_t i, bool status) } } +bool ElementStatus::isActiveNode(MeshLib::Node const* node) const +{ + return _active_nodes[node->getID()]>0; +} + } diff --git a/MeshLib/ElementStatus.h b/MeshLib/ElementStatus.h index d9135756da29f85a8573e95c49df91d975963835..8fb357f42343c8c5f718bf3d72a2981901e33adb 100644 --- a/MeshLib/ElementStatus.h +++ b/MeshLib/ElementStatus.h @@ -43,6 +43,9 @@ public: /// Returns the status of element i bool isActive(std::size_t i) const { return _element_status[i]; } + /// Returns the status of node i + bool isActiveNode(MeshLib::Node const* node) const; + /// Returns a vector of active elements connected to a node std::vector<MeshLib::Element*> getActiveElementsAtNode(std::size_t node_id) const;