Commit 3f1c87ca authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Added some new debug functions.

parent 147d0144
...@@ -136,6 +136,24 @@ namespace AMDiS { ...@@ -136,6 +136,24 @@ namespace AMDiS {
} }
void colorMeshByMacroIndex(Mesh *mesh, std::string filename)
{
FUNCNAME("debug::colorMeshByMacroIndex()");
std::map<int, double> vec;
TraverseStack stack;
ElInfo *elInfo = stack.traverseFirst(mesh, -1, Mesh::CALL_LEAF_EL);
while (elInfo) {
int index = elInfo->getElement()->getIndex();
vec[index] = elInfo->getMacroElement()->getIndex();
elInfo = stack.traverseNext(elInfo);
}
ElementFileWriter::writeFile(vec, mesh, filename);
}
void colorDofVectorByLocalElementDofs(DOFVector<double>& vec, Element *el) void colorDofVectorByLocalElementDofs(DOFVector<double>& vec, Element *el)
{ {
// === Get local indices of the given element. === // === Get local indices of the given element. ===
......
...@@ -84,6 +84,8 @@ namespace AMDiS { ...@@ -84,6 +84,8 @@ namespace AMDiS {
void highlightElementIndexMesh(Mesh *mesh, int idx, std::string filename); void highlightElementIndexMesh(Mesh *mesh, int idx, std::string filename);
void colorMeshByMacroIndex(Mesh *mesh, std::string filename);
void colorDofVectorByLocalElementDofs(DOFVector<double>& vec, Element *el); void colorDofVectorByLocalElementDofs(DOFVector<double>& vec, Element *el);
bool colorDofVectorByLocalElementDofs(DOFVector<double>& vec, bool colorDofVectorByLocalElementDofs(DOFVector<double>& vec,
......
...@@ -72,6 +72,8 @@ namespace AMDiS { ...@@ -72,6 +72,8 @@ namespace AMDiS {
void Marker::markElement(AdaptInfo *adaptInfo, ElInfo *elInfo) void Marker::markElement(AdaptInfo *adaptInfo, ElInfo *elInfo)
{ {
FUNCNAME("Marker::markElement()");
Element *el = elInfo->getElement(); Element *el = elInfo->getElement();
double lError = el->getEstimation(row); double lError = el->getEstimation(row);
......
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