Commit 4873445c by Thomas Witkowski

### Fixed problem when using multiple periodic boundary conditions in parallel domain decomposition.

parent 6d3687b7
 ... @@ -371,6 +371,35 @@ namespace AMDiS { ... @@ -371,6 +371,35 @@ namespace AMDiS { /// Returns whether Element has sideElem as one of its sides. /// Returns whether Element has sideElem as one of its sides. virtual bool hasSide(Element *sideElem) const = 0; virtual bool hasSide(Element *sideElem) const = 0; /** \brief * Traverses an edge of a given element (this includes also all children of the * element having the same edge). All vertex dofs alonge this edge are assembled * and put together to a list. * * \param[in] feSpace FE space which is used to get the dofs. * \param[in] ithEdge Defines the edge on which all the vertex dofs * are assembled. * \param[out] dofs List of dofs, where the result is stored. * \param[in] parentVertices If true, also the two vertices of the parent * element are put into the result list. */ virtual void getVertexDofs(FiniteElemSpace* feSpace, int ithEdge, DofContainer& dofs, bool parentVertices = 0) const = 0; /** \brief * Traverses an edge of a given element (this includes also all children of the * element having the same edge). All non vertex dofs alonge this edge are * assembled and put together to a list. * * \param[in] feSpace FE space which is used to get the dofs. * \param[in] ithEdge Defines the edge on which all the non vertex * dofs are assembled. * \param[out] dofs All dofs are put to this dof list. */ virtual void getNonVertexDofs(FiniteElemSpace* feSpace, int ithEdge, DofContainer& dofs) const = 0; /** \} */ /** \} */ // ===== other public methods ================================================= // ===== other public methods ================================================= ... ...
 ... @@ -6,7 +6,7 @@ ... @@ -6,7 +6,7 @@ namespace AMDiS { namespace AMDiS { void ElementDofIterator::reset(Element* el) void ElementDofIterator::reset(const Element* el) { { FUNCNAME("ElementDofIterator::reset()"); FUNCNAME("ElementDofIterator::reset()"); ... ...
 ... @@ -54,7 +54,7 @@ namespace AMDiS { ... @@ -54,7 +54,7 @@ namespace AMDiS { {} {} /// Start a new traverse with the given element. /// Start a new traverse with the given element. void reset(Element* el); void reset(const Element* el); /// Go to next dof. Returns false, if there is dof anymore. /// Go to next dof. Returns false, if there is dof anymore. bool next(); bool next(); ... @@ -116,7 +116,7 @@ namespace AMDiS { ... @@ -116,7 +116,7 @@ namespace AMDiS { int* orderPosition; int* orderPosition; Element* element; const Element* element; /// Current position (i.e., vertex, edge, face) of the traverse. /// Current position (i.e., vertex, edge, face) of the traverse. int pos; int pos; ... ...
 ... @@ -74,6 +74,9 @@ namespace AMDiS { ... @@ -74,6 +74,9 @@ namespace AMDiS { /// datatype for degrees of freedom /// datatype for degrees of freedom typedef signed int DegreeOfFreedom; typedef signed int DegreeOfFreedom; /// Defines type for a vector of DOF pointers. typedef std::vector DofContainer; /// returns the GeoIndex of d for dimension dim. /// returns the GeoIndex of d for dimension dim. #define INDEX_OF_DIM(d, dim) (static_cast((d == dim) ? CENTER : d + 1)) #define INDEX_OF_DIM(d, dim) (static_cast((d == dim) ? CENTER : d + 1)) ... ...
 ... @@ -21,13 +21,13 @@ namespace AMDiS { ... @@ -21,13 +21,13 @@ namespace AMDiS { for (int i = 0; i < boundSize; i++) { for (int i = 0; i < boundSize; i++) { AtomicBoundary &bound = (it->second)[i]; AtomicBoundary &bound = (it->second)[i]; SerUtil::serialize(out, bound.rankObject.elIndex); SerUtil::serialize(out, bound.rankObj.elIndex); SerUtil::serialize(out, bound.rankObject.subObjAtBoundary); SerUtil::serialize(out, bound.rankObj.subObj); SerUtil::serialize(out, bound.rankObject.ithObjAtBoundary); SerUtil::serialize(out, bound.rankObj.ithObj); SerUtil::serialize(out, bound.neighbourObject.elIndex); SerUtil::serialize(out, bound.neighObj.elIndex); SerUtil::serialize(out, bound.neighbourObject.subObjAtBoundary); SerUtil::serialize(out, bound.neighObj.subObj); SerUtil::serialize(out, bound.neighbourObject.ithObjAtBoundary); SerUtil::serialize(out, bound.neighObj.ithObj); } } } } } } ... @@ -47,16 +47,16 @@ namespace AMDiS { ... @@ -47,16 +47,16 @@ namespace AMDiS { for (int i = 0; i < boundSize; i++) { for (int i = 0; i < boundSize; i++) { AtomicBoundary &bound = boundary[rank][i]; AtomicBoundary &bound = boundary[rank][i]; SerUtil::deserialize(in, bound.rankObject.elIndex); SerUtil::deserialize(in, bound.rankObj.elIndex); SerUtil::deserialize(in, bound.rankObject.subObjAtBoundary); SerUtil::deserialize(in, bound.rankObj.subObj); SerUtil::deserialize(in, bound.rankObject.ithObjAtBoundary); SerUtil::deserialize(in, bound.rankObj.ithObj); SerUtil::deserialize(in, bound.neighbourObject.elIndex); SerUtil::deserialize(in, bound.neighObj.elIndex); SerUtil::deserialize(in, bound.neighbourObject.subObjAtBoundary); SerUtil::deserialize(in, bound.neighObj.subObj); SerUtil::deserialize(in, bound.neighbourObject.ithObjAtBoundary); SerUtil::deserialize(in, bound.neighObj.ithObj); bound.rankObject.el = elIndexMap[bound.rankObject.elIndex]; bound.rankObj.el = elIndexMap[bound.rankObj.elIndex]; bound.neighbourObject.el = NULL; bound.neighObj.el = NULL; } } } } } } ... ...
 ... @@ -43,18 +43,18 @@ namespace AMDiS { ... @@ -43,18 +43,18 @@ namespace AMDiS { * Defines the geometrical object at the boundary. It must be "a part" of the * Defines the geometrical object at the boundary. It must be "a part" of the * macro element \ref el, i.e., either 1 (a vertex), 2 (an edge) or 3 (a face). * macro element \ref el, i.e., either 1 (a vertex), 2 (an edge) or 3 (a face). */ */ GeoIndex subObjAtBoundary; GeoIndex subObj; /** \brief /** \brief * Defines which of vertix, edge or face of the macro element is part of the * Defines which of vertix, edge or face of the macro element is part of the * boundary. * boundary. * * * Example: If the macro element is a triangle, than \ref subObjAtBoundary may * Example: If the macro element is a triangle, than \ref subObj may be either * be either 1 (vertex) or 2 (edge). Assume its the last one. So this variable * 1 (vertex) or 2 (edge). Assume its the last one. So this variable defines * defines which of the three possible edges of the triangle is at the interior * which of the three possible edges of the triangle is at the interior * boundary. * boundary. */ */ int ithObjAtBoundary; int ithObj; }; }; /** \brief /** \brief ... @@ -63,10 +63,10 @@ namespace AMDiS { ... @@ -63,10 +63,10 @@ namespace AMDiS { */ */ struct AtomicBoundary { struct AtomicBoundary { /// The rank's part of the boundary. /// The rank's part of the boundary. BoundaryObject rankObject; BoundaryObject rankObj; /// The object on the other side of the boundary. /// The object on the other side of the boundary. BoundaryObject neighbourObject; BoundaryObject neighObj; }; }; /** \brief /** \brief ... ...
 ... @@ -124,19 +124,19 @@ namespace AMDiS { ... @@ -124,19 +124,19 @@ namespace AMDiS { return false; return false; } } /// implements Element::isLine. Returns true because this element is a Line /// Returns true because this element is a Line. inline bool isLine() const inline bool isLine() const { { return true; return true; } } /// implements Element::isTriangle. Returns false because this element is a Line /// Returns false because this element is a Line. inline bool isTriangle() const inline bool isTriangle() const { { return false; return false; } } /// implements Element::isTetrahedron. Returns false because this element is a Line /// Returns false because this element is a Line inline bool isTetrahedron() const inline bool isTetrahedron() const { { return false; return false; ... @@ -147,6 +147,22 @@ namespace AMDiS { ... @@ -147,6 +147,22 @@ namespace AMDiS { return "Line"; return "Line"; } } void getVertexDofs(FiniteElemSpace* feSpace, int ithEdge, DofContainer& dofs, bool parentVertices = 0) const { FUNCNAME("Line::getVertexDofs()"); ERROR_EXIT("Not yet implemented!\n"); } void getNonVertexDofs(FiniteElemSpace* feSpace, int ithEdge, DofContainer& dofs) const { FUNCNAME("Line::getNonVertexDofs()"); ERROR_EXIT("Not yet implemented!\n"); } protected: protected: /** \brief /** \brief * vertexOfEdge[i][j] is the local number of the j-th vertex of the i-th * vertexOfEdge[i][j] is the local number of the j-th vertex of the i-th ... ...