adjust to upstream enum changes

This commit is contained in:
Arne Morten Kvarving 2023-01-18 09:58:57 +01:00
parent 6d97ca97a1
commit 7b2b18045e
4 changed files with 11 additions and 11 deletions

View File

@ -455,7 +455,7 @@ GasLiftSingleWellGeneric::debugShowProducerControlMode() const
{
const int well_index = this->well_state_.index(this->well_name_).value();
const Well::ProducerCMode& control_mode = this->well_state_.well(well_index).production_cmode;
const std::string msg = fmt::format("Current control mode is: {}", Well::ProducerCMode2String(control_mode));
const std::string msg = fmt::format("Current control mode is: {}", WellProducerCMode2String(control_mode));
displayDebugMessage_(msg);
}

View File

@ -150,7 +150,7 @@ activeInjectionConstraint(const SingleWellState& ws,
"The THP limit is violated for injector " +
well_.name() +
". But the rate will increase if switched to THP. " +
"The well is therefore kept at " + Well::InjectorCMode2String(currentControl));
"The well is therefore kept at " + WellInjectorCMode2String(currentControl));
}
}
}
@ -274,7 +274,7 @@ activeProductionConstraint(const SingleWellState& ws,
"The THP limit is violated for producer " +
well_.name() +
". But the rate will increase if switched to THP. " +
"The well is therefore kept at " + Well::ProducerCMode2String(currentControl));
"The well is therefore kept at " + WellProducerCMode2String(currentControl));
}
}
}

View File

@ -419,9 +419,9 @@ void WellInterfaceGeneric::reportWellSwitching(const SingleWellState& ws, Deferr
std::string from = well_control_log_[0];
std::string to;
if (isInjector()) {
to = Well::InjectorCMode2String(ws.injection_cmode);
to = WellInjectorCMode2String(ws.injection_cmode);
} else {
to = Well::ProducerCMode2String(ws.production_cmode);
to = WellProducerCMode2String(ws.production_cmode);
}
// only report the final switching
if (from != to) {

View File

@ -193,9 +193,9 @@ namespace Opm
auto& ws = well_state.well(this->index_of_well_);
std::string from;
if (well.isInjector()) {
from = Well::InjectorCMode2String(ws.injection_cmode);
from = WellInjectorCMode2String(ws.injection_cmode);
} else {
from = Well::ProducerCMode2String(ws.production_cmode);
from = WellProducerCMode2String(ws.production_cmode);
}
bool oscillating = std::count(this->well_control_log_.begin(), this->well_control_log_.end(), from) >= param_.max_number_of_well_switches_;
@ -229,9 +229,9 @@ namespace Opm
if (changed) {
std::string to;
if (well.isInjector()) {
to = Well::InjectorCMode2String(ws.injection_cmode);
to = WellInjectorCMode2String(ws.injection_cmode);
} else {
to = Well::ProducerCMode2String(ws.production_cmode);
to = WellProducerCMode2String(ws.production_cmode);
}
std::ostringstream ss;
ss << " Switching control mode for well " << this->name()
@ -427,13 +427,13 @@ namespace Opm
thp_control = ws.injection_cmode == Well::InjectorCMode::THP;
if (thp_control) {
ws.injection_cmode = Well::InjectorCMode::BHP;
this->well_control_log_.push_back(Well::InjectorCMode2String(Well::InjectorCMode::THP));
this->well_control_log_.push_back(WellInjectorCMode2String(Well::InjectorCMode::THP));
}
} else {
thp_control = ws.production_cmode == Well::ProducerCMode::THP;
if (thp_control) {
ws.production_cmode = Well::ProducerCMode::BHP;
this->well_control_log_.push_back(Well::ProducerCMode2String(Well::ProducerCMode::THP));
this->well_control_log_.push_back(WellProducerCMode2String(Well::ProducerCMode::THP));
}
}
if (thp_control) {