From c8b14dcbb1fdfc127a1f0a7064e13b08730732fb 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 IOrderSet --- opm/simulators/utils/ParallelRestart.cpp | 31 +++--------------------- opm/simulators/utils/ParallelRestart.hpp | 12 --------- 2 files changed, 3 insertions(+), 40 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index a14496db8..4b1f6f227 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #define HANDLE_AS_POD(T) \ @@ -376,14 +375,6 @@ std::size_t packSize(const UnitSystem& data, packSize(data.use_count(), comm); } -template -std::size_t packSize(const IOrderSet& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.index(), comm) + - packSize(data.data(), comm); -} - std::size_t packSize(const Group::GroupInjectionProperties& data, Dune::MPIHelper::MPICommunicator comm) { @@ -765,14 +756,6 @@ void pack(const UnitSystem& data, pack(data.use_count(), buffer, position, comm); } -template -void pack(const IOrderSet& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.index(), buffer, position, comm); - pack(data.data(), buffer, position, comm); -} - void pack(const Group::GroupInjectionProperties& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -1216,17 +1199,6 @@ void unpack(UnitSystem& data, data = UnitSystem(name, type, dimensions, use_count); } -template -void unpack(IOrderSet& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - typename IOrderSet::index_type index; - typename IOrderSet::storage_type storage; - unpack(index, buffer, position, comm); - unpack(storage, buffer, position, comm); - data = IOrderSet(index, storage); -} - template void unpack(std::map& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm); @@ -1379,6 +1351,7 @@ INSTANTIATE_PACK(bool) INSTANTIATE_PACK(int) INSTANTIATE_PACK(std::array) INSTANTIATE_PACK(std::array) +INSTANTIATE_PACK(std::array) INSTANTIATE_PACK(unsigned char) INSTANTIATE_PACK(std::map,std::pair>) INSTANTIATE_PACK(std::map) @@ -1386,6 +1359,8 @@ INSTANTIATE_PACK(std::map>) INSTANTIATE_PACK(std::map>) INSTANTIATE_PACK(std::map,int>>) INSTANTIATE_PACK(std::map) +INSTANTIATE_PACK(std::map) +INSTANTIATE_PACK(std::map) INSTANTIATE_PACK(std::map) INSTANTIATE_PACK(std::unordered_map) INSTANTIATE_PACK(std::unordered_map) diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index 654b95184..6c8c81331 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -42,7 +42,6 @@ namespace Opm { class Dimension; -template class IOrderSet; class UDAValue; class UnitSystem; class VFPInjTable; @@ -135,9 +134,6 @@ std::size_t packSize(const OrderedMap& data, Dune::MPIHelper::MPIComm template std::size_t packSize(const DynamicState& data, Dune::MPIHelper::MPICommunicator comm); -template -std::size_t packSize(const IOrderSet& data, Dune::MPIHelper::MPICommunicator comm); - ////// pack routines template @@ -235,10 +231,6 @@ template void pack(const DynamicState& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm); -template -void pack(const IOrderSet& data, std::vector& buffer, - int& position, Dune::MPIHelper::MPICommunicator comm); - void pack(const char* str, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm); @@ -340,10 +332,6 @@ template void unpack(DynamicState& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm); -template -void unpack(IOrderSet& data, std::vector& buffer, - int& position, Dune::MPIHelper::MPICommunicator comm); - void unpack(char* str, std::size_t length, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm);