mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #4143 from totto82/simplifyWellReport
only output final change of well control
This commit is contained in:
commit
a35f365e3e
@ -440,19 +440,19 @@ void WellInterfaceGeneric::reportWellSwitching(const SingleWellState& ws, Deferr
|
|||||||
if (well_control_log_.empty())
|
if (well_control_log_.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::string msg = " Well " + name()
|
std::string from = well_control_log_[0];
|
||||||
+ " control mode changed from ";
|
|
||||||
for (const std::string& from : well_control_log_) {
|
|
||||||
msg += from + "->";
|
|
||||||
}
|
|
||||||
std::string to;
|
std::string to;
|
||||||
if (isInjector()) {
|
if (isInjector()) {
|
||||||
to = Well::InjectorCMode2String(ws.injection_cmode);
|
to = Well::InjectorCMode2String(ws.injection_cmode);
|
||||||
} else {
|
} else {
|
||||||
to = Well::ProducerCMode2String(ws.production_cmode);
|
to = Well::ProducerCMode2String(ws.production_cmode);
|
||||||
}
|
}
|
||||||
msg += to;
|
// only report the final switching
|
||||||
deferred_logger.info(msg);
|
if (from != to) {
|
||||||
|
std::string msg = " Well " + name()
|
||||||
|
+ " control mode changed from " + from + " to " + to;
|
||||||
|
deferred_logger.info(msg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<double>
|
std::optional<double>
|
||||||
|
Loading…
Reference in New Issue
Block a user