Skip to content
Snippets Groups Projects
Commit b9ffa5f6 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

Add MeshSubset::getNodeID().

parent 4920a07d
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,18 @@ public:
return (_nodes==nullptr) ? 0 : _nodes->size();
}
/// Returns the global node id Node::getID() of i-th node in the mesh
/// subset.
/// Throws std::out_of_range exception if there are no nodes available.
std::size_t getNodeID(std::size_t const i) const
{
if (!_nodes)
throw std::out_of_range(
"In MeshSubset::getNodeID(): no nodes or nodes are empty.");
return (*_nodes)[i]->getID();
}
/// return the number of registered elements
std::size_t getNElements() const
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment