ebos: allow initial time step sizes shorter than the initial episode size

This commit is contained in:
Andreas Lauser 2015-08-27 11:51:48 +02:00
parent 53b48b2838
commit d82f5be347

View File

@ -344,9 +344,17 @@ public:
++ nextEpisodeIdx;
}
Scalar episodeLength = timeMap->getTimeStepLength(nextEpisodeIdx);
Scalar dt = episodeLength;
if (nextEpisodeIdx == 0) {
// allow the size of the initial time step to be set via an external parameter
Scalar initialDt = EWOMS_GET_PARAM(TypeTag, Scalar, InitialTimeStepSize);
dt = std::min(dt, initialDt);
}
if (nextEpisodeIdx < numReportSteps) {
simulator.startNextEpisode(timeMap->getTimeStepLength(nextEpisodeIdx));
simulator.setTimeStepSize(timeMap->getTimeStepLength(nextEpisodeIdx));
simulator.startNextEpisode(episodeLength);
simulator.setTimeStepSize(dt);
}
// set up the wells