remove old serialization support for Fault, FaultCollection, FaultFace

This commit is contained in:
Arne Morten Kvarving 2020-03-13 08:53:26 +01:00
parent 0212c5e9be
commit d342ef5c5c
3 changed files with 3 additions and 93 deletions

View File

@ -25,9 +25,6 @@
#include <opm/common/OpmLog/Location.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/Fault.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FaultCollection.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FaultFace.hpp>
#include <opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp>
#include <opm/parser/eclipse/EclipseState/InitConfig/FoamConfig.hpp>
#include <opm/parser/eclipse/EclipseState/InitConfig/InitConfig.hpp>
@ -1554,27 +1551,6 @@ std::size_t packSize(const EclipseConfig& data,
packSize(data.io(), comm);
}
std::size_t packSize(const FaultFace& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.getIndices(), comm) +
packSize(data.getDir(), comm);
}
std::size_t packSize(const Fault& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.getName(), comm) +
packSize(data.getTransMult(), comm) +
packSize(data.getFaceList(), comm);
}
std::size_t packSize(const FaultCollection& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.getFaults(), comm);
}
std::size_t packSize(const SolventDensityTable& data,
Dune::MPIHelper::MPICommunicator comm)
{
@ -3075,30 +3051,6 @@ void pack(const EclipseConfig& data,
pack(data.io(), buffer, position, comm);
}
void pack(const FaultFace& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.getIndices(), buffer, position, comm);
pack(data.getDir(), buffer, position, comm);
}
void pack(const Fault& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.getName(), buffer, position, comm);
pack(data.getTransMult(), buffer, position, comm);
pack(data.getFaceList(), buffer, position, comm);
}
void pack(const FaultCollection& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.getFaults(), buffer, position, comm);
}
void pack(const SolventDensityTable& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
@ -5222,42 +5174,6 @@ void unpack(EclipseConfig& data,
data = EclipseConfig(init, io);
}
void unpack(FaultFace& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<size_t> indices;
FaceDir::DirEnum dir;
unpack(indices, buffer, position, comm);
unpack(dir, buffer, position, comm);
data = FaultFace(indices, dir);
}
void unpack(Fault& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::string name;
double transMult;
std::vector<FaultFace> faceList;
unpack(name, buffer, position, comm);
unpack(transMult, buffer, position, comm);
unpack(faceList, buffer, position, comm);
data = Fault(name, transMult, faceList);
}
void unpack(FaultCollection& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
OrderedMap<std::string, Fault> faults;
unpack(faults, buffer, position, comm);
data = FaultCollection(faults);
}
void unpack(SolventDensityTable& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{

View File

@ -82,9 +82,6 @@ class EndpointScaling;
class Equil;
class EquilRecord;
class Events;
class Fault;
class FaultCollection;
class FaultFace;
class FoamConfig;
class FoamData;
class InitConfig;
@ -526,9 +523,6 @@ ADD_PACK_PROTOTYPES(Equil)
ADD_PACK_PROTOTYPES(Eqldims)
ADD_PACK_PROTOTYPES(EquilRecord)
ADD_PACK_PROTOTYPES(Events)
ADD_PACK_PROTOTYPES(Fault)
ADD_PACK_PROTOTYPES(FaultCollection)
ADD_PACK_PROTOTYPES(FaultFace)
ADD_PACK_PROTOTYPES(FoamConfig)
ADD_PACK_PROTOTYPES(FoamData)
ADD_PACK_PROTOTYPES(GConSale)

View File

@ -2300,7 +2300,7 @@ BOOST_AUTO_TEST_CASE(FaultFace)
{
#ifdef HAVE_MPI
Opm::FaultFace val1({1,2,3,4,5,6}, Opm::FaceDir::YPlus);
auto val2 = PackUnpack(val1);
auto val2 = PackUnpack2(val1);
DO_CHECKS(FaultFace)
#endif
}
@ -2310,7 +2310,7 @@ BOOST_AUTO_TEST_CASE(Fault)
{
#ifdef HAVE_MPI
Opm::Fault val1("test", 1.0, {{{1,2,3,4,5,6}, Opm::FaceDir::YPlus}});
auto val2 = PackUnpack(val1);
auto val2 = PackUnpack2(val1);
DO_CHECKS(Fault)
#endif
}
@ -2340,7 +2340,7 @@ BOOST_AUTO_TEST_CASE(FaultCollection)
Opm::OrderedMap<std::string, Opm::Fault> faults;
faults.insert({"test2", fault});
Opm::FaultCollection val1(faults);
auto val2 = PackUnpack(val1);
auto val2 = PackUnpack2(val1);
DO_CHECKS(FaultCollection)
#endif
}