From bef33ed00ca51a226d11e77e13ba19dbd4fc7bcb Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Wed, 28 Sep 2016 09:23:04 +0200 Subject: [PATCH] Add an option for using values from TUNING in the timestepping. if the paramter use_TUNING is set to true, the adaptive timestepper will initalize with relevant values from the TUNING keywords. --- opm/autodiff/SimulatorBase_impl.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opm/autodiff/SimulatorBase_impl.hpp b/opm/autodiff/SimulatorBase_impl.hpp index 1a3ebbef2..74d0da2f5 100644 --- a/opm/autodiff/SimulatorBase_impl.hpp +++ b/opm/autodiff/SimulatorBase_impl.hpp @@ -111,7 +111,12 @@ namespace Opm std::unique_ptr< AdaptiveTimeStepping > adaptiveTimeStepping; if( param_.getDefault("timestep.adaptive", true ) ) { - adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) ); + + if (param_.getDefault("use_TUNING", false)) { + adaptiveTimeStepping.reset( new AdaptiveTimeStepping( *schedule->getTuning(), timer.currentStepNum(), param_, terminal_output_ ) ); + } else { + adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) ); + } } std::string restorefilename = param_.getDefault("restorefile", std::string("") );