From c5f36bd7cc9170890086b70fe57d56064350af2e 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 DeckKeyword --- opm/simulators/utils/ParallelRestart.cpp | 40 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 1 - tests/test_ParallelRestart.cpp | 2 +- 3 files changed, 1 insertion(+), 42 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 01224c64b..bda564b09 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -654,17 +654,6 @@ std::size_t packSize(const Group& data, packSize(data.productionProperties(), comm); } -std::size_t packSize(const DeckKeyword& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.name(), comm) + - packSize(data.location(), comm) + - packSize(data.records(), comm) + - packSize(data.isDataKeyword(), comm) + - packSize(data.isSlashTerminated(), comm); -} - - std::size_t packSize(const Deck& data, Dune::MPIHelper::MPICommunicator comm) { @@ -1347,17 +1336,6 @@ void pack(const Group& data, pack(data.productionProperties(), buffer, position, comm); } -void pack(const DeckKeyword& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.name(), buffer, position, comm); - pack(data.location(), buffer, position, comm); - pack(data.records(), buffer, position, comm); - pack(data.isDataKeyword(), buffer, position, comm); - pack(data.isSlashTerminated(), buffer, position, comm); -} - void pack(const Deck& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -2276,24 +2254,6 @@ void unpack(Group& data, injection, production); } -void unpack(DeckKeyword& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - std::string name; - Location location; - std::vector records; - bool isDataKeyword, isSlashTerminated; - - unpack(name, buffer, position, comm); - unpack(location, buffer, position, comm); - unpack(records, buffer, position, comm); - unpack(isDataKeyword, buffer, position, comm); - unpack(isSlashTerminated, buffer, position, comm); - data = DeckKeyword(name, location, records, - isDataKeyword, isSlashTerminated); -} - void unpack(Deck& 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 b7dcdabb1..bbd753edd 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -402,7 +402,6 @@ ADD_PACK_PROTOTYPES(data::Solution) ADD_PACK_PROTOTYPES(data::Well) ADD_PACK_PROTOTYPES(data::WellRates) ADD_PACK_PROTOTYPES(Deck) -ADD_PACK_PROTOTYPES(DeckKeyword) ADD_PACK_PROTOTYPES(Dimension) ADD_PACK_PROTOTYPES(Group) ADD_PACK_PROTOTYPES(Group::GroupInjectionProperties) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 18d91ca0f..191648022 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -1960,7 +1960,7 @@ BOOST_AUTO_TEST_CASE(DeckKeyword) #ifdef HAVE_MPI Opm::DeckKeyword val1("test", {"test",1}, {getDeckRecord(), getDeckRecord()}, true, false); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(DeckKeyword) #endif }