From 714caef9c678cde1e24ea012c5df04680027809a Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 18 Mar 2020 09:29:02 +0100 Subject: [PATCH] remove old serialization support for GroupProductionProperties --- opm/simulators/utils/ParallelRestart.cpp | 47 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 1 - tests/test_ParallelRestart.cpp | 2 +- 3 files changed, 1 insertion(+), 49 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 2f98ce020..2dc5c5e9b 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -371,21 +371,6 @@ std::size_t packSize(const UnitSystem& data, packSize(data.use_count(), comm); } -std::size_t packSize(const Group::GroupProductionProperties& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.cmode, comm) + - packSize(data.exceed_action, comm) + - packSize(data.oil_target, comm) + - packSize(data.water_target, comm) + - packSize(data.gas_target, comm) + - packSize(data.liquid_target, comm) + - packSize(data.guide_rate, comm) + - packSize(data.guide_rate_def, comm) + - packSize(data.resv_target, comm) + - packSize(data.production_controls, comm); -} - std::size_t packSize(const Group& data, Dune::MPIHelper::MPICommunicator comm) { @@ -731,22 +716,6 @@ void pack(const UnitSystem& data, pack(data.use_count(), buffer, position, comm); } -void pack(const Group::GroupProductionProperties& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.cmode, buffer, position, comm); - pack(data.exceed_action, buffer, position, comm); - pack(data.oil_target, buffer, position, comm); - pack(data.water_target, buffer, position, comm); - pack(data.gas_target, buffer, position, comm); - pack(data.liquid_target, buffer, position, comm); - pack(data.guide_rate, buffer, position, comm); - pack(data.guide_rate_def, buffer, position, comm); - pack(data.resv_target, buffer, position, comm); - pack(data.production_controls, buffer, position, comm); -} - void pack(const Group& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -1159,22 +1128,6 @@ void unpack(UnitSystem& data, data = UnitSystem(name, type, dimensions, use_count); } -void unpack(Group::GroupProductionProperties& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - unpack(data.cmode, buffer, position, comm); - unpack(data.exceed_action, buffer, position, comm); - unpack(data.oil_target, buffer, position, comm); - unpack(data.water_target, buffer, position, comm); - unpack(data.gas_target, buffer, position, comm); - unpack(data.liquid_target, buffer, position, comm); - unpack(data.guide_rate, buffer, position, comm); - unpack(data.guide_rate_def, buffer, position, comm); - unpack(data.resv_target, buffer, position, comm); - unpack(data.production_controls, buffer, position, comm); -} - void unpack(Group& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index 41b3ecf4b..9890867b5 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -354,7 +354,6 @@ ADD_PACK_PROTOTYPES(data::Well) ADD_PACK_PROTOTYPES(data::WellRates) ADD_PACK_PROTOTYPES(Dimension) ADD_PACK_PROTOTYPES(Group) -ADD_PACK_PROTOTYPES(Group::GroupProductionProperties) ADD_PACK_PROTOTYPES(RestartKey) ADD_PACK_PROTOTYPES(RestartValue) ADD_PACK_PROTOTYPES(std::string) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 8225654e8..c61647475 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -1613,7 +1613,7 @@ BOOST_AUTO_TEST_CASE(GroupProductionProperties) 5.0, Opm::Group::GuideRateTarget::COMB, 6.0, 7}; - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(Group::GroupProductionProperties) #endif }