From 878885e61f16bfcc11bf10c1537e017afad34cba Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 16 Mar 2020 15:38:31 +0100 Subject: [PATCH] remove old serialization support for UDQAssign --- opm/simulators/utils/ParallelRestart.cpp | 53 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 3 -- tests/test_ParallelRestart.cpp | 2 +- 3 files changed, 1 insertion(+), 57 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index b9ad7c7eb..f5d02b551 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -1111,21 +1111,6 @@ std::size_t packSize(const UDQDefine& data, packSize(data.input_string(), comm); } -std::size_t packSize(const UDQAssign::AssignRecord& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.selector, comm) + - packSize(data.value, comm); -} - -std::size_t packSize(const UDQAssign& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.keyword(), comm) + - packSize(data.var_type(), comm) + - packSize(data.getRecords(), comm); -} - std::size_t packSize(const UDQIndex& data, Dune::MPIHelper::MPICommunicator comm) { @@ -2422,23 +2407,6 @@ void pack(const UDQDefine& data, pack(data.input_string(), buffer, position, comm); } -void pack(const UDQAssign::AssignRecord& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.selector, buffer, position, comm); - pack(data.value, buffer, position, comm); -} - -void pack(const UDQAssign& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.keyword(), buffer, position, comm); - pack(data.var_type(), buffer, position, comm); - pack(data.getRecords(), buffer, position, comm); -} - void pack(const UDQIndex& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -4203,27 +4171,6 @@ void unpack(UDQDefine& data, data = UDQDefine(keyword, ast, varType, string_data); } -void unpack(UDQAssign::AssignRecord& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - unpack(data.selector, buffer, position, comm); - unpack(data.value, buffer, position, comm); -} - -void unpack(UDQAssign& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - std::string keyword; - UDQVarType varType; - std::vector records; - unpack(keyword, buffer, position, comm); - unpack(varType, buffer, position, comm); - unpack(records, buffer, position, comm); - data = UDQAssign(keyword, varType, records); -} - void unpack(UDQIndex& 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 a261ac425..ff0402a89 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -563,8 +562,6 @@ ADD_PACK_PROTOTYPES(TlmixparRecord) ADD_PACK_PROTOTYPES(TlmixparTable) ADD_PACK_PROTOTYPES(Tuning) ADD_PACK_PROTOTYPES(UDAValue) -ADD_PACK_PROTOTYPES(UDQAssign) -ADD_PACK_PROTOTYPES(UDQAssign::AssignRecord) ADD_PACK_PROTOTYPES(UDQConfig) ADD_PACK_PROTOTYPES(UDQDefine) ADD_PACK_PROTOTYPES(UDQIndex) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index b45058bd6..e12c7acc4 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -1697,7 +1697,7 @@ BOOST_AUTO_TEST_CASE(UDQAssign) Opm::UDQAssign val1("test", Opm::UDQVarType::NONE, {Opm::UDQAssign::AssignRecord{{"test1"}, 1.0}, Opm::UDQAssign::AssignRecord{{"test2"}, 2.0}}); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(UDQAssign) #endif }