From e53584ffec174c9e2819d8d175df3f06eb6fe5ae 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 Valve --- opm/simulators/utils/ParallelRestart.cpp | 54 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 2 - 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 b5c7f08f3..9289459c5 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 @@ -346,19 +345,6 @@ std::size_t packSize(const UDAValue& data, packSize(data.get(), comm)); } -std::size_t packSize(const Valve& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.conFlowCoefficient(), comm) + - packSize(data.conCrossArea(), comm) + - packSize(data.conMaxCrossArea(), comm) + - packSize(data.pipeAdditionalLength(), comm) + - packSize(data.pipeDiameter(), comm) + - packSize(data.pipeRoughness(), comm) + - packSize(data.pipeCrossArea(), comm) + - packSize(data.status(), comm); -} - std::size_t packSize(const Segment& data, Dune::MPIHelper::MPICommunicator comm) { @@ -818,20 +804,6 @@ void pack(const UDAValue& data, pack(data.get(), buffer, position, comm); } -void pack(const Valve& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.conFlowCoefficient(), buffer, position, comm); - pack(data.conCrossArea(), buffer, position, comm); - pack(data.conMaxCrossArea(), buffer, position, comm); - pack(data.pipeAdditionalLength(), buffer, position, comm); - pack(data.pipeDiameter(), buffer, position, comm); - pack(data.pipeRoughness(), buffer, position, comm); - pack(data.pipeCrossArea(), buffer, position, comm); - pack(data.status(), buffer, position, comm); -} - void pack(const Segment& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -1340,32 +1312,6 @@ void unpack(UDAValue& data, } } -void unpack(Valve& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - double conFlowCoefficient; - double conCrossArea; - double conMaxCrossArea; - double pipeAdditionalLength; - double pipeDiameter; - double pipeRoughness; - double pipeCrossArea; - ICDStatus status; - - unpack(conFlowCoefficient, buffer, position, comm); - unpack(conCrossArea, buffer, position, comm); - unpack(conMaxCrossArea, buffer, position, comm); - unpack(pipeAdditionalLength, buffer, position, comm); - unpack(pipeDiameter, buffer, position, comm); - unpack(pipeRoughness, buffer, position, comm); - unpack(pipeCrossArea, buffer, position, comm); - unpack(status, buffer, position, comm); - data = Valve(conFlowCoefficient, conCrossArea, conMaxCrossArea, - pipeAdditionalLength, pipeDiameter, pipeRoughness, - pipeCrossArea, status); -} - void unpack(Segment& 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 5ee784c05..1f98d653f 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -47,7 +47,6 @@ template class IOrderSet; class Segment; class UDAValue; class UnitSystem; -class Valve; class VFPInjTable; class VFPProdTable; class WellSegments; @@ -378,7 +377,6 @@ ADD_PACK_PROTOTYPES(Segment) ADD_PACK_PROTOTYPES(std::string) ADD_PACK_PROTOTYPES(UDAValue) ADD_PACK_PROTOTYPES(UnitSystem) -ADD_PACK_PROTOTYPES(Valve) ADD_PACK_PROTOTYPES(VFPInjTable) ADD_PACK_PROTOTYPES(VFPProdTable) ADD_PACK_PROTOTYPES(Well) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 0e83a8246..d8955e849 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -1519,7 +1519,7 @@ BOOST_AUTO_TEST_CASE(Valve) { #ifdef HAVE_MPI Opm::Valve val1(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, Opm::ICDStatus::OPEN); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(Valve) #endif }