From 0c64a142c1a55a83e4fbebd578c28cb14eb6c5a5 Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Fri, 25 Aug 2023 00:11:31 +0200 Subject: [PATCH] removing the vfp_table member from Group class after GRUPNET is processed, vfp_table is not useful for GROUP class anymore. --- opm/input/eclipse/Schedule/Group/Group.hpp | 4 ---- python/cxx/group.cpp | 7 +------ src/opm/input/eclipse/Schedule/Group/Group.cpp | 15 --------------- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/opm/input/eclipse/Schedule/Group/Group.hpp b/opm/input/eclipse/Schedule/Group/Group.hpp index ea62c14c6..942a21ac1 100644 --- a/opm/input/eclipse/Schedule/Group/Group.hpp +++ b/opm/input/eclipse/Schedule/Group/Group.hpp @@ -278,9 +278,7 @@ struct ProductionControls { std::size_t insert_index() const; const std::string& name() const; bool is_field() const; - int getGroupNetVFPTable() const; - bool updateNetVFPTable(int vfp_arg); bool update_gefac(double gefac, bool transfer_gefac); // [[deprecated("use Group::control_group() or Group::flow_group()")]] @@ -342,7 +340,6 @@ struct ProductionControls { serializer(group_type); serializer(gefac); serializer(transfer_gefac); - serializer(vfp_table); serializer(parent_group); serializer(m_wells); serializer(m_groups); @@ -363,7 +360,6 @@ private: GroupType group_type; double gefac; bool transfer_gefac; - int vfp_table; std::string parent_group; IOrderSet m_wells; diff --git a/python/cxx/group.cpp b/python/cxx/group.cpp index 3c24c260e..8e998c9e8 100644 --- a/python/cxx/group.cpp +++ b/python/cxx/group.cpp @@ -8,18 +8,13 @@ namespace { const std::vector wellnames( const Group& g ) { return g.wells( ); } - - int get_vfp_table_nr( const Group& g ) { - return g.getGroupNetVFPTable(); - } } void python::common::export_Group(py::module& module) { py::class_< Group >( module, "Group") .def_property_readonly( "name", &Group::name) - .def_property_readonly( "num_wells", &Group::numWells) - .def( "_vfp_table_nr", &get_vfp_table_nr ) + .def_property_readonly( "num_wells", &Group::numWells) .def_property_readonly( "well_names", &wellnames ); } diff --git a/src/opm/input/eclipse/Schedule/Group/Group.cpp b/src/opm/input/eclipse/Schedule/Group/Group.cpp index 99259e121..88292893f 100644 --- a/src/opm/input/eclipse/Schedule/Group/Group.cpp +++ b/src/opm/input/eclipse/Schedule/Group/Group.cpp @@ -207,7 +207,6 @@ Group::Group(const std::string& name, std::size_t insert_index_arg, double udq_u group_type(GroupType::NONE), gefac(1), transfer_gefac(true), - vfp_table(0), production_properties(unit_system, name) { // All groups are initially created as children of the "FIELD" group. @@ -248,7 +247,6 @@ Group Group::serializationTestObject() result.group_type = GroupType::PRODUCTION; result.gefac = 4.0; result.transfer_gefac = true; - result.vfp_table = 5; result.parent_group = "test2"; result.m_wells = {{"test3", "test4"}, {"test5", "test6"}}; 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); } -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 detail { @@ -1209,7 +1195,6 @@ bool Group::operator==(const Group& data) const this->group_type == data.group_type && this->getGroupEfficiencyFactor() == data.getGroupEfficiencyFactor() && this->getTransferGroupEfficiencyFactor() == data.getTransferGroupEfficiencyFactor() && - this->getGroupNetVFPTable() == data.getGroupNetVFPTable() && this->parent() == data.parent() && this->m_wells == data.m_wells && this->m_groups == data.m_groups &&