Add function GLiftOpt::num_wells()

This commit is contained in:
Joakim Hove 2021-10-28 10:38:12 +02:00
parent af8fc94188
commit 5e84c8d935
2 changed files with 5 additions and 0 deletions

View File

@ -267,6 +267,7 @@ public:
bool active() const;
bool has_well(const std::string& well) const;
bool has_group(const std::string& group) const;
std::size_t num_wells() const;
static GasLiftOpt serializeObject();
bool operator==(const GasLiftOpt& other) const;

View File

@ -72,6 +72,10 @@ bool GasLiftOpt::has_well(const std::string& wname) const {
return (iter != this->m_wells.end());
}
std::size_t GasLiftOpt::num_wells() const {
return this->m_wells.size();
}
bool GasLiftOpt::has_group(const std::string& gname) const {
const auto iter = this->m_groups.find(gname);
return (iter != this->m_groups.end());