From d6c49bf801d1fbe8af3509df3bb18f371e254356 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 WellEconProductionLimits --- opm/simulators/utils/ParallelRestart.cpp | 76 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 2 - tests/test_ParallelRestart.cpp | 2 +- 3 files changed, 1 insertion(+), 79 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index daea3fceb..ad791b164 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -406,26 +406,6 @@ std::size_t packSize(const Well::WellInjectionProperties& data, packSize(data.controlMode, comm); } -std::size_t packSize(const WellEconProductionLimits& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.minOilRate(), comm) + - packSize(data.minGasRate(), comm) + - packSize(data.maxWaterCut(), comm) + - packSize(data.maxGasOilRatio(), comm) + - packSize(data.maxWaterGasRatio(), comm) + - packSize(data.workover(), comm) + - packSize(data.endRun(), comm) + - packSize(data.followonWell(), comm) + - packSize(data.quantityLimit(), comm) + - packSize(data.maxSecondaryMaxWaterCut(), comm) + - packSize(data.workoverSecondary(), comm) + - packSize(data.maxGasLiquidRatio(), comm) + - packSize(data.minLiquidRate(), comm) + - packSize(data.maxTemperature(), comm) + - packSize(data.minReservoirFluidRate(), comm); -} - std::size_t packSize(const WellConnections& data, Dune::MPIHelper::MPICommunicator comm) { @@ -1011,27 +991,6 @@ void pack(const Well::WellInjectionProperties& data, pack(data.controlMode, buffer, position, comm); } -void pack(const WellEconProductionLimits& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.minOilRate(), buffer, position, comm); - pack(data.minGasRate(), buffer, position, comm); - pack(data.maxWaterCut(), buffer, position, comm); - pack(data.maxGasOilRatio(), buffer, position, comm); - pack(data.maxWaterGasRatio(), buffer, position, comm); - pack(data.workover(), buffer, position, comm); - pack(data.endRun(), buffer, position, comm); - pack(data.followonWell(), buffer, position, comm); - pack(data.quantityLimit(), buffer, position, comm); - pack(data.maxSecondaryMaxWaterCut(), buffer, position, comm); - pack(data.workoverSecondary(), buffer, position, comm); - pack(data.maxGasLiquidRatio(), buffer, position, comm); - pack(data.minLiquidRate(), buffer, position, comm); - pack(data.maxTemperature(), buffer, position, comm); - pack(data.minReservoirFluidRate(), buffer, position, comm); -} - void pack(const WellConnections& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -1694,41 +1653,6 @@ void unpack(Well::WellInjectionProperties& data, unpack(data.controlMode, buffer, position, comm); } -void unpack(WellEconProductionLimits& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - double minOilRate, minGasRate, maxWaterCut, maxGasOilRatio, maxWaterGasRatio; - WellEconProductionLimits::EconWorkover workover, workoverSecondary; - bool endRun; - std::string followonWell; - WellEconProductionLimits::QuantityLimit quantityLimit; - double secondaryMaxWaterCut, maxGasLiquidRatio, minLiquidRate, - maxTemperature, minReservoirFluidRate; - unpack(minOilRate, buffer, position, comm); - unpack(minGasRate, buffer, position, comm); - unpack(maxWaterCut, buffer, position, comm); - unpack(maxGasOilRatio, buffer, position, comm); - unpack(maxWaterGasRatio, buffer, position, comm); - unpack(workover, buffer, position, comm); - unpack(endRun, buffer, position, comm); - unpack(followonWell, buffer, position, comm); - unpack(quantityLimit, buffer, position, comm); - unpack(secondaryMaxWaterCut, buffer, position, comm); - unpack(workoverSecondary, buffer, position, comm); - unpack(maxGasLiquidRatio, buffer, position, comm); - unpack(minLiquidRate, buffer, position, comm); - unpack(maxTemperature, buffer, position, comm); - unpack(minReservoirFluidRate, buffer, position, comm); - data = WellEconProductionLimits(minOilRate, minGasRate, maxWaterCut, - maxGasOilRatio, maxWaterGasRatio, - workover, endRun, followonWell, - quantityLimit, secondaryMaxWaterCut, - workoverSecondary, maxGasLiquidRatio, - minLiquidRate, maxTemperature, - minReservoirFluidRate); -} - void unpack(WellConnections& 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 77086481b..741be4b52 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -53,7 +53,6 @@ class Valve; class VFPInjTable; class VFPProdTable; class WellConnections; -class WellEconProductionLimits; class WellFoamProperties; class WellPolymerProperties; class WellSegments; @@ -396,7 +395,6 @@ ADD_PACK_PROTOTYPES(Well::WellInjectionProperties) ADD_PACK_PROTOTYPES(Well::WellProductionProperties) ADD_PACK_PROTOTYPES(WellBrineProperties) ADD_PACK_PROTOTYPES(WellConnections) -ADD_PACK_PROTOTYPES(WellEconProductionLimits) ADD_PACK_PROTOTYPES(WellFoamProperties) ADD_PACK_PROTOTYPES(WellPolymerProperties) ADD_PACK_PROTOTYPES(WellSegments) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index d39c2fa4a..3b85182f4 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -1448,7 +1448,7 @@ BOOST_AUTO_TEST_CASE(WellEconProductionLimits) 6.0, Opm::WellEconProductionLimits::EconWorkover::WELL, 7.0, 8.0, 9.0, 10.0); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(WellEconProductionLimits) #endif }