mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Use advanceTimeLevel() and updatedFailed() methods from model
This commit is contained in:
parent
5f33a1a1bc
commit
0c4ae5991f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user