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

adaption loop symmetrized w.r.t. increase and decrease of timestep

parent 95bf8af2
No related branches found
No related tags found
No related merge requests found
......@@ -250,7 +250,8 @@ namespace AMDiS {
{
for (unsigned int i = 0; i < scalContents.size(); i++)
std::cout << " Time error estimate = " << scalContents[i]->est_t_sum
<< " Time error bound = " << scalContents[i]->timeErrLow << "\n";
<< " Time error low bound = " << scalContents[i]->timeErrLow
<< " Time error high bound = " << scalContents[i]->timeTolerance << "\n";
}
/// Returns \ref spaceIteration.
......
......@@ -186,6 +186,10 @@ namespace AMDiS {
!(adaptInfo->getTimestep() <= adaptInfo->getMinTimestep()) &&
adaptInfo->getTimestepIteration() <= adaptInfo->getMaxTimestepIteration());
adaptInfo->setLastProcessedTimestep(adaptInfo->getTimestep());
// After successful iteration/timestep the timestep will be changed according
// adaption rules for next timestep.
// First, check for increase of timestep
if (!fixedTimestep_ && adaptInfo->timeErrorLow()) {
adaptInfo->setTimestep(adaptInfo->getTimestep() * time_delta_2);
if (dbgMode) {
......@@ -201,6 +205,12 @@ namespace AMDiS {
adaptInfo->printTimeErrorLowInfo();
}
}
// Second, check for decrease of timestep
if (!fixedTimestep_ &&
!adaptInfo->timeToleranceReached() &&
!(adaptInfo->getTimestep() <= adaptInfo->getMinTimestep())) {
adaptInfo->setTimestep(adaptInfo->getTimestep() * time_delta_1);
}
}
void AdaptInstationary::oneTimestep()
......
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