diff --git a/ebos/eclactionhandler.cc b/ebos/eclactionhandler.cc index cdb693473..bcbd6e0f4 100644 --- a/ebos/eclactionhandler.cc +++ b/ebos/eclactionhandler.cc @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -244,4 +245,12 @@ EclActionHandler::fetchWellPI(const int reportStep, return wellpi; } +void EclActionHandler::evalUDQAssignments(const unsigned episodeIdx, + UDQState& udq_state) +{ + const auto& udq = schedule_[episodeIdx].udq(); + const auto& well_matcher = schedule_.wellMatcher(episodeIdx); + udq.eval_assign(episodeIdx, well_matcher, summaryState_, udq_state); +} + } // namespace Opm diff --git a/ebos/eclactionhandler.hh b/ebos/eclactionhandler.hh index 06ff76a52..a758f9750 100644 --- a/ebos/eclactionhandler.hh +++ b/ebos/eclactionhandler.hh @@ -43,6 +43,7 @@ class EclipseState; class Schedule; struct SimulatorUpdate; class SummaryState; +class UDQState; //! \brief Class handling Action support in simulator class EclActionHandler @@ -62,6 +63,10 @@ public: double sim_time, const TransFunc& updateTrans); + //! \brief Evaluates UDQ assign statements. + void evalUDQAssignments(const unsigned episodeIdx, + UDQState& udq_state); + private: /* This function is run after applyAction has been completed in the Schedule diff --git a/ebos/eclgenericwriter.cc b/ebos/eclgenericwriter.cc index 0b31cab0a..cc1bc24e2 100644 --- a/ebos/eclgenericwriter.cc +++ b/ebos/eclgenericwriter.cc @@ -44,6 +44,7 @@ #include #include #include +#include #include #include diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index 00e414b6f..d4d99bd06 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -1027,11 +1027,7 @@ public: // 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); + actionHandler_.evalUDQAssignments(episodeIdx, simulator.vanguard().udqState()); } /*!