Merge pull request #1341 from totto82/fixTUNING

Only update TUNING after event
This commit is contained in:
Atgeirr Flø Rasmussen
2017-11-24 13:15:40 +01:00
committed by GitHub

View File

@@ -255,7 +255,9 @@ public:
// \Note: The sub stepping will require a copy of the state variables
if( adaptiveTimeStepping ) {
if (param_.getDefault("use_TUNING", false)) {
adaptiveTimeStepping->updateTUNING(schedule().getTuning(), timer.currentStepNum());
if(events.hasEvent(ScheduleEvents::TUNING_CHANGE,timer.currentStepNum())) {
adaptiveTimeStepping->updateTUNING(schedule().getTuning(), timer.currentStepNum());
}
}
bool event = events.hasEvent(ScheduleEvents::NEW_WELL, timer.currentStepNum()) ||