From 778f1cfb8eef1c0e5ca90dea6929309c0a36f8bf 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 WellTestConfig --- opm/simulators/utils/ParallelRestart.cpp | 59 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 3 -- tests/test_ParallelRestart.cpp | 4 +- 3 files changed, 2 insertions(+), 64 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 6cb682746..19c0555bb 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -360,23 +360,6 @@ std::size_t packSize(const VFPProdTable& data, packSize(data.getTable(), comm); } -std::size_t packSize(const WellTestConfig::WTESTWell& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.name, comm) + - packSize(data.shut_reason, comm) + - packSize(data.test_interval, comm) + - packSize(data.num_test, comm) + - packSize(data.startup_time, comm) + - packSize(data.begin_report_step, comm); -} - -std::size_t packSize(const WellTestConfig& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.getWells(), comm); -} - std::size_t packSize(const WellTracerProperties& data, Dune::MPIHelper::MPICommunicator comm) { @@ -1177,25 +1160,6 @@ void pack(const VFPProdTable& data, pack(data.getTable(), buffer, position, comm); } -void pack(const WellTestConfig::WTESTWell& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.name, buffer, position, comm); - pack(data.shut_reason, buffer, position, comm); - pack(data.test_interval, buffer, position, comm); - pack(data.num_test, buffer, position, comm); - pack(data.startup_time, buffer, position, comm); - pack(data.begin_report_step, buffer, position, comm); -} - -void pack(const WellTestConfig& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.getWells(), buffer, position, comm); -} - void pack(const WellTracerProperties& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -2073,27 +2037,6 @@ void unpack(VFPProdTable& data, wfrAxis, gfrAxis, alqAxis, table); } -void unpack(WellTestConfig::WTESTWell& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - unpack(data.name, buffer, position, comm); - unpack(data.shut_reason, buffer, position, comm); - unpack(data.test_interval, buffer, position, comm); - unpack(data.num_test, buffer, position, comm); - unpack(data.startup_time, buffer, position, comm); - unpack(data.begin_report_step, buffer, position, comm); -} - -void unpack(WellTestConfig& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - std::vector ddata; - unpack(ddata, buffer, position, comm); - data = WellTestConfig(ddata); -} - void unpack(WellTracerProperties& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -2945,7 +2888,6 @@ template void unpack(std::shared_ptr<__VA_ARGS__>& data, \ INSTANTIATE_PACK_SHARED_PTR(SpiralICD) INSTANTIATE_PACK_SHARED_PTR(VFPInjTable) INSTANTIATE_PACK_SHARED_PTR(Well) -INSTANTIATE_PACK_SHARED_PTR(WellTestConfig) #undef INSTANTIATE_PACK_SHARED_PTR #define INSTANTIATE_PACK(...) \ @@ -2981,7 +2923,6 @@ INSTANTIATE_PACK(DynamicState>) 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 4fcc00a8f..581e72f42 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include @@ -450,8 +449,6 @@ ADD_PACK_PROTOTYPES(WellEconProductionLimits) ADD_PACK_PROTOTYPES(WellFoamProperties) ADD_PACK_PROTOTYPES(WellPolymerProperties) ADD_PACK_PROTOTYPES(WellSegments) -ADD_PACK_PROTOTYPES(WellTestConfig) -ADD_PACK_PROTOTYPES(WellTestConfig::WTESTWell) ADD_PACK_PROTOTYPES(WellTracerProperties) ADD_PACK_PROTOTYPES(WList) ADD_PACK_PROTOTYPES(WListManager) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index bfbb96191..05fbe855e 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -1341,7 +1341,7 @@ BOOST_AUTO_TEST_CASE(WTESTWell) #ifdef HAVE_MPI Opm::WellTestConfig::WTESTWell val1{"test", Opm::WellTestConfig::ECONOMIC, 1.0, 2, 3.0, 4}; - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(WellTestConfig::WTESTWell) #endif } @@ -1353,7 +1353,7 @@ BOOST_AUTO_TEST_CASE(WellTestConfig) Opm::WellTestConfig::WTESTWell tw{"test", Opm::WellTestConfig::ECONOMIC, 1.0, 2, 3.0, 4}; Opm::WellTestConfig val1({tw, tw, tw}); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(WellTestConfig) #endif }