From 486c9ce8ddf63722eb4696ed41fedf7d53818b20 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 17 Mar 2020 15:40:52 +0100 Subject: [PATCH] remove old serialization support for GConSale --- opm/simulators/utils/ParallelRestart.cpp | 58 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 3 -- tests/test_ParallelRestart.cpp | 4 +- 3 files changed, 2 insertions(+), 63 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index e3a5490a3..15b57a376 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -656,23 +656,6 @@ std::size_t packSize(const Group& data, packSize(data.productionProperties(), comm); } -std::size_t packSize(const GConSale::GCONSALEGroup& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.sales_target, comm) + - packSize(data.max_sales_rate, comm) + - packSize(data.min_sales_rate, comm) + - packSize(data.max_proc, comm) + - packSize(data.udq_undefined, comm) + - packSize(data.unit_system, comm); -} - -std::size_t packSize(const GConSale& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.getGroups(), comm); -} - std::size_t packSize(const GConSump::GCONSUMPGroup& data, Dune::MPIHelper::MPICommunicator comm) { @@ -1421,25 +1404,6 @@ void pack(const Group& data, pack(data.productionProperties(), buffer, position, comm); } -void pack(const GConSale::GCONSALEGroup& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.sales_target, buffer, position, comm); - pack(data.max_sales_rate, buffer, position, comm); - pack(data.min_sales_rate, buffer, position, comm); - pack(data.max_proc, buffer, position, comm); - pack(data.udq_undefined, buffer, position, comm); - pack(data.unit_system, buffer, position, comm); -} - -void pack(const GConSale& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.getGroups(), buffer, position, comm); -} - void pack(const GConSump::GCONSUMPGroup& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -2430,27 +2394,6 @@ void unpack(Group& data, injection, production); } -void unpack(GConSale::GCONSALEGroup& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - unpack(data.sales_target, buffer, position, comm); - unpack(data.max_sales_rate, buffer, position, comm); - unpack(data.min_sales_rate, buffer, position, comm); - unpack(data.max_proc, buffer, position, comm); - unpack(data.udq_undefined, buffer, position, comm); - unpack(data.unit_system, buffer, position, comm); -} - -void unpack(GConSale& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - std::map groups; - unpack(groups, buffer, position, comm); - data = GConSale(groups); -} - void unpack(GConSump::GCONSUMPGroup& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -2743,7 +2686,6 @@ INSTANTIATE_PACK(std::pair) INSTANTIATE_PACK(std::pair) INSTANTIATE_PACK(DynamicState) INSTANTIATE_PACK(DynamicState>) -INSTANTIATE_PACK(DynamicState>) INSTANTIATE_PACK(DynamicState>) INSTANTIATE_PACK(DynamicState) INSTANTIATE_PACK(DynamicVector) diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index 5925dbf1d..4a612e871 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -413,8 +412,6 @@ ADD_PACK_PROTOTYPES(DeckItem) ADD_PACK_PROTOTYPES(DeckKeyword) ADD_PACK_PROTOTYPES(DeckRecord) ADD_PACK_PROTOTYPES(Dimension) -ADD_PACK_PROTOTYPES(GConSale) -ADD_PACK_PROTOTYPES(GConSale::GCONSALEGroup) ADD_PACK_PROTOTYPES(GConSump) ADD_PACK_PROTOTYPES(GConSump::GCONSUMPGroup) ADD_PACK_PROTOTYPES(Group) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 2ee0ed0d2..3734ce7e1 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -1855,7 +1855,7 @@ BOOST_AUTO_TEST_CASE(GConSaleGroup) Opm::UDAValue(3.0), Opm::GConSale::MaxProcedure::PLUG, 4.0, Opm::UnitSystem()}; - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(GConSale::GCONSALEGroup) #endif } @@ -1870,7 +1870,7 @@ BOOST_AUTO_TEST_CASE(GConSale) Opm::GConSale::MaxProcedure::PLUG, 4.0, Opm::UnitSystem()}; Opm::GConSale val1({{"test1", group}, {"test2", group}}); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(GConSale) #endif }