From 0dfdb2985175d734bc59bff62dc7e04651f3435a Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Fri, 13 Mar 2020 10:21:26 +0100 Subject: [PATCH] remove old serialization support for FoamConfig, FoamData --- opm/simulators/utils/ParallelRestart.cpp | 67 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 4 -- tests/test_ParallelRestart.cpp | 4 +- 3 files changed, 2 insertions(+), 73 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 3a2a3261a..d88f92949 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -540,13 +539,6 @@ std::size_t packSize(const TableContainer& data, Dune::MPIHelper::MPICommunicato return res; } -std::size_t packSize(const FoamConfig& data, Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.records(), comm) + - packSize(data.getTransportPhase(), comm) + - packSize(data.getMobilityModel(), comm); -} - std::size_t packSize(const InitConfig& data, Dune::MPIHelper::MPICommunicator comm) { return packSize(data.getEquil(), comm) + @@ -1441,16 +1433,6 @@ std::size_t packSize(const PvtwsaltTable& data, packSize(data.getTableValues(), comm); } -std::size_t packSize(const FoamData& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.referenceSurfactantConcentration(), comm) + - packSize(data.exponent(), comm) + - packSize(data.minimumSurfactantConcentration(), comm) + - packSize(data.allowDesorption(), comm) + - packSize(data.rockDensity(), comm); -} - std::size_t packSize(const RestartSchedule& data, Dune::MPIHelper::MPICommunicator comm) { @@ -1981,14 +1963,6 @@ void pack(const TableContainer& data, std::vector& buffer, int& position, } } -void pack(const FoamConfig& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.records(), buffer, position, comm); - pack(data.getTransportPhase(), buffer, position, comm); - pack(data.getMobilityModel(), buffer, position, comm); -} - void pack(const InitConfig& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { @@ -2910,17 +2884,6 @@ void pack(const PvtwsaltTable& data, pack(data.getTableValues(), buffer, position, comm); } -void pack(const FoamData& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.referenceSurfactantConcentration(), buffer, position, comm); - pack(data.exponent(), buffer, position, comm); - pack(data.minimumSurfactantConcentration(), buffer, position, comm); - pack(data.allowDesorption(), buffer, position, comm); - pack(data.rockDensity(), buffer, position, comm); -} - void pack(const RestartSchedule& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -3566,18 +3529,6 @@ void unpack(TableContainer& data, std::vector& buffer, int& position, } } -void unpack(FoamConfig& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - std::vector records; - Phase transport_phase; - FoamConfig::MobilityModel mobility_model; - unpack(records, buffer, position, comm); - unpack(transport_phase, buffer, position, comm); - unpack(mobility_model, buffer, position, comm); - data = FoamConfig(records, transport_phase, mobility_model); -} - void unpack(InitConfig& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { @@ -4973,24 +4924,6 @@ void unpack(PvtwsaltTable& data, std::vector& buffer, int& position, data = PvtwsaltTable(refPressValue, refSaltConValue, tableValues); } -void unpack(FoamData& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - double referenceSurfactantConcentration, exponent; - double minimumSurfactantConcentration; - bool allowDesorption; - double rockDensity; - - unpack(referenceSurfactantConcentration, buffer, position, comm); - unpack(exponent, buffer, position, comm); - unpack(minimumSurfactantConcentration, buffer, position, comm); - unpack(allowDesorption, buffer, position, comm); - unpack(rockDensity, buffer, position, comm); - data = FoamData(referenceSurfactantConcentration, exponent, - minimumSurfactantConcentration, allowDesorption, rockDensity); -} - void unpack(RestartSchedule& 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 586c3331d..1fffec738 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -80,8 +80,6 @@ class EclipseConfig; class Eqldims; class EndpointScaling; class Events; -class FoamConfig; -class FoamData; class InitConfig; class IOConfig; template class IOrderSet; @@ -519,8 +517,6 @@ ADD_PACK_PROTOTYPES(EclipseConfig) ADD_PACK_PROTOTYPES(EndpointScaling) ADD_PACK_PROTOTYPES(Eqldims) ADD_PACK_PROTOTYPES(Events) -ADD_PACK_PROTOTYPES(FoamConfig) -ADD_PACK_PROTOTYPES(FoamData) ADD_PACK_PROTOTYPES(GConSale) ADD_PACK_PROTOTYPES(GConSale::GCONSALEGroup) ADD_PACK_PROTOTYPES(GConSump) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 00269e5be..10cc15002 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -813,7 +813,7 @@ BOOST_AUTO_TEST_CASE(FoamData) { #if HAVE_MPI Opm::FoamData val1 = getFoamData(); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(FoamData) #endif } @@ -823,7 +823,7 @@ BOOST_AUTO_TEST_CASE(FoamConfig) { #if HAVE_MPI Opm::FoamConfig val1 = getFoamConfig(); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(FoamConfig) #endif }