Use SingleWellState for production and injection control

This commit is contained in:
Joakim Hove
2021-08-04 12:03:36 +02:00
parent c381459804
commit 581f571c9d
14 changed files with 69 additions and 75 deletions

View File

@@ -202,9 +202,9 @@ checkDoGasLiftOptimization_(const std::string &well_name)
if (itr != this->ecl_wells_.end()) {
//const Well *well = (itr->second).first;
//assert(well); // Should never be nullptr
const int index = (itr->second).second;
const Well::ProducerCMode& control_mode
= this->well_state_.currentProductionControl(index);
const int well_index = (itr->second).second;
const auto& ws = this->well_state_.well(well_index);
const Well::ProducerCMode& control_mode = ws.production_cmode;
if (control_mode != Well::ProducerCMode::THP ) {
displayDebugMessage_("Not THP control. Skipping.", well_name);
return false;