Add methods WellState::size() and WellState::producer()

This commit is contained in:
Joakim Hove 2021-07-26 14:09:06 +02:00
parent a39fcc9708
commit e01910adc2

View File

@ -71,9 +71,14 @@ public:
const WellMapType& wellMap() const { return wellMap_; } const WellMapType& wellMap() const { return wellMap_; }
WellMapType& wellMap() { return wellMap_; } WellMapType& wellMap() { return wellMap_; }
std::size_t size() const {
return this->wellMap_.size();
}
int numWells() const int numWells() const
{ {
return wellMap_.size(); return this->size();
} }
int wellIndex(const std::string& wellName) const; int wellIndex(const std::string& wellName) const;
@ -343,6 +348,11 @@ public:
return this->status_.well_name(well_index); return this->status_.well_name(well_index);
} }
bool producer(std::size_t well_index) const {
return this->is_producer_[well_index];
}
private: private:
WellMapType wellMap_; WellMapType wellMap_;
// Use of std::optional<> here is a technical crutch, the // Use of std::optional<> here is a technical crutch, the