From fa3cccdd64901ee6cc413eaa1b35824ad40a393a Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Thu, 12 Mar 2020 15:57:20 +0100 Subject: [PATCH] remove old serialization support for SimulationConfig --- opm/simulators/utils/ParallelRestart.cpp | 41 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 2 -- tests/test_ParallelRestart.cpp | 2 +- 3 files changed, 1 insertion(+), 44 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 5ee1bb5bb..a15f82947 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -66,7 +66,6 @@ #include #include #include -#include #include #include #include @@ -570,17 +569,6 @@ std::size_t packSize(const InitConfig& data, Dune::MPIHelper::MPICommunicator co packSize(data.getRestartRootName(), comm); } -std::size_t packSize(const SimulationConfig& data, Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.getThresholdPressure(), comm) + - packSize(data.bcconfig(), comm) + - packSize(data.rock_config(), comm) + - packSize(data.useCPR(), comm) + - packSize(data.hasDISGAS(), comm) + - packSize(data.hasVAPOIL(), comm) + - packSize(data.isThermal(), comm); -} - std::size_t packSize(const TimeMap& data, Dune::MPIHelper::MPICommunicator comm) { return packSize(data.timeList(), comm); @@ -2095,18 +2083,6 @@ void pack(const InitConfig& data, std::vector& buffer, int& position, pack(data.getRestartRootName(), buffer, position, comm); } -void pack(const SimulationConfig& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.getThresholdPressure(), buffer, position, comm); - pack(data.bcconfig(), buffer, position, comm); - pack(data.rock_config(), buffer, position, comm); - pack(data.useCPR(), buffer, position, comm); - pack(data.hasDISGAS(), buffer, position, comm); - pack(data.hasVAPOIL(), buffer, position, comm); - pack(data.isThermal(), buffer, position, comm); -} - void pack(const TimeMap& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { @@ -3783,23 +3759,6 @@ void unpack(InitConfig& data, std::vector& buffer, int& position, restartRequested, restartStep, restartRootName); } -void unpack(SimulationConfig& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - ThresholdPressure thresholdPressure; - BCConfig bc; - RockConfig rock_config; - bool useCPR, DISGAS, VAPOIL, isThermal; - unpack(thresholdPressure, buffer, position, comm); - unpack(bc, buffer, position, comm); - unpack(rock_config, buffer, position, comm); - unpack(useCPR, buffer, position, comm); - unpack(DISGAS, buffer, position, comm); - unpack(VAPOIL, buffer, position, comm); - unpack(isThermal, buffer, position, comm); - data = SimulationConfig(thresholdPressure, bc, rock_config, useCPR, DISGAS, VAPOIL, isThermal); -} - void unpack(TimeMap& 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 8c10567ba..508395707 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -125,7 +125,6 @@ class Runspec; class Segment; class ShrateRecord; class ShrateTable; -class SimulationConfig; class SimpleTable; class SkprpolyTable; class SkprwatTable; @@ -585,7 +584,6 @@ ADD_PACK_PROTOTYPES(Runspec) ADD_PACK_PROTOTYPES(Segment) ADD_PACK_PROTOTYPES(ShrateRecord) ADD_PACK_PROTOTYPES(ShrateTable) -ADD_PACK_PROTOTYPES(SimulationConfig) ADD_PACK_PROTOTYPES(SimpleTable) ADD_PACK_PROTOTYPES(SkprpolyTable) ADD_PACK_PROTOTYPES(SkprwatTable) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index a8cef66b0..a07993113 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -845,7 +845,7 @@ BOOST_AUTO_TEST_CASE(SimulationConfig) { #if HAVE_MPI Opm::SimulationConfig val1(getThresholdPressure(), getBCConfig(), getRockConfig(), false, true, false, true); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(SimulationConfig) #endif }