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

[MeL] MeshSubset::getElementID().

parent 77556a8e
No related branches found
No related tags found
No related merge requests found
......@@ -81,6 +81,18 @@ public:
return (_eles==nullptr) ? 0 : _eles->size();
}
/// Returns the global element id Element::getID() of i-th element in the
/// mesh subset.
/// Throws std::out_of_range exception if there are no nodes available.
std::size_t getElementID(std::size_t const i) const
{
if (!_eles)
throw std::out_of_range(
"In MeshSubset::getElementID(): no elements or elements are empty.");
return (*_eles)[i]->getID();
}
std::vector<Element*>::const_iterator elementsBegin() const
{
return _msh.getElements().cbegin();
......
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