From 2bb892139d1a6a4219bb297cbea470441692cceb 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 SpiralICD --- opm/simulators/utils/ParallelRestart.cpp | 66 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 2 - tests/test_ParallelRestart.cpp | 2 +- 3 files changed, 1 insertion(+), 69 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index a7f5bbd08..b5c7f08f3 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 @@ -347,22 +346,6 @@ std::size_t packSize(const UDAValue& data, packSize(data.get(), comm)); } -std::size_t packSize(const SpiralICD& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.strength(), comm) + - packSize(data.length(), comm) + - packSize(data.densityCalibration(), comm) + - packSize(data.viscosityCalibration(), comm) + - packSize(data.criticalValue(), comm) + - packSize(data.widthTransitionRegion(), comm) + - packSize(data.maxViscosityRatio(), comm) + - packSize(data.methodFlowScaling(), comm) + - packSize(data.maxAbsoluteRate(), comm) + - packSize(data.status(), comm) + - packSize(data.scalingFactor(), comm); -} - std::size_t packSize(const Valve& data, Dune::MPIHelper::MPICommunicator comm) { @@ -835,23 +818,6 @@ void pack(const UDAValue& data, pack(data.get(), buffer, position, comm); } -void pack(const SpiralICD& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.strength(), buffer, position, comm); - pack(data.length(), buffer, position, comm); - pack(data.densityCalibration(), buffer, position, comm); - pack(data.viscosityCalibration(), buffer, position, comm); - pack(data.criticalValue(), buffer, position, comm); - pack(data.widthTransitionRegion(), buffer, position, comm); - pack(data.maxViscosityRatio(), buffer, position, comm); - pack(data.methodFlowScaling(), buffer, position, comm); - pack(data.maxAbsoluteRate(), buffer, position, comm); - pack(data.status(), buffer, position, comm); - pack(data.scalingFactor(), buffer, position, comm); -} - void pack(const Valve& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -1374,37 +1340,6 @@ void unpack(UDAValue& data, } } -void unpack(SpiralICD& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - double strength, length, densityCalibration, - viscosityCalibration, criticalValue, - widthTransitionRegion, maxViscosityRatio; - int methodFlowScaling; - double maxAbsoluteRate; - ICDStatus status; - double scalingFactor; - - unpack(strength, buffer, position, comm); - unpack(length, buffer, position, comm); - unpack(densityCalibration, buffer, position, comm); - unpack(viscosityCalibration, buffer, position, comm); - unpack(criticalValue, buffer, position, comm); - unpack(widthTransitionRegion, buffer, position, comm); - unpack(maxViscosityRatio, buffer, position, comm); - unpack(methodFlowScaling, buffer, position, comm); - unpack(maxAbsoluteRate, buffer, position, comm); - unpack(status, buffer, position, comm); - unpack(scalingFactor, buffer, position, comm); - - data = SpiralICD(strength, length, densityCalibration, - viscosityCalibration, criticalValue, - widthTransitionRegion, maxViscosityRatio, - methodFlowScaling, maxAbsoluteRate, - status, scalingFactor); -} - void unpack(Valve& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -1740,7 +1675,6 @@ template void unpack(std::shared_ptr<__VA_ARGS__>& data, \ std::vector& buffer, int& position, \ Dune::MPIHelper::MPICommunicator comm); -INSTANTIATE_PACK_SHARED_PTR(SpiralICD) INSTANTIATE_PACK_SHARED_PTR(VFPInjTable) INSTANTIATE_PACK_SHARED_PTR(Well) #undef INSTANTIATE_PACK_SHARED_PTR diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index ec4f86e69..5ee784c05 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -45,7 +45,6 @@ namespace Opm class Dimension; template class IOrderSet; class Segment; -class SpiralICD; class UDAValue; class UnitSystem; class Valve; @@ -376,7 +375,6 @@ ADD_PACK_PROTOTYPES(Group::GroupProductionProperties) ADD_PACK_PROTOTYPES(RestartKey) ADD_PACK_PROTOTYPES(RestartValue) ADD_PACK_PROTOTYPES(Segment) -ADD_PACK_PROTOTYPES(SpiralICD) ADD_PACK_PROTOTYPES(std::string) ADD_PACK_PROTOTYPES(UDAValue) ADD_PACK_PROTOTYPES(UnitSystem) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 457fa8703..0e83a8246 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -1509,7 +1509,7 @@ BOOST_AUTO_TEST_CASE(SpiralICD) #ifdef HAVE_MPI Opm::SpiralICD val1(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8, 9.0, Opm::ICDStatus::OPEN, 10.0); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(SpiralICD) #endif }