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

Added some new debug functions.

parent 147d0144
......@@ -154,15 +154,15 @@ namespace AMDiS {
problemIteration->oneIteration(adaptInfo, NO_ADAPTION);
adaptInfo->incTimestepIteration();
if (!fixedTimestep &&
!adaptInfo->timeToleranceReached() &&
adaptInfo->getTimestepIteration() <= adaptInfo->getMaxTimestepIteration() &&
!(adaptInfo->getTimestep() <= adaptInfo->getMinTimestep())) {
adaptInfo->setTime(adaptInfo->getTime() - adaptInfo->getTimestep());
adaptInfo->setTimestep(adaptInfo->getTimestep() * timeDelta1);
continue;
adaptInfo->setTime(adaptInfo->getTime() - adaptInfo->getTimestep());
adaptInfo->setTimestep(adaptInfo->getTimestep() * timeDelta1);
continue;
}
......
......@@ -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)
{
// === Get local indices of the given element. ===
......
......@@ -84,6 +84,8 @@ namespace AMDiS {
void highlightElementIndexMesh(Mesh *mesh, int idx, std::string filename);
void colorMeshByMacroIndex(Mesh *mesh, std::string filename);
void colorDofVectorByLocalElementDofs(DOFVector<double>& vec, Element *el);
bool colorDofVectorByLocalElementDofs(DOFVector<double>& vec,
......
......@@ -72,6 +72,8 @@ namespace AMDiS {
void Marker::markElement(AdaptInfo *adaptInfo, ElInfo *elInfo)
{
FUNCNAME("Marker::markElement()");
Element *el = elInfo->getElement();
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