From fe788cdb0501b9dab87f2fd9bfccf444a5627456 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Wed, 6 Jan 2021 16:14:15 +0100 Subject: [PATCH] Access tuning class from ScheduleState --- ebos/eclproblem.hh | 4 ++-- opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 936273836..882d6e0d7 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -876,7 +876,7 @@ public: if (enableTuning_) { // if support for the TUNING keyword is enabled, we get the initial time // steping parameters from it instead of from command line parameters - const auto& tuning = schedule.getTuning(0); + const auto& tuning = schedule[0].tuning(); initialTimeStepSize_ = tuning.TSINIT; maxTimeStepAfterWellEvent_ = tuning.TMAXWC; maxTimeStepSize_ = tuning.TSMAXZ; @@ -1060,7 +1060,7 @@ public: bool tuningEvent = false; if (episodeIdx > 0 && enableTuning_ && events.hasEvent(Opm::ScheduleEvents::TUNING_CHANGE, episodeIdx)) { - const auto& tuning = schedule.getTuning(episodeIdx); + const auto& tuning = schedule[episodeIdx].tuning(); initialTimeStepSize_ = tuning.TSINIT; maxTimeStepAfterWellEvent_ = tuning.TMAXWC; maxTimeStepSize_ = tuning.TSMAXZ; diff --git a/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp b/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp index 9ab8394a9..9ca5d3d1c 100644 --- a/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp +++ b/opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp @@ -166,8 +166,7 @@ public: bool enableTUNING = EWOMS_GET_PARAM(TypeTag, bool, EnableTuning); if (enableAdaptive) { if (enableTUNING) { - adaptiveTimeStepping_ = std::make_unique( - schedule().getTuning(timer.currentStepNum()), terminalOutput_); + adaptiveTimeStepping_ = std::make_unique(schedule()[timer.currentStepNum()].tuning(), terminalOutput_); } else { adaptiveTimeStepping_ = std::make_unique(terminalOutput_); @@ -247,7 +246,7 @@ public: if (adaptiveTimeStepping_) { if (enableTUNING) { if (events.hasEvent(ScheduleEvents::TUNING_CHANGE,timer.currentStepNum())) { - adaptiveTimeStepping_->updateTUNING(schedule().getTuning(timer.currentStepNum())); + adaptiveTimeStepping_->updateTUNING(schedule()[timer.currentStepNum()].tuning()); } }