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.
This commit is contained in:
Tor Harald Sandve 2016-09-28 09:23:04 +02:00
parent 4a82ac386b
commit bef33ed00c

View File

@ -111,8 +111,13 @@ namespace Opm
std::unique_ptr< AdaptiveTimeStepping > adaptiveTimeStepping; std::unique_ptr< AdaptiveTimeStepping > adaptiveTimeStepping;
if( param_.getDefault("timestep.adaptive", true ) ) if( param_.getDefault("timestep.adaptive", true ) )
{ {
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_ ) ); adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) );
} }
}
std::string restorefilename = param_.getDefault("restorefile", std::string("") ); std::string restorefilename = param_.getDefault("restorefile", std::string("") );
if( ! restorefilename.empty() ) if( ! restorefilename.empty() )