diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index d89d24e02..3294400ac 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -25,9 +25,7 @@ #include #include #include -#include -#include -#include +#include #include #include @@ -296,17 +294,6 @@ std::size_t packSize(const RestartValue& data, Dune::MPIHelper::MPICommunicator return packSize(data.solution, comm) + packSize(data.wells, comm) + packSize(data.extra, comm); } -std::size_t packSize(const VFPInjTable& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.getTableNum(), comm) + - packSize(data.getDatumDepth(), comm) + - packSize(data.getFloType(), comm) + - packSize(data.getFloAxis(), comm) + - packSize(data.getTHPAxis(), comm) + - packSize(data.getTable(), comm); -} - std::size_t packSize(const VFPProdTable& data, Dune::MPIHelper::MPICommunicator comm) { @@ -593,18 +580,6 @@ void pack(const RestartValue& data, std::vector& buffer, int& position, pack(data.extra, buffer, position, comm); } -void pack(const VFPInjTable& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.getTableNum(), buffer, position, comm); - pack(data.getDatumDepth(), buffer, position, comm); - pack(data.getFloType(), buffer, position, comm); - pack(data.getFloAxis(), buffer, position, comm); - pack(data.getTHPAxis(), buffer, position, comm); - pack(data.getTable(), buffer, position, comm); -} - void pack(const VFPProdTable& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -910,27 +885,6 @@ void unpack(RestartValue& data, std::vector& buffer, int& position, unpack(data.extra, buffer, position, comm); } -void unpack(VFPInjTable& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - int tableNum; - double datumDepth; - VFPInjTable::FLO_TYPE floType; - std::vector floAxis, thpAxis; - VFPInjTable::array_type table; - - unpack(tableNum, buffer, position, comm); - unpack(datumDepth, buffer, position, comm); - unpack(floType, buffer, position, comm); - unpack(floAxis, buffer, position, comm); - unpack(thpAxis, buffer, position, comm); - unpack(table, buffer, position, comm); - - data = VFPInjTable(tableNum, datumDepth, floType, - floAxis, thpAxis, table); -} - void unpack(VFPProdTable& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -1005,7 +959,6 @@ INSTANTIATE_PACK_VECTOR(size_t) INSTANTIATE_PACK_VECTOR(std::time_t) INSTANTIATE_PACK_VECTOR(std::array) INSTANTIATE_PACK_VECTOR(std::pair) -INSTANTIATE_PACK_VECTOR(std::shared_ptr) INSTANTIATE_PACK_VECTOR(std::shared_ptr) INSTANTIATE_PACK_VECTOR(std::map) INSTANTIATE_PACK_VECTOR(std::pair>) @@ -1031,19 +984,6 @@ INSTANTIATE_PACK_SET(std::string) #undef INSTANTIATE_PACK_SET -#define INSTANTIATE_PACK_SHARED_PTR(...) \ -template std::size_t packSize(const std::shared_ptr<__VA_ARGS__>& data, \ - Dune::MPIHelper::MPICommunicator comm); \ -template void pack(const std::shared_ptr<__VA_ARGS__>& data, \ - std::vector& buffer, int& position, \ - Dune::MPIHelper::MPICommunicator comm); \ -template void unpack(std::shared_ptr<__VA_ARGS__>& data, \ - std::vector& buffer, int& position, \ - Dune::MPIHelper::MPICommunicator comm); - -INSTANTIATE_PACK_SHARED_PTR(VFPInjTable) -#undef INSTANTIATE_PACK_SHARED_PTR - #define INSTANTIATE_PACK(...) \ template std::size_t packSize(const __VA_ARGS__& data, \ Dune::MPIHelper::MPICommunicator comm); \ @@ -1076,6 +1016,7 @@ INSTANTIATE_PACK(std::unordered_map) INSTANTIATE_PACK(std::unordered_set) INSTANTIATE_PACK(std::pair) INSTANTIATE_PACK(std::pair) +INSTANTIATE_PACK(std::pair) #undef INSTANTIATE_PACK diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index b2d1017fe..81b06e253 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -40,7 +40,6 @@ namespace Opm { -class VFPInjTable; class VFPProdTable; namespace Mpi @@ -351,7 +350,6 @@ ADD_PACK_PROTOTYPES(data::WellRates) ADD_PACK_PROTOTYPES(RestartKey) ADD_PACK_PROTOTYPES(RestartValue) ADD_PACK_PROTOTYPES(std::string) -ADD_PACK_PROTOTYPES(VFPInjTable) ADD_PACK_PROTOTYPES(VFPProdTable) } // end namespace Mpi diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 75ee362e5..defab6821 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -1320,7 +1320,7 @@ BOOST_AUTO_TEST_CASE(VFPInjTable) { #ifdef HAVE_MPI Opm::VFPInjTable val1 = getVFPInjTable(); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(VFPInjTable) #endif }