Merge pull request #3513 from joakim-hove/eval-udq-assign

Eavluate all UDQ ASSIGN statements at the start of report step
This commit is contained in:
Joakim Hove 2021-09-14 20:06:28 +02:00 committed by GitHub
commit dfab5d2824
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1039,6 +1039,14 @@ public:
// if TUNING is enabled, also limit the time step size after a tuning event to TSINIT
dt = std::min(dt, this->initialTimeStepSize_);
simulator.setTimeStepSize(dt);
// Evaluate UDQ assign statements to make sure the settings are
// available as UDA controls for the current report step.
const auto& udq = schedule[episodeIdx].udq();
const auto& well_matcher = schedule.wellMatcher(episodeIdx);
auto& summary_state = simulator.vanguard().summaryState();
auto& udq_state = simulator.vanguard().udqState();
udq.eval_assign(episodeIdx, well_matcher, summary_state, udq_state);
}
/*!