diff --git a/MeshLib/Elements/Element.cpp b/MeshLib/Elements/Element.cpp
index 1466ba85f332826fa762b5e474c27e9810231e6f..43060dc86918b1d89c10ceb829c13f89a0b6ec22 100644
--- a/MeshLib/Elements/Element.cpp
+++ b/MeshLib/Elements/Element.cpp
@@ -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 ||
diff --git a/MeshLib/Elements/Element.h b/MeshLib/Elements/Element.h
index 47685aca0960d132fda04e45c975075c7b3a259c..168d80b0b727fa8f07c295643e45f48fe04e4913 100644
--- a/MeshLib/Elements/Element.h
+++ b/MeshLib/Elements/Element.h
@@ -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