Update collection of wells after ACTIONX

This commit is contained in:
Joakim Hove
2021-03-25 14:46:35 +01:00
parent 5fe43c09cb
commit 98f6a9a7ac
5 changed files with 29 additions and 24 deletions

View File

@@ -1393,14 +1393,10 @@ public:
const auto& wellpi = this->fetchWellPI(reportStep, *action, schedule, matching_wells);
schedule.applyAction(reportStep, Opm::TimeService::from_time_t(simTime), *action, actionResult, wellpi);
auto affected_wells = schedule.applyAction(reportStep, Opm::TimeService::from_time_t(simTime), *action, actionResult, wellpi);
actionState.add_run(*action, simTime);
this->wellModel_.updateEclWells(reportStep, affected_wells);
for ( const auto& [wname, _] : wellpi) {
(void)_;
if (this->wellModel_.hasWell(wname))
this->wellModel_.updateEclWell(reportStep, wname);
}
} else {
std::string msg = "The action: " + action->name() + " evaluated to false at " + ts;
Opm::OpmLog::info(msg);