Commit 26882a5f authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

* Bug fix in AdaptInstationary

* Added some headers to AMDiS.h
parent e8cf640e
......@@ -94,6 +94,7 @@
#include "Traverse.h"
#include "Triangle.h"
#include "ValueWriter.h"
#include "VtkWriter.h"
#include "demangle.h"
#include "parareal/ProblemBase.h"
#include "parareal/AdaptParaReal.h"
......
......@@ -113,37 +113,49 @@ namespace AMDiS {
adaptInfo_->incTimestepIteration();
if (!fixedTimestep_ &&
!adaptInfo_->timeToleranceReached() &&
!adaptInfo_->getTimestep() <= adaptInfo_->getMinTimestep())
{
adaptInfo_->setTime(adaptInfo_->getTime() - adaptInfo_->getTimestep());
adaptInfo_->setTimestep(adaptInfo_->getTimestep() * time_delta_1);
continue;
}
!adaptInfo_->timeToleranceReached() &&
!adaptInfo_->getTimestep() <= adaptInfo_->getMinTimestep()) {
adaptInfo_->setTime(adaptInfo_->getTime() - adaptInfo_->getTimestep());
adaptInfo_->setTimestep(adaptInfo_->getTimestep() * time_delta_1);
continue;
}
adaptInfo_->setSpaceIteration(0);
/* === Do only space iterations only if the maximum is higher than 0. === */
if (adaptInfo_->getMaxSpaceIteration() > 0) {
do {
problemIteration_->beginIteration(adaptInfo_);
if (problemIteration_->oneIteration(adaptInfo_, FULL_ITERATION)) {
if (!fixedTimestep_ &&
!adaptInfo_->timeToleranceReached() &&
!adaptInfo_->getTimestep() <= adaptInfo_->getMinTimestep())
{
adaptInfo_->setTime(adaptInfo_->getTime() - adaptInfo_->getTimestep());
adaptInfo_->setTimestep(adaptInfo_->getTimestep() * time_delta_1);
problemIteration_->endIteration(adaptInfo_);
adaptInfo_->incSpaceIteration();
break;
}
}
/* === Space iterations === */
do {
problemIteration_->beginIteration(adaptInfo_);
if (problemIteration_->oneIteration(adaptInfo_, FULL_ITERATION)) {
if (!fixedTimestep_ &&
!adaptInfo_->timeToleranceReached() &&
!adaptInfo_->getTimestep() <= adaptInfo_->getMinTimestep())
{
adaptInfo_->setTime(adaptInfo_->getTime() - adaptInfo_->getTimestep());
adaptInfo_->setTimestep(adaptInfo_->getTimestep() * time_delta_1);
problemIteration_->endIteration(adaptInfo_);
adaptInfo_->incSpaceIteration();
break;
}
}
adaptInfo_->incSpaceIteration();
problemIteration_->endIteration(adaptInfo_);
} while(!adaptInfo_->spaceToleranceReached() &&
adaptInfo_->getSpaceIteration() <= adaptInfo_->getMaxSpaceIteration());
adaptInfo_->incSpaceIteration();
} else {
problemIteration_->endIteration(adaptInfo_);
}
} while(!adaptInfo_->spaceToleranceReached() &&
adaptInfo_->getSpaceIteration() <= adaptInfo_->getMaxSpaceIteration());
} while(!adaptInfo_->timeToleranceReached() &&
!adaptInfo_->getTimestep() <= adaptInfo_->getMinTimestep() &&
adaptInfo_->getTimestepIteration() <= adaptInfo_->getMaxTimestepIteration());
......
......@@ -869,10 +869,11 @@ namespace AMDiS {
ElInfo* TraverseStack::traverseNeighbour2d(ElInfo* elinfo_old, int neighbour)
{
FUNCNAME("TraverseStack::traverseNeighbour2d");
Triangle *el, *el2, *sav_el;
FUNCNAME("TraverseStack::traverseNeighbour2d()");
Triangle *el, *el2, *sav_el;
ElInfo *old_elinfo, *elinfo, *elinfo2;
int i, nb, opp_vertex, stack2_used;
int i, nb, opp_vertex, stack2_used;
static int coarse_nb[3][3] = {{-2,-2,-2}, {2,-1,1}, {-1,2,0}};
/* father.neigh[coarse_nb[i][j]] == child[i-1].neigh[j] */
......
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