remove old serialization support for Connection

This commit is contained in:
Arne Morten Kvarving 2020-03-18 09:29:02 +01:00
parent 1a4f8f861f
commit 8cd3d3c9b9
3 changed files with 1 additions and 105 deletions

View File

@ -32,7 +32,6 @@
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Connection.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.hpp>
#include <opm/parser/eclipse/EclipseState/Util/IOrderSet.hpp>
#include <dune/common/parallel/mpitraits.hh>
@ -349,32 +348,6 @@ std::size_t packSize(const UDAValue& data,
packSize(data.get<std::string>(), 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<std::string>(), buffer, position, comm);
}
void pack(const Connection& data,
std::vector<char>& 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<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
@ -1536,54 +1482,6 @@ void unpack(UDAValue& data,
}
}
void unpack(Connection& data,
std::vector<char>& 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<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)

View File

@ -42,7 +42,6 @@
namespace Opm
{
class Connection;
class Dimension;
template<class T> class IOrderSet;
class Segment;
@ -363,7 +362,6 @@ void unpack(char* str, std::size_t length, std::vector<char>& buffer, int& posit
void unpack(T& data, std::vector<char>& 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)

View File

@ -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
}