From cfe091ce1eaf5da898aaeea0ddb220320f483170 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 17 Mar 2020 10:07:46 +0100 Subject: [PATCH] remove old serialization support for PolyInjTable, SkprwatTable, PlymwinjTable --- opm/simulators/utils/ParallelRestart.cpp | 67 ------------------------ opm/simulators/utils/ParallelRestart.hpp | 6 --- tests/test_ParallelRestart.cpp | 4 +- 3 files changed, 2 insertions(+), 75 deletions(-) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index a9cadfee1..ac27c00b6 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -54,8 +54,6 @@ #include #include #include -#include -#include #include #include #include @@ -64,7 +62,6 @@ #include #include #include -#include #include #include #include @@ -440,30 +437,12 @@ std::size_t packSize(const PvtoTable& data, Dune::MPIHelper::MPICommunicator com return packSize(static_cast(data), comm); } -std::size_t packSize(const PolyInjTable& data, Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.getThroughputs(), comm) + - packSize(data.getVelocities(), comm) + - packSize(data.getTableNumber(), comm) + - packSize(data.getTableData(), comm); -} - -std::size_t packSize(const PlymwinjTable& data, Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(static_cast(data), comm); -} - std::size_t packSize(const SkprpolyTable& data, Dune::MPIHelper::MPICommunicator comm) { return packSize(static_cast(data), comm) + packSize(data.referenceConcentration(), comm); } -std::size_t packSize(const SkprwatTable& data, Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(static_cast(data), comm); -} - namespace { struct SplitSimpleTables { @@ -1551,21 +1530,6 @@ void pack(const PvtoTable& data, std::vector& buffer, int& position, pack(static_cast(data), buffer, position, comm); } -void pack(const PolyInjTable& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.getThroughputs(), buffer, position, comm); - pack(data.getVelocities(), buffer, position, comm); - pack(data.getTableNumber(), buffer, position, comm); - pack(data.getTableData(), buffer, position, comm); -} - -void pack(const PlymwinjTable& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(static_cast(data), buffer, position, comm); -} - void pack(const SkprpolyTable& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { @@ -1573,12 +1537,6 @@ void pack(const SkprpolyTable& data, std::vector& buffer, int& position, pack(data.referenceConcentration(), buffer, position, comm); } -void pack(const SkprwatTable& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(static_cast(data), buffer, position, comm); -} - void pack(const TableManager& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { @@ -2727,25 +2685,6 @@ void unpack(PvtoTable& data, std::vector& buffer, int& position, unpack_pvt(data, buffer, position, comm); } -void unpack(PolyInjTable& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - std::vector throughputs, velocities; - int tableNumber; - std::vector> tableData; - unpack(throughputs, buffer, position, comm); - unpack(velocities, buffer, position, comm); - unpack(tableNumber, buffer, position, comm); - unpack(tableData, buffer, position, comm); - data = PolyInjTable(throughputs, velocities, tableNumber, tableData); -} - -void unpack(PlymwinjTable& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - unpack(static_cast(data), buffer, position, comm); -} - void unpack(SkprpolyTable& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) { @@ -2755,12 +2694,6 @@ void unpack(SkprpolyTable& data, std::vector& buffer, int& position, data.setReferenceConcentration(refConcentration); } -void unpack(SkprwatTable& data, std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - unpack(static_cast(data), buffer, position, comm); -} - void unpack(TableManager& 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 e999f2d67..54d8ea84e 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -68,10 +68,8 @@ class Location; class MessageLimits; class MLimits; class OilVaporizationProperties; -class PlymwinjTable; class PlyvmhRecord; class PlyvmhTable; -class PolyInjTable; class PvtgTable; class PvtoTable; class PvtwsaltTable; @@ -85,7 +83,6 @@ class Rock2dtrTable; class Segment; class SimpleTable; class SkprpolyTable; -class SkprwatTable; class SolventDensityTable; class SpiralICD; class StandardCond; @@ -466,10 +463,8 @@ ADD_PACK_PROTOTYPES(Location) ADD_PACK_PROTOTYPES(MessageLimits) ADD_PACK_PROTOTYPES(MLimits) ADD_PACK_PROTOTYPES(OilVaporizationProperties) -ADD_PACK_PROTOTYPES(PlymwinjTable) ADD_PACK_PROTOTYPES(PlyvmhRecord) ADD_PACK_PROTOTYPES(PlyvmhTable) -ADD_PACK_PROTOTYPES(PolyInjTable) ADD_PACK_PROTOTYPES(PvtgTable) ADD_PACK_PROTOTYPES(PvtoTable) ADD_PACK_PROTOTYPES(PvtwsaltTable) @@ -485,7 +480,6 @@ ADD_PACK_PROTOTYPES(RocktabTable) ADD_PACK_PROTOTYPES(Segment) ADD_PACK_PROTOTYPES(SimpleTable) ADD_PACK_PROTOTYPES(SkprpolyTable) -ADD_PACK_PROTOTYPES(SkprwatTable) ADD_PACK_PROTOTYPES(SolventDensityTable) ADD_PACK_PROTOTYPES(SpiralICD) ADD_PACK_PROTOTYPES(std::string) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 3804d78b2..ebbd2d901 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -1142,7 +1142,7 @@ BOOST_AUTO_TEST_CASE(PlymwinjTable) { #if HAVE_MPI Opm::PlymwinjTable val1({1.0}, {2.0}, 1, {{1.0}, {2.0}}); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(PlymwinjTable) #endif } @@ -1162,7 +1162,7 @@ BOOST_AUTO_TEST_CASE(SkprwatTable) { #if HAVE_MPI Opm::SkprwatTable val1({1.0}, {2.0}, 1, {{1.0}, {2.0}}); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(SkprwatTable) #endif }