get rid of unused serialization methods

This commit is contained in:
Arne Morten Kvarving 2020-03-09 11:05:18 +01:00
parent 51ee5205cb
commit 4ae82687cc
3 changed files with 13 additions and 116 deletions

View File

@ -23,11 +23,14 @@
#include "ParallelRestart.hpp"
#include <opm/common/OpmLog/Location.hpp>
#include <opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp>
#include <opm/material/fluidmatrixinteractions/EclTwoPhaseMaterialParams.hpp>
#include <opm/material/fluidmatrixinteractions/EclMultiplexerMaterialParams.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/Grid/MULTREGTScanner.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/TransMult.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>
@ -946,33 +949,6 @@ template
std::size_t packSize(const std::map<Phase,Group::GroupInjectionProperties>& data,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
std::size_t packSize(const EclEpsScalingPointsInfo<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.Swl, comm) +
packSize(data.Sgl, comm) +
packSize(data.Sowl, comm) +
packSize(data.Sogl, comm) +
packSize(data.krCriticalEps, comm) +
packSize(data.Swcr, comm) +
packSize(data.Sgcr, comm) +
packSize(data.Sowcr, comm) +
packSize(data.Sogcr, comm) +
packSize(data.Swu, comm) +
packSize(data.Sgu, comm) +
packSize(data.Sowu, comm) +
packSize(data.Sogu, comm) +
packSize(data.maxPcow, comm) +
packSize(data.maxPcgo, comm) +
packSize(data.pcowLeverettFactor, comm) +
packSize(data.pcgoLeverettFactor, comm) +
packSize(data.maxKrw, comm) +
packSize(data.maxKrow, comm) +
packSize(data.maxKrog, comm) +
packSize(data.maxKrg, comm);
}
std::size_t packSize(const OilVaporizationProperties& data,
Dune::MPIHelper::MPICommunicator comm)
{
@ -3524,33 +3500,6 @@ void pack(const FaultCollection& data,
pack(data.getFaults(), buffer, position, comm);
}
template<class Scalar>
void pack(const EclEpsScalingPointsInfo<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm)
{
pack(data.Swl, buffer, position, comm);
pack(data.Sgl, buffer, position, comm);
pack(data.Sowl, buffer, position, comm);
pack(data.Sogl, buffer, position, comm);
pack(data.krCriticalEps, buffer, position, comm);
pack(data.Swcr, buffer, position, comm);
pack(data.Sgcr, buffer, position, comm);
pack(data.Sowcr, buffer, position, comm);
pack(data.Sogcr, buffer, position, comm);
pack(data.Swu, buffer, position, comm);
pack(data.Sgu, buffer, position, comm);
pack(data.Sowu, buffer, position, comm);
pack(data.Sogu, buffer, position, comm);
pack(data.maxPcow, buffer, position, comm);
pack(data.maxPcgo, buffer, position, comm);
pack(data.pcowLeverettFactor, buffer, position, comm);
pack(data.pcgoLeverettFactor, buffer, position, comm);
pack(data.maxKrw, buffer, position, comm);
pack(data.maxKrow, buffer, position, comm);
pack(data.maxKrog, buffer, position, comm);
pack(data.maxKrg, buffer, position, comm);
}
void pack(const SolventDensityTable& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
@ -3810,33 +3759,6 @@ void unpack(DynamicVector<T>& data, std::vector<char>& buffer, int& position,
data = DynamicVector<T>(ddata);
}
template<class Scalar>
void unpack(EclEpsScalingPointsInfo<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm)
{
unpack(data.Swl, buffer, position, comm);
unpack(data.Sgl, buffer, position, comm);
unpack(data.Sowl, buffer, position, comm);
unpack(data.Sogl, buffer, position, comm);
unpack(data.krCriticalEps, buffer, position, comm);
unpack(data.Swcr, buffer, position, comm);
unpack(data.Sgcr, buffer, position, comm);
unpack(data.Sowcr, buffer, position, comm);
unpack(data.Sogcr, buffer, position, comm);
unpack(data.Swu, buffer, position, comm);
unpack(data.Sgu, buffer, position, comm);
unpack(data.Sowu, buffer, position, comm);
unpack(data.Sogu, buffer, position, comm);
unpack(data.maxPcow, buffer, position, comm);
unpack(data.maxPcgo, buffer, position, comm);
unpack(data.pcowLeverettFactor, buffer, position, comm);
unpack(data.pcgoLeverettFactor, buffer, position, comm);
unpack(data.maxKrw, buffer, position, comm);
unpack(data.maxKrow, buffer, position, comm);
unpack(data.maxKrog, buffer, position, comm);
unpack(data.maxKrg, buffer, position, comm);
}
void unpack(char* str, std::size_t length, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
@ -6107,7 +6029,6 @@ INSTANTIATE_PACK_VECTOR(bool)
INSTANTIATE_PACK_VECTOR(char)
INSTANTIATE_PACK_VECTOR(int)
INSTANTIATE_PACK_VECTOR(std::array<double, 3>)
INSTANTIATE_PACK_VECTOR(EclEpsScalingPointsInfo<double>)
#undef INSTANTIATE_PACK_VECTOR
#define INSTANTIATE_PACK_SHARED_PTR(...) \
@ -6140,9 +6061,6 @@ INSTANTIATE_PACK(int)
INSTANTIATE_PACK(std::array<short,3>)
INSTANTIATE_PACK(std::array<bool,3>)
INSTANTIATE_PACK(unsigned char)
INSTANTIATE_PACK(EclEpsScalingPointsInfo<double>)
INSTANTIATE_PACK(EclTwoPhaseApproach)
INSTANTIATE_PACK(EclMultiplexerApproach)
#undef INSTANTIATE_PACK
} // end namespace Mpi

View File

@ -80,7 +80,6 @@ class Dimension;
class EclHysterConfig;
class EclipseConfig;
class Eqldims;
template<class Scalar> struct EclEpsScalingPointsInfo;
class EDITNNC;
class EndpointScaling;
class Equil;
@ -257,10 +256,6 @@ std::size_t packSize(const DynamicState<T>& data, Dune::MPIHelper::MPICommunicat
template<class T>
std::size_t packSize(const IOrderSet<T>& data, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
std::size_t packSize(const EclEpsScalingPointsInfo<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm);
////// pack routines
template<class T>
@ -350,10 +345,6 @@ template<class T>
void pack(const IOrderSet<T>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void pack(const EclEpsScalingPointsInfo<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
void pack(const char* str, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
@ -446,10 +437,6 @@ template<class T>
void unpack(IOrderSet<T>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void unpack(EclEpsScalingPointsInfo<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
void unpack(char* str, std::size_t length, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);

View File

@ -25,16 +25,21 @@
#include <boost/test/unit_test.hpp>
#include <opm/common/OpmLog/Location.hpp>
#include <opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/EclipseState/Aquancon.hpp>
#include <opm/parser/eclipse/EclipseState/AquiferCT.hpp>
#include <opm/parser/eclipse/EclipseState/Aquifetp.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
#include <opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/FaceDir.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/Grid/MULTREGTScanner.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/TransMult.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>
@ -2318,19 +2323,6 @@ BOOST_AUTO_TEST_CASE(FaultCollection)
}
BOOST_AUTO_TEST_CASE(EclEpsScalingPointsInfo)
{
#ifdef HAVE_MPI
Opm::EclEpsScalingPointsInfo<double> val1{ 1.0, 2.0, 3.0, 4.0, 5.0,
6.0, 7.0, 8.0, 9.0, 10.0,
11.0, 12.0, 13.0, 14.0, 15.0,
16.0, 17.0, 18.0, 19.0, 20.0, 21};
auto val2 = PackUnpack(val1);
DO_CHECKS(EclEpsScalingPointsInfo<double>)
#endif
}
BOOST_AUTO_TEST_CASE(SolventDensityTable)
{
#ifdef HAVE_MPI