removing the vfp_table member from Group class

after GRUPNET is processed, vfp_table is not useful for GROUP class
anymore.
This commit is contained in:
Kai Bao 2023-08-25 00:11:31 +02:00
parent b4c30cf93b
commit 0c64a142c1
3 changed files with 1 additions and 25 deletions

View File

@ -278,9 +278,7 @@ struct ProductionControls {
std::size_t insert_index() const; std::size_t insert_index() const;
const std::string& name() const; const std::string& name() const;
bool is_field() const; bool is_field() const;
int getGroupNetVFPTable() const;
bool updateNetVFPTable(int vfp_arg);
bool update_gefac(double gefac, bool transfer_gefac); bool update_gefac(double gefac, bool transfer_gefac);
// [[deprecated("use Group::control_group() or Group::flow_group()")]] // [[deprecated("use Group::control_group() or Group::flow_group()")]]
@ -342,7 +340,6 @@ struct ProductionControls {
serializer(group_type); serializer(group_type);
serializer(gefac); serializer(gefac);
serializer(transfer_gefac); serializer(transfer_gefac);
serializer(vfp_table);
serializer(parent_group); serializer(parent_group);
serializer(m_wells); serializer(m_wells);
serializer(m_groups); serializer(m_groups);
@ -363,7 +360,6 @@ private:
GroupType group_type; GroupType group_type;
double gefac; double gefac;
bool transfer_gefac; bool transfer_gefac;
int vfp_table;
std::string parent_group; std::string parent_group;
IOrderSet<std::string> m_wells; IOrderSet<std::string> m_wells;

View File

@ -8,18 +8,13 @@ namespace {
const std::vector<std::string> wellnames( const Group& g ) { const std::vector<std::string> wellnames( const Group& g ) {
return g.wells( ); return g.wells( );
} }
int get_vfp_table_nr( const Group& g ) {
return g.getGroupNetVFPTable();
}
} }
void python::common::export_Group(py::module& module) { void python::common::export_Group(py::module& module) {
py::class_< Group >( module, "Group") py::class_< Group >( module, "Group")
.def_property_readonly( "name", &Group::name) .def_property_readonly( "name", &Group::name)
.def_property_readonly( "num_wells", &Group::numWells) .def_property_readonly( "num_wells", &Group::numWells)
.def( "_vfp_table_nr", &get_vfp_table_nr )
.def_property_readonly( "well_names", &wellnames ); .def_property_readonly( "well_names", &wellnames );
} }

View File

@ -207,7 +207,6 @@ Group::Group(const std::string& name, std::size_t insert_index_arg, double udq_u
group_type(GroupType::NONE), group_type(GroupType::NONE),
gefac(1), gefac(1),
transfer_gefac(true), transfer_gefac(true),
vfp_table(0),
production_properties(unit_system, name) production_properties(unit_system, name)
{ {
// All groups are initially created as children of the "FIELD" group. // All groups are initially created as children of the "FIELD" group.
@ -248,7 +247,6 @@ Group Group::serializationTestObject()
result.group_type = GroupType::PRODUCTION; result.group_type = GroupType::PRODUCTION;
result.gefac = 4.0; result.gefac = 4.0;
result.transfer_gefac = true; result.transfer_gefac = true;
result.vfp_table = 5;
result.parent_group = "test2"; result.parent_group = "test2";
result.m_wells = {{"test3", "test4"}, {"test5", "test6"}}; result.m_wells = {{"test3", "test4"}, {"test5", "test6"}};
result.m_groups = {{"test7", "test8"}, {"test9", "test10"}}; result.m_groups = {{"test7", "test8"}, {"test9", "test10"}};
@ -284,18 +282,6 @@ const Group::GroupInjectionProperties& Group::injectionProperties(Phase phase) c
return this->injection_properties.at(phase); return this->injection_properties.at(phase);
} }
int Group::getGroupNetVFPTable() const {
return this->vfp_table;
}
bool Group::updateNetVFPTable(int vfp_arg) {
if (this->vfp_table != vfp_arg) {
this->vfp_table = vfp_arg;
return true;
} else
return false;
}
namespace { namespace {
namespace detail { namespace detail {
@ -1209,7 +1195,6 @@ bool Group::operator==(const Group& data) const
this->group_type == data.group_type && this->group_type == data.group_type &&
this->getGroupEfficiencyFactor() == data.getGroupEfficiencyFactor() && this->getGroupEfficiencyFactor() == data.getGroupEfficiencyFactor() &&
this->getTransferGroupEfficiencyFactor() == data.getTransferGroupEfficiencyFactor() && this->getTransferGroupEfficiencyFactor() == data.getTransferGroupEfficiencyFactor() &&
this->getGroupNetVFPTable() == data.getGroupNetVFPTable() &&
this->parent() == data.parent() && this->parent() == data.parent() &&
this->m_wells == data.m_wells && this->m_wells == data.m_wells &&
this->m_groups == data.m_groups && this->m_groups == data.m_groups &&