From 41950690fde9a421555710ad57efe3f9d66b6d90 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 WellInjectionProperties --- opm/simulators/utils/ParallelRestart.cpp | 62 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 1 - tests/test_ParallelRestart.cpp | 2 +- 3 files changed, 1 insertion(+), 64 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 1871ed125..a7f5bbd08 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -347,26 +347,6 @@ std::size_t packSize(const UDAValue& data, packSize(data.get(), comm)); } -std::size_t packSize(const Well::WellInjectionProperties& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.name, comm) + - packSize(data.surfaceInjectionRate, comm) + - packSize(data.reservoirInjectionRate, comm) + - packSize(data.BHPTarget, comm) + - packSize(data.THPTarget, comm) + - packSize(data.bhp_hist_limit, comm) + - packSize(data.thp_hist_limit, comm) + - packSize(data.temperature, comm) + - packSize(data.BHPH, comm) + - packSize(data.THPH, comm) + - packSize(data.VFPTableNumber, comm) + - packSize(data.predictionMode, comm) + - packSize(data.injectionControls, comm) + - packSize(data.injectorType, comm) + - packSize(data.controlMode, comm); -} - std::size_t packSize(const SpiralICD& data, Dune::MPIHelper::MPICommunicator comm) { @@ -855,27 +835,6 @@ void pack(const UDAValue& data, pack(data.get(), buffer, position, comm); } -void pack(const Well::WellInjectionProperties& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.name, buffer, position, comm); - pack(data.surfaceInjectionRate, buffer, position, comm); - pack(data.reservoirInjectionRate, buffer, position, comm); - pack(data.BHPTarget, buffer, position, comm); - pack(data.THPTarget, buffer, position, comm); - pack(data.bhp_hist_limit, buffer, position, comm); - pack(data.thp_hist_limit, buffer, position, comm); - pack(data.temperature, buffer, position, comm); - pack(data.BHPH, buffer, position, comm); - pack(data.THPH, buffer, position, comm); - pack(data.VFPTableNumber, buffer, position, comm); - pack(data.predictionMode, buffer, position, comm); - pack(data.injectionControls, buffer, position, comm); - pack(data.injectorType, buffer, position, comm); - pack(data.controlMode, buffer, position, comm); -} - void pack(const SpiralICD& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -1415,27 +1374,6 @@ void unpack(UDAValue& data, } } -void unpack(Well::WellInjectionProperties& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - unpack(data.name, buffer, position, comm); - unpack(data.surfaceInjectionRate, buffer, position, comm); - unpack(data.reservoirInjectionRate, buffer, position, comm); - unpack(data.BHPTarget, buffer, position, comm); - unpack(data.THPTarget, buffer, position, comm); - unpack(data.bhp_hist_limit, buffer, position, comm); - unpack(data.thp_hist_limit, buffer, position, comm); - unpack(data.temperature, buffer, position, comm); - unpack(data.BHPH, buffer, position, comm); - unpack(data.THPH, buffer, position, comm); - unpack(data.VFPTableNumber, buffer, position, comm); - unpack(data.predictionMode, buffer, position, comm); - unpack(data.injectionControls, buffer, position, comm); - unpack(data.injectorType, buffer, position, comm); - unpack(data.controlMode, buffer, position, comm); -} - void unpack(SpiralICD& 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 14c144af0..ec4f86e69 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -385,7 +385,6 @@ ADD_PACK_PROTOTYPES(VFPInjTable) ADD_PACK_PROTOTYPES(VFPProdTable) ADD_PACK_PROTOTYPES(Well) ADD_PACK_PROTOTYPES(WellType) -ADD_PACK_PROTOTYPES(Well::WellInjectionProperties) ADD_PACK_PROTOTYPES(WellSegments) } // end namespace Mpi diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 439cde3c6..457fa8703 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -1432,7 +1432,7 @@ BOOST_AUTO_TEST_CASE(WellInjectionProperties) 8, Opm::InjectorType::OIL, Opm::Well::InjectorCMode::BHP); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(Well::WellInjectionProperties) #endif }