From 781b11fb0782b6b68598b7a862ccce8c743ee3e9 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::Condition --- opm/simulators/utils/ParallelRestart.cpp | 32 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 3 --- tests/test_ParallelRestart.cpp | 2 +- 3 files changed, 1 insertion(+), 36 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 415aa52ac..0fd3fd094 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -24,7 +24,6 @@ #include "ParallelRestart.hpp" #include #include -#include #include #include #include @@ -663,16 +662,6 @@ std::size_t packSize(const Deck& data, packSize(data.unitSystemAccessCount(), comm); } -std::size_t packSize(const Action::Condition& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.lhs, comm) + - packSize(data.rhs, comm) + - packSize(data.logic, comm) + - packSize(data.cmp, comm) + - packSize(data.cmp_string, comm); -} - std::size_t packSize(const Action::Actions& data, Dune::MPIHelper::MPICommunicator comm) { @@ -1319,17 +1308,6 @@ void pack(const Deck& data, pack(data.unitSystemAccessCount(), buffer, position, comm); } -void pack(const Action::Condition& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.lhs, buffer, position, comm); - pack(data.rhs, buffer, position, comm); - pack(data.logic, buffer, position, comm); - pack(data.cmp, buffer, position, comm); - pack(data.cmp_string, buffer, position, comm); -} - void pack(const Action::Actions& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -2214,16 +2192,6 @@ void unpack(Deck& data, std::vector& buffer, int& position, activeUnitSystem.get(), dataFile, inputPath, accessCount); } -void unpack(Action::Condition& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - unpack(data.lhs, buffer, position, comm); - unpack(data.rhs, buffer, position, comm); - unpack(data.logic, buffer, position, comm); - unpack(data.cmp, buffer, position, comm); - unpack(data.cmp_string, buffer, position, comm); -} - void unpack(Action::Actions& 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 26e05671b..24f6cc957 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -45,9 +45,7 @@ namespace Opm namespace Action { class Actions; - class Condition; } - class Connection; class Dimension; template class IOrderSet; @@ -385,7 +383,6 @@ void unpack(char* str, std::size_t length, std::vector& buffer, int& posit Dune::MPIHelper::MPICommunicator comm); ADD_PACK_PROTOTYPES(Action::Actions) -ADD_PACK_PROTOTYPES(Action::Condition) 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 752ebaf64..740a82943 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -2030,7 +2030,7 @@ BOOST_AUTO_TEST_CASE(Condition) { #ifdef HAVE_MPI Opm::Action::Condition val1 = getCondition(); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(Action::Condition) #endif }