Merge pull request #3038 from bska/reset-nonlinit-count

Reset Non-Linear Iteration Count Before 'beginTimeStep'
This commit is contained in:
Bård Skaflestad authored and GitHub committed 2021-02-01 14:33:50 +01:00
commit 609cf77663
1 file changed
+6 -6
+6 -6
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);