Use advanceTimeLevel() and updatedFailed() methods from model

This commit is contained in:
Tor Harald Sandve 2018-03-06 13:18:03 +01:00
parent 5f33a1a1bc
commit 0c4ae5991f

View File

@ -174,16 +174,10 @@ namespace Opm {
{
// update the solution variables in ebos
// if the last time step failed we need to update the curent solution
// and recalculate the Intesive Quantities.
if ( timer.lastStepFailed() ) {
ebosSimulator_.model().solution( 0 /* timeIdx */ ) = ebosSimulator_.model().solution( 1 /* timeIdx */ );
ebosSimulator_.model().invalidateIntensiveQuantitiesCache(/*timeIdx=*/0);
ebosSimulator_.model().updateFailed();
} else {
// set the initial solution.
ebosSimulator_.model().solution( 1 /* timeIdx */ ) = ebosSimulator_.model().solution( 0 /* timeIdx */ );
ebosSimulator_.model().shiftIntensiveQuantityCache(/*numSlots=*/1);
ebosSimulator_.model().advanceTimeLevel();
}
// set the timestep size and index in ebos explicitly