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
commit aab41f3df2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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