Skip to content
Snippets Groups Projects
Commit ea8f2a81 authored by Backofen, Rainer's avatar Backofen, Rainer
Browse files

included new variable <lastProcessedTimestep> in AdaptInfo, in order to have...

included new variable <lastProcessedTimestep> in AdaptInfo, in order to have the timestep which lead to current time in user program
parent d1ff5073
No related branches found
No related tags found
No related merge requests found
......@@ -135,6 +135,7 @@ namespace AMDiS {
startTime(0.0),
endTime(1.0),
timestep(0.0),
lastProcessedTimestep(0.0),
minTimestep(0.0),
maxTimestep(1.0),
timestepNumber(0),
......@@ -189,6 +190,7 @@ namespace AMDiS {
solverResidual = 0.0;
GET_PARAMETER(0, name + "->timestep", "%f", &timestep);
lastProcessedTimestep=timestep;
}
/// Returns whether space tolerance is reached.
......@@ -478,6 +480,19 @@ namespace AMDiS {
return timestep;
}
/// Gets \ref timestep
inline double getTimestep()
{
return timestep;
}
inline void setLastProcessedTimestep(double t){
lastProcessedTimestep=t;
}
inline double getLastProcessedTimestep(){
return lastProcessedTimestep;
}
/** \brief
* Returns true, if the end time is reached and no more timestep
......@@ -491,11 +506,6 @@ namespace AMDiS {
return !(time < endTime - DBL_TOL);
}
/// Gets \ref timestep
inline double getTimestep()
{
return timestep;
}
/// Sets \ref minTimestep
inline void setMinTimestep(double t)
......@@ -705,9 +715,12 @@ namespace AMDiS {
/// Final time
double endTime;
/// Current time step size
///Time step size to be used
double timestep;
/// Last processed time step size of finished iteration
double lastProcessedTimestep;
/// Minimal step size
double minTimestep;
......
......@@ -121,6 +121,7 @@ namespace AMDiS {
problemIteration_->beginIteration(adaptInfo);
problemIteration_->oneIteration(adaptInfo, FULL_ITERATION);
problemIteration_->endIteration(adaptInfo);
adaptInfo->setLastProcessedTimestep(adaptInfo->getTimestep());
}
void AdaptInstationary::implicitTimeStrategy()
......@@ -184,7 +185,7 @@ namespace AMDiS {
} while(!adaptInfo->timeToleranceReached() &&
!(adaptInfo->getTimestep() <= adaptInfo->getMinTimestep()) &&
adaptInfo->getTimestepIteration() <= adaptInfo->getMaxTimestepIteration());
adaptInfo->setLastProcessedTimestep(adaptInfo->getTimestep());
if (!fixedTimestep_ && adaptInfo->timeErrorLow()) {
adaptInfo->setTimestep(adaptInfo->getTimestep() * time_delta_2);
if (dbgMode) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment