diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 876bc2bca..ce58843e2 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -349,32 +348,6 @@ std::size_t packSize(const UDAValue& data, packSize(data.get(), comm)); } -std::size_t packSize(const Connection& data, - Dune::MPIHelper::MPICommunicator comm) -{ - return packSize(data.dir(), comm) + - packSize(data.depth(), comm) + - packSize(data.state(), comm) + - packSize(data.satTableId(), comm) + - packSize(data.complnum(), comm) + - packSize(data.CF(), comm) + - packSize(data.Kh(), comm) + - packSize(data.rw(), comm) + - packSize(data.r0(), comm) + - packSize(data.skinFactor(), comm) + - packSize(data.getI(), comm) + - packSize(data.getJ(), comm) + - packSize(data.getK(), comm) + - packSize(data.kind(), comm) + - packSize(data.getSeqIndex(), comm) + - packSize(data.getSegDistStart(), comm) + - packSize(data.getSegDistEnd(), comm) + - packSize(data.getDefaultSatTabId(), comm) + - packSize(data.getCompSegSeqIndex(), comm) + - packSize(data.segment(), comm) + - packSize(data.wellPi(), comm); -} - std::size_t packSize(const Well::WellInjectionProperties& data, Dune::MPIHelper::MPICommunicator comm) { @@ -915,33 +888,6 @@ void pack(const UDAValue& data, pack(data.get(), buffer, position, comm); } -void pack(const Connection& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - pack(data.dir(), buffer, position, comm); - pack(data.depth(), buffer, position, comm); - pack(data.state(), buffer, position, comm); - pack(data.satTableId(), buffer, position, comm); - pack(data.complnum(), buffer, position, comm); - pack(data.CF(), buffer, position, comm); - pack(data.Kh(), buffer, position, comm); - pack(data.rw(), buffer, position, comm); - pack(data.r0(), buffer, position, comm); - pack(data.skinFactor(), buffer, position, comm); - pack(data.getI(), buffer, position, comm); - pack(data.getJ(), buffer, position, comm); - pack(data.getK(), buffer, position, comm); - pack(data.kind(), buffer, position, comm); - pack(data.getSeqIndex(), buffer, position, comm); - pack(data.getSegDistStart(), buffer, position, comm); - pack(data.getSegDistEnd(), buffer, position, comm); - pack(data.getDefaultSatTabId(), buffer, position, comm); - pack(data.getCompSegSeqIndex(), buffer, position, comm); - pack(data.segment(), buffer, position, comm); - pack(data.wellPi(), buffer, position, comm); -} - void pack(const Well::WellInjectionProperties& data, std::vector& buffer, int& position, Dune::MPIHelper::MPICommunicator comm) @@ -1536,54 +1482,6 @@ void unpack(UDAValue& data, } } -void unpack(Connection& data, - std::vector& buffer, int& position, - Dune::MPIHelper::MPICommunicator comm) -{ - Connection::Direction dir; - double depth; - Connection::State state; - int satTableId, complnum; - double CF, Kh, rw, r0, skinFactor; - int I, J, K; - size_t seqIndex; - double segDistStart, segDistEnd; - bool defaultSatTabId; - size_t compSegSeqIndex; - int segment; - double wellPi; - Connection::CTFKind kind; - - unpack(dir, buffer, position, comm); - unpack(depth, buffer, position, comm); - unpack(state, buffer, position, comm); - unpack(satTableId, buffer, position, comm); - unpack(complnum, buffer, position, comm); - unpack(CF, buffer, position, comm); - unpack(Kh, buffer, position, comm); - unpack(rw, buffer, position, comm); - unpack(r0, buffer, position, comm); - unpack(skinFactor, buffer, position, comm); - unpack(I, buffer, position, comm); - unpack(J, buffer, position, comm); - unpack(K, buffer, position, comm); - unpack(kind, buffer, position, comm); - unpack(seqIndex, buffer, position, comm); - unpack(segDistStart, buffer, position, comm); - unpack(segDistEnd, buffer, position, comm); - unpack(defaultSatTabId, buffer, position, comm); - unpack(compSegSeqIndex, buffer, position, comm); - unpack(segment, buffer, position, comm); - unpack(wellPi, buffer, position, comm); - - data = Connection(dir, depth, state, satTableId, - complnum, CF, Kh, rw, r0, - skinFactor, {I,J,K}, kind, seqIndex, - segDistStart, segDistEnd, - defaultSatTabId, compSegSeqIndex, - segment, wellPi); -} - void unpack(Well::WellInjectionProperties& 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 ef2485d47..288ef5472 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -42,7 +42,6 @@ namespace Opm { -class Connection; class Dimension; template class IOrderSet; class Segment; @@ -363,7 +362,6 @@ void unpack(char* str, std::size_t length, std::vector& buffer, int& posit void unpack(T& data, std::vector& buffer, int& position, \ Dune::MPIHelper::MPICommunicator comm); -ADD_PACK_PROTOTYPES(Connection) ADD_PACK_PROTOTYPES(data::CellData) ADD_PACK_PROTOTYPES(data::Connection) ADD_PACK_PROTOTYPES(data::CurrentControl) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index b93e804e2..2af71705e 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -1411,7 +1411,7 @@ BOOST_AUTO_TEST_CASE(Connection) {9, 10, 11}, Opm::Connection::CTFKind::Defaulted, 12, 13.0, 14.0, true, 15, 16, 17.0); - auto val2 = PackUnpack(val1); + auto val2 = PackUnpack2(val1); DO_CHECKS(Connection) #endif }