Commit 6058784f authored by Thomas Witkowski's avatar Thomas Witkowski

New debug functions.

parent 0f359786
...@@ -195,6 +195,21 @@ namespace AMDiS { ...@@ -195,6 +195,21 @@ namespace AMDiS {
} }
Element* getElement(Mesh *mesh, int elIndex)
{
TraverseStack stack;
ElInfo *elInfo = stack.traverseFirst(mesh, -1, Mesh::CALL_EVERY_EL_PREORDER);
while (elInfo) {
if (elInfo->getElement()->getIndex() == elIndex)
return elInfo->getElement();
elInfo = stack.traverseNext(elInfo);
}
return NULL;
}
Element* getParentElement(Mesh *mesh, int elIndex) Element* getParentElement(Mesh *mesh, int elIndex)
{ {
TraverseStack stack; TraverseStack stack;
......
...@@ -90,6 +90,8 @@ namespace AMDiS { ...@@ -90,6 +90,8 @@ namespace AMDiS {
Element* getParentElement(Mesh *mesh, int elIndex); Element* getParentElement(Mesh *mesh, int elIndex);
Element* getElement(Mesh *mesh, int elIndex);
void printElementInfo(Element *el); void printElementInfo(Element *el);
void printInfoByDof(FiniteElemSpace *feSpace, DegreeOfFreedom dof); void printInfoByDof(FiniteElemSpace *feSpace, DegreeOfFreedom dof);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment