mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
WellState::well_rates is only updated by well owner
This commit is contained in:
parent
509fe67ff5
commit
dac62bbab3
@ -110,8 +110,10 @@ public:
|
||||
Well::ProducerCMode currentProductionControl(std::size_t well_index) const { return current_production_controls_[well_index]; }
|
||||
void currentProductionControl(std::size_t well_index, Well::ProducerCMode cmode) { current_production_controls_[well_index] = cmode; }
|
||||
|
||||
void setCurrentWellRates(const std::string& wellName, const std::vector<double>& rates ) {
|
||||
well_rates.at(wellName).second = rates;
|
||||
void setCurrentWellRates(const std::string& wellName, const std::vector<double>& new_rates ) {
|
||||
auto& [owner, rates] = this->well_rates.at(wellName);
|
||||
if (owner)
|
||||
rates = new_rates;
|
||||
}
|
||||
|
||||
const std::vector<double>& currentWellRates(const std::string& wellName) const;
|
||||
|
Loading…
Reference in New Issue
Block a user