Add methods GasLiftOpt::has_well() and GasLiftOpt::has_group()
This commit is contained in:
parent
1d73d07f19
commit
19090c2827
@ -225,6 +225,8 @@ public:
|
||||
void add_group(const Group& group);
|
||||
void add_well(const Well& well);
|
||||
bool active() const;
|
||||
bool has_well(const std::string& well) const;
|
||||
bool has_group(const std::string& group) const;
|
||||
|
||||
static GasLiftOpt serializeObject();
|
||||
bool operator==(const GasLiftOpt& other) const;
|
||||
|
@ -63,6 +63,16 @@ const GasLiftOpt::Group& GasLiftOpt::group(const std::string& gname) const {
|
||||
return iter->second;
|
||||
}
|
||||
|
||||
bool GasLiftOpt::has_well(const std::string& wname) const {
|
||||
const auto iter = this->m_wells.find(wname);
|
||||
return (iter != this->m_wells.end());
|
||||
}
|
||||
|
||||
bool GasLiftOpt::has_group(const std::string& gname) const {
|
||||
const auto iter = this->m_groups.find(gname);
|
||||
return (iter != this->m_groups.end());
|
||||
}
|
||||
|
||||
|
||||
void GasLiftOpt::add_group(const Group& group) {
|
||||
auto iter = this->m_groups.find(group.name());
|
||||
|
@ -3722,6 +3722,8 @@ WLIFTOPT
|
||||
const auto& plat_group = glo.group("PLAT-A");
|
||||
BOOST_CHECK_EQUAL( *plat_group.max_lift_gas(), siFactorG * 200000);
|
||||
BOOST_CHECK(!plat_group.max_total_gas().has_value());
|
||||
BOOST_CHECK(glo.has_group("PLAT-A"));
|
||||
BOOST_CHECK(!glo.has_well("NO-GROUP"));
|
||||
|
||||
|
||||
const auto& w1 = glo.well("B-1H");
|
||||
@ -3739,6 +3741,8 @@ WLIFTOPT
|
||||
BOOST_CHECK_EQUAL(w3.min_rate(), -1.00 * siFactorG);
|
||||
BOOST_CHECK_EQUAL(w3.inc_weight_factor(), 1.00);
|
||||
BOOST_CHECK(w3.alloc_extra_gas());
|
||||
BOOST_CHECK(glo.has_well("C-1H"));
|
||||
BOOST_CHECK(!glo.has_well("NO-WELL"));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(WellPI) {
|
||||
|
Loading…
Reference in New Issue
Block a user