Only update TUNING when TUNING_CHANGE event

This commit is contained in:
Tor Harald Sandve 2017-11-23 13:19:54 +01:00
parent 796f6cd13c
commit ba358c0522

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()) ||