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

Add Element::setNeighbor().

This is used when the face_id of the neigbor is known.
parent 0ed78bcb
No related branches found
No related tags found
No related merge requests found
......@@ -33,6 +33,14 @@ Element::~Element()
delete [] this->_neighbors;
}
void Element::setNeighbor(Element* neighbor, unsigned const face_id)
{
if (neighbor == this)
return;
this->_neighbors[face_id] = neighbor;
}
unsigned Element::addNeighbor(Element* e)
{
if (e == this ||
......
......@@ -37,6 +37,8 @@ public:
/// Compute the minimum and maximum squared edge length for this element
virtual void computeSqrEdgeLengthRange(double &min, double &max) const;
void setNeighbor(Element* neighbor, unsigned const face_id);
/**
* \brief Tries to add an element e as neighbour to this element.
* If the elements really are neighbours, the element is added to the
......
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