diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 17bc308d1..1105434b2 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -324,15 +324,6 @@ std::size_t packSize(const VFPProdTable& data, packSize(data.getTable(), comm); } -std::size_t packSize(const UDAValue& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.get_dim(), comm) + - packSize(data.is(), comm) + - (data.is() ? packSize(data.get(), comm) : - packSize(data.get(), comm)); -} - template std::size_t packSize(const std::shared_ptr& data, Dune::MPIHelper::MPICommunicator comm) @@ -648,18 +639,6 @@ void pack(const VFPProdTable& data, pack(data.getTable(), buffer, position, comm); } -void pack(const UDAValue& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.get_dim(), buffer, position, comm); - pack(data.is(), buffer, position, comm); - if (data.is()) - pack(data.get(), buffer, position, comm); - else - pack(data.get(), buffer, position, comm); -} - template void pack(const std::shared_ptr& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -1017,25 +996,6 @@ void unpack(VFPProdTable& data, wfrAxis, gfrAxis, alqAxis, table); } -void unpack(UDAValue& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - bool isDouble; - Dimension dim; - unpack(dim, buffer, position, comm); - unpack(isDouble, buffer, position, comm); - if (isDouble) { - double val; - unpack(val, buffer, position, comm); - data = UDAValue(val, dim); - } else { - std::string val; - unpack(val, buffer, position, comm); - data = UDAValue(val, dim); - } -} - template void unpack(std::shared_ptr& 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 9e23cbcfa..a8a783851 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -41,7 +41,6 @@ namespace Opm { class Dimension; -class UDAValue; class UnitSystem; class VFPInjTable; class VFPProdTable; @@ -355,7 +354,6 @@ ADD_PACK_PROTOTYPES(Dimension) ADD_PACK_PROTOTYPES(RestartKey) ADD_PACK_PROTOTYPES(RestartValue) ADD_PACK_PROTOTYPES(std::string) -ADD_PACK_PROTOTYPES(UDAValue) ADD_PACK_PROTOTYPES(UnitSystem) ADD_PACK_PROTOTYPES(VFPInjTable) ADD_PACK_PROTOTYPES(VFPProdTable) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 965e98902..a71e5a023 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -1393,10 +1393,10 @@ BOOST_AUTO_TEST_CASE(UDAValue) { #ifdef HAVE_MPI Opm::UDAValue val1("test"); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(UDAValue) val1 = Opm::UDAValue(1.0); - val2 = PackUnpack(val1); + val2 = PackUnpack2(val1); DO_CHECKS(UDAValue) #endif }