From 9b0be0f8ad0636adc66fec47e17ab95f819b48b2 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Tue, 7 May 2019 11:29:31 +0200 Subject: [PATCH] flow: provide the correct episode size --- ebos/eclproblem.hh | 2 ++ opm/autodiff/SimulatorFullyImplicitBlackoilEbos.hpp | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 4aea50fdc..76cae800e 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -984,6 +984,8 @@ public: */ void writeOutput(bool isSubStep, bool verbose = true) { + assert(!this->simulator().episodeWillBeOver() == isSubStep); + // use the generic code to prepare the output fields and to // write the desired VTK files. ParentType::writeOutput(isSubStep, verbose); diff --git a/opm/autodiff/SimulatorFullyImplicitBlackoilEbos.hpp b/opm/autodiff/SimulatorFullyImplicitBlackoilEbos.hpp index 237dbef2a..be03cc2fa 100644 --- a/opm/autodiff/SimulatorFullyImplicitBlackoilEbos.hpp +++ b/opm/autodiff/SimulatorFullyImplicitBlackoilEbos.hpp @@ -232,13 +232,14 @@ public: report.output_write_time += perfTimer.stop(); } - ebosSimulator_.setEpisodeIndex(timer.currentStepNum()); - // Run a multiple steps of the solver depending on the time step control. solverTimer.start(); auto solver = createSolver(wellModel_()); + ebosSimulator_.startNextEpisode(ebosSimulator_.startTime() + schedule().getTimeMap().getTimePassedUntil(timer.currentStepNum()), + timer.currentStepLength()); + ebosSimulator_.setEpisodeIndex(timer.currentStepNum()); solver->model().beginReportStep(firstRestartStep); firstRestartStep = false;