From 2d2f9285c5f7b26f26aef09f1b2b29096c14d1c5 Mon Sep 17 00:00:00 2001 From: Tor Harald Sandve Date: Tue, 28 Nov 2017 14:25:25 +0100 Subject: [PATCH] Only read use_TUNING param once. Just to clean up the .DEBUG file. --- opm/autodiff/SimulatorFullyImplicitBlackoilEbos.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opm/autodiff/SimulatorFullyImplicitBlackoilEbos.hpp b/opm/autodiff/SimulatorFullyImplicitBlackoilEbos.hpp index 696e78af0..4928d6f6c 100644 --- a/opm/autodiff/SimulatorFullyImplicitBlackoilEbos.hpp +++ b/opm/autodiff/SimulatorFullyImplicitBlackoilEbos.hpp @@ -168,10 +168,10 @@ public: // adaptive time stepping const auto& events = schedule().getEvents(); std::unique_ptr< AdaptiveTimeStepping > adaptiveTimeStepping; + const bool useTUNING = param_.getDefault("use_TUNING", false); if( param_.getDefault("timestep.adaptive", true ) ) { - - if (param_.getDefault("use_TUNING", false)) { + if (useTUNING) { adaptiveTimeStepping.reset( new AdaptiveTimeStepping( schedule().getTuning(), timer.currentStepNum(), param_, terminal_output_ ) ); } else { adaptiveTimeStepping.reset( new AdaptiveTimeStepping( param_, terminal_output_ ) ); @@ -253,7 +253,7 @@ public: // \Note: The report steps are met in any case // \Note: The sub stepping will require a copy of the state variables if( adaptiveTimeStepping ) { - if (param_.getDefault("use_TUNING", false)) { + if (useTUNING) { if(events.hasEvent(ScheduleEvents::TUNING_CHANGE,timer.currentStepNum())) { adaptiveTimeStepping->updateTUNING(schedule().getTuning(), timer.currentStepNum()); }