From 18a1e735fb63300a9716c2a3fd98c40167e5617e 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 Action::Quantity --- opm/simulators/utils/ParallelRestart.cpp | 22 ---------------------- opm/simulators/utils/ParallelRestart.hpp | 2 -- tests/test_ParallelRestart.cpp | 2 +- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 78f9922fc..415aa52ac 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -663,13 +663,6 @@ std::size_t packSize(const Deck& data, packSize(data.unitSystemAccessCount(), comm); } -std::size_t packSize(const Action::Quantity& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.quantity, comm) + - packSize(data.args, comm); -} - std::size_t packSize(const Action::Condition& data, Dune::MPIHelper::MPICommunicator comm) { @@ -1326,14 +1319,6 @@ void pack(const Deck& data, pack(data.unitSystemAccessCount(), buffer, position, comm); } -void pack(const Action::Quantity& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.quantity, buffer, position, comm); - pack(data.args, buffer, position, comm); -} - void pack(const Action::Condition& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -2229,13 +2214,6 @@ void unpack(Deck& data, std::vector& buffer, int& position, activeUnitSystem.get(), dataFile, inputPath, accessCount); } -void unpack(Action::Quantity& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - unpack(data.quantity, buffer, position, comm); - unpack(data.args, buffer, position, comm); -} - void unpack(Action::Condition& 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 738cbe2e4..26e05671b 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -46,7 +46,6 @@ namespace Opm namespace Action { class Actions; class Condition; - class Quantity; } class Connection; @@ -387,7 +386,6 @@ void unpack(char* str, std::size_t length, std::vector& buffer, int& posit ADD_PACK_PROTOTYPES(Action::Actions) ADD_PACK_PROTOTYPES(Action::Condition) -ADD_PACK_PROTOTYPES(Action::Quantity) ADD_PACK_PROTOTYPES(Connection) ADD_PACK_PROTOTYPES(data::CellData) ADD_PACK_PROTOTYPES(data::Connection) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 93cdd1ad8..752ebaf64 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -2020,7 +2020,7 @@ BOOST_AUTO_TEST_CASE(Quantity) Opm::Action::Quantity val1; val1.quantity = "test1"; val1.args = {"test2", "test3"}; - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(Action::Quantity) #endif }