From c5b7b017db607d34f44ea47e98dd0c6002edfde3 Mon Sep 17 00:00:00 2001 From: Norihiro Watanabe <norihiro.watanabe@ufz.de> Date: Fri, 4 Nov 2016 15:42:36 +0100 Subject: [PATCH] [Mesh] add isActiveNode() to ElementStatus --- MeshLib/ElementStatus.cpp | 5 +++++ MeshLib/ElementStatus.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/MeshLib/ElementStatus.cpp b/MeshLib/ElementStatus.cpp index 924f9808bcd..f245e2d6fa8 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 d9135756da2..8fb357f4234 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; -- GitLab