Skip to content
Snippets Groups Projects
Commit 58079c88 authored by Tom Fischer's avatar Tom Fischer Committed by Dmitry Yu. Naumov
Browse files

[MeL/Elements] Mv Element::setNode to TemplateElement.

parent 6179de17
No related branches found
No related tags found
No related merge requests found
......@@ -82,16 +82,6 @@ std::optional<unsigned> Element::addNeighbor(Element* e)
return std::optional<unsigned>();
}
void Element::setNode(unsigned idx, Node* node)
{
#ifndef NDEBUG
if (idx < getNumberOfNodes())
#endif
{
_nodes[idx] = node;
}
}
bool Element::isBoundaryElement() const
{
return std::any_of(
......
......@@ -61,7 +61,7 @@ public:
* @param idx the index of the pointer to a node within the element
* @param node a pointer to a node
*/
void setNode(unsigned idx, Node* node);
virtual void setNode(unsigned idx, Node* node) = 0;
/// Get array of element nodes.
Node* const* getNodes() const { return _nodes; }
......
......@@ -110,10 +110,21 @@ const Node* TemplateElement<ELEMENT_RULE>::getNode(unsigned i) const
return _nodes[i];
}
#ifndef NDEBUG
ERR("Error in MeshLib::Element::getNode() - Index {:d} in {:s}", i,
ERR("Error in MeshLib::TemplateElement::getNode() - Index {:d} in {:s}", i,
MeshElemType2String(getGeomType()));
return nullptr;
#endif
}
template <class ELEMENT_RULE>
void TemplateElement<ELEMENT_RULE>::setNode(unsigned idx, Node* node)
{
#ifndef NDEBUG
if (idx < getNumberOfNodes())
#endif
{
_nodes[idx] = node;
}
}
} // namespace MeshLib
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