Reset Non-Linear Iteration Count Before 'beginTimeStep'

While here, also fix a couple of misprints in a nearby comment.
This commit is contained in:
Bård Skaflestad 2021-01-29 12:30:34 +01:00
parent 1af403c45d
commit 76c59978b6

View File

@ -238,16 +238,16 @@ namespace Opm {
ebosSimulator_.model().advanceTimeLevel();
}
// set the timestep size and episode index for ebos explicitly. ebos needs to
// know the report step/episode index because of timing dependend data
// despide the fact that flow uses its own time stepper. (The length of the
// episode does not matter, though.)
// Set the timestep size, episode index, and non-linear iteration index
// for ebos explicitly. ebos needs to know the report step/episode index
// because of timing dependent data despite the fact that flow uses its
// own time stepper. (The length of the episode does not matter, though.)
ebosSimulator_.setTime(timer.simulationTimeElapsed());
ebosSimulator_.setTimeStepSize(timer.currentStepLength());
ebosSimulator_.problem().beginTimeStep();
// we also need to reset the iteration count
ebosSimulator_.model().newtonMethod().setIterationIndex(0);
ebosSimulator_.problem().beginTimeStep();
unsigned numDof = ebosSimulator_.model().numGridDof();
wasSwitched_.resize(numDof);
std::fill(wasSwitched_.begin(), wasSwitched_.end(), false);