mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Add operator[] to WellState
This commit is contained in:
parent
ab63d14bcd
commit
129288b2bd
@ -237,20 +237,36 @@ public:
|
||||
return this->wells_.well_index(well_name);
|
||||
}
|
||||
|
||||
const SingleWellState& well(std::size_t well_index) const {
|
||||
const SingleWellState& operator[](std::size_t well_index) const {
|
||||
return this->wells_[well_index];
|
||||
}
|
||||
|
||||
const SingleWellState& operator[](const std::string& well_name) const {
|
||||
return this->wells_[well_name];
|
||||
}
|
||||
|
||||
SingleWellState& operator[](std::size_t well_index) {
|
||||
return this->wells_[well_index];
|
||||
}
|
||||
|
||||
SingleWellState& operator[](const std::string& well_name) {
|
||||
return this->wells_[well_name];
|
||||
}
|
||||
|
||||
const SingleWellState& well(std::size_t well_index) const {
|
||||
return this->operator[](well_index);
|
||||
}
|
||||
|
||||
const SingleWellState& well(const std::string& well_name) const {
|
||||
return this->wells_[well_name];
|
||||
return this->operator[](well_name);
|
||||
}
|
||||
|
||||
SingleWellState& well(std::size_t well_index) {
|
||||
return this->wells_[well_index];
|
||||
return this->operator[](well_index);
|
||||
}
|
||||
|
||||
SingleWellState& well(const std::string& well_name) {
|
||||
return this->wells_[well_name];
|
||||
return this->operator[](well_name);
|
||||
}
|
||||
|
||||
bool has(const std::string& well_name) const {
|
||||
|
Loading…
Reference in New Issue
Block a user