diff --git a/AMDiS/src/AdaptInstationary.cc b/AMDiS/src/AdaptInstationary.cc index 8f20a949325e567a35583320c62e634c68351817..786e24684251847ad9c93649ef67392261385b39 100644 --- a/AMDiS/src/AdaptInstationary.cc +++ b/AMDiS/src/AdaptInstationary.cc @@ -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; } diff --git a/AMDiS/src/Debug.cc b/AMDiS/src/Debug.cc index 23d3cc3d4862e554453d21a50f1ecc80a4737ed6..ca4f4ff1664b4af6b487ae771d92997f3e14ad3b 100644 --- a/AMDiS/src/Debug.cc +++ b/AMDiS/src/Debug.cc @@ -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. === diff --git a/AMDiS/src/Debug.h b/AMDiS/src/Debug.h index bdabf133b53fcbfdf3fc8dae6a183410f205695f..3467f9b7716e4cbd2ed92a6601109b0350af5cdc 100644 --- a/AMDiS/src/Debug.h +++ b/AMDiS/src/Debug.h @@ -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, diff --git a/AMDiS/src/Marker.cc b/AMDiS/src/Marker.cc index eedc48e3088beced529eadc99ddd6557469d13f1..c918438f84c677b50ad1b667e1fa209fb5e76834 100644 --- a/AMDiS/src/Marker.cc +++ b/AMDiS/src/Marker.cc @@ -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);