mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove unused serialization methods
This commit is contained in:
@@ -889,39 +889,10 @@ std::size_t packSize(const TableManager& data, Dune::MPIHelper::MPICommunicator
|
||||
packSize(data.rtemp(), comm);
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
std::size_t packSize(const Tabulated1DFunction<Scalar>& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.xValues(), comm) +
|
||||
packSize(data.yValues(), comm);
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
std::size_t packSize(const IntervalTabulated2DFunction<Scalar>& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.xPos(), comm) +
|
||||
packSize(data.yPos(), comm) +
|
||||
packSize(data.samples(), comm) +
|
||||
packSize(data.xExtrapolate(), comm) +
|
||||
packSize(data.yExtrapolate(), comm);
|
||||
}
|
||||
|
||||
template
|
||||
std::size_t packSize(const std::map<Phase,Group::GroupInjectionProperties>& data,
|
||||
Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
template<class Scalar>
|
||||
std::size_t packSize(const UniformXTabulated2DFunction<Scalar>& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.xPos(), comm) +
|
||||
packSize(data.yPos(), comm) +
|
||||
packSize(data.samples(), comm) +
|
||||
packSize(data.interpolationGuide(), comm);
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
std::size_t packSize(const EclEpsScalingPointsInfo<Scalar>& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
@@ -2543,35 +2514,6 @@ void pack(const TableManager& data, std::vector<char>& buffer, int& position,
|
||||
pack(data.rtemp(), buffer, position, comm);
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
void pack(const Tabulated1DFunction<Scalar>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.xValues(), buffer, position, comm);
|
||||
pack(data.yValues(), buffer, position, comm);
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
void pack(const IntervalTabulated2DFunction<Scalar>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.xPos(), buffer, position, comm);
|
||||
pack(data.yPos(), buffer, position, comm);
|
||||
pack(data.samples(), buffer, position, comm);
|
||||
pack(data.xExtrapolate(), buffer, position, comm);
|
||||
pack(data.yExtrapolate(), buffer, position, comm);
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
void pack(const UniformXTabulated2DFunction<Scalar>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.xPos(), buffer, position, comm);
|
||||
pack(data.yPos(), buffer, position, comm);
|
||||
pack(data.samples(), buffer, position, comm);
|
||||
pack(data.interpolationGuide(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const OilVaporizationProperties& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
@@ -4535,47 +4477,6 @@ void unpack(TableManager& data, std::vector<char>& buffer, int& position,
|
||||
watDenT, stcond, gas_comp_index, rtemp);
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
void unpack(Tabulated1DFunction<Scalar>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
std::vector<Scalar> xValues, yValues;
|
||||
unpack(xValues, buffer, position, comm);
|
||||
unpack(yValues, buffer, position, comm);
|
||||
data = Tabulated1DFunction<Scalar>(xValues, yValues, false);
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
void unpack(IntervalTabulated2DFunction<Scalar>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
std::vector<Scalar> xPos, yPos;
|
||||
std::vector<std::vector<Scalar>> samples;
|
||||
bool xExtrapolate, yExtrapolate;
|
||||
unpack(xPos, buffer, position, comm);
|
||||
unpack(yPos, buffer, position, comm);
|
||||
unpack(samples, buffer, position, comm);
|
||||
unpack(xExtrapolate, buffer, position, comm);
|
||||
unpack(yExtrapolate, buffer, position, comm);
|
||||
data = IntervalTabulated2DFunction<Scalar>(xPos, yPos, samples,
|
||||
xExtrapolate, yExtrapolate);
|
||||
}
|
||||
|
||||
template<class Scalar>
|
||||
void unpack(UniformXTabulated2DFunction<Scalar>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
std::vector<Scalar> xPos, yPos;
|
||||
std::vector<std::vector<typename UniformXTabulated2DFunction<Scalar>::SamplePoint>> samples;
|
||||
typename UniformXTabulated2DFunction<Scalar>::InterpolationPolicy interpolationGuide;
|
||||
unpack(xPos, buffer, position, comm);
|
||||
unpack(yPos, buffer, position, comm);
|
||||
unpack(samples, buffer, position, comm);
|
||||
unpack(interpolationGuide, buffer, position, comm);
|
||||
data = UniformXTabulated2DFunction<Scalar>(xPos, yPos, samples,
|
||||
interpolationGuide);
|
||||
}
|
||||
|
||||
void unpack(OilVaporizationProperties& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
@@ -6022,10 +5923,8 @@ INSTANTIATE_PACK_VECTOR(std::vector<double>)
|
||||
INSTANTIATE_PACK_VECTOR(bool)
|
||||
INSTANTIATE_PACK_VECTOR(char)
|
||||
INSTANTIATE_PACK_VECTOR(int)
|
||||
INSTANTIATE_PACK_VECTOR(Tabulated1DFunction<double>)
|
||||
INSTANTIATE_PACK_VECTOR(std::array<double, 3>)
|
||||
INSTANTIATE_PACK_VECTOR(EclEpsScalingPointsInfo<double>)
|
||||
INSTANTIATE_PACK_VECTOR(IntervalTabulated2DFunction<double>)
|
||||
#undef INSTANTIATE_PACK_VECTOR
|
||||
|
||||
#define INSTANTIATE_PACK_SHARED_PTR(...) \
|
||||
@@ -6061,10 +5960,6 @@ INSTANTIATE_PACK(unsigned char)
|
||||
INSTANTIATE_PACK(EclEpsScalingPointsInfo<double>)
|
||||
INSTANTIATE_PACK(EclTwoPhaseApproach)
|
||||
INSTANTIATE_PACK(EclMultiplexerApproach)
|
||||
INSTANTIATE_PACK(Tabulated1DFunction<double>)
|
||||
INSTANTIATE_PACK(IntervalTabulated2DFunction<double>)
|
||||
INSTANTIATE_PACK(UniformXTabulated2DFunction<double>)
|
||||
INSTANTIATE_PACK(std::map<int,IntervalTabulated2DFunction<double>>)
|
||||
#undef INSTANTIATE_PACK
|
||||
|
||||
} // end namespace Mpi
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
#include <mpi.h>
|
||||
#endif
|
||||
|
||||
#include <opm/material/common/Tabulated1DFunction.hpp>
|
||||
#include <opm/material/common/IntervalTabulated2DFunction.hpp>
|
||||
#include <opm/material/common/UniformXTabulated2DFunction.hpp>
|
||||
#include <opm/output/eclipse/RestartValue.hpp>
|
||||
#include <opm/output/eclipse/EclipseIO.hpp>
|
||||
#include <opm/output/eclipse/Summary.hpp>
|
||||
@@ -253,15 +250,6 @@ std::size_t packSize(const DynamicVector<T>& data, Dune::MPIHelper::MPICommunica
|
||||
template<class T>
|
||||
std::size_t packSize(const DynamicState<T>& data, Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
template<class Scalar>
|
||||
std::size_t packSize(const Tabulated1DFunction<Scalar>& data, Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
template<class Scalar>
|
||||
std::size_t packSize(const IntervalTabulated2DFunction<Scalar>& data, Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
template<class Scalar>
|
||||
std::size_t packSize(const UniformXTabulated2DFunction<Scalar>& data, Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
template<class T>
|
||||
std::size_t packSize(const IOrderSet<T>& data, Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
@@ -354,18 +342,6 @@ template<class T>
|
||||
void pack(const DynamicVector<T>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
template<class Scalar>
|
||||
void pack(const Tabulated1DFunction<Scalar>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
template<class Scalar>
|
||||
void pack(const IntervalTabulated2DFunction<Scalar>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
template<class Scalar>
|
||||
void pack(const UniformXTabulated2DFunction<Scalar>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
template<class T>
|
||||
void pack(const IOrderSet<T>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm);
|
||||
@@ -462,18 +438,6 @@ template<class T>
|
||||
void unpack(DynamicVector<T>& data, std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
template<class Scalar>
|
||||
void unpack(Tabulated1DFunction<Scalar>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
template<class Scalar>
|
||||
void unpack(IntervalTabulated2DFunction<Scalar>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
template<class Scalar>
|
||||
void unpack(UniformXTabulated2DFunction<Scalar>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
template<class T>
|
||||
void unpack(IOrderSet<T>& data, std::vector<char>& buffer,
|
||||
int& position, Dune::MPIHelper::MPICommunicator comm);
|
||||
|
||||
@@ -1242,46 +1242,6 @@ BOOST_AUTO_TEST_CASE(TableManager)
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TabulatedOneDFunction)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
Opm::Tabulated1DFunction<double> val1(2, std::vector<double>{1.0, 2.0},
|
||||
std::vector<double>{3.0, 4.0});
|
||||
auto val2 = PackUnpack(val1);
|
||||
DO_CHECKS(Tabulated1DFunction<double>)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(IntervalTabulatedTwoDFunction)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
std::vector<double> xPos{1.0, 2.0};
|
||||
std::vector<double> yPos{3.0, 4.0};
|
||||
std::vector<std::vector<double>> samples{{1.0, 2.0}, {3.0, 4.0}};
|
||||
Opm::IntervalTabulated2DFunction<double> val1(xPos, yPos, samples, true, true);
|
||||
auto val2 = PackUnpack(val1);
|
||||
DO_CHECKS(IntervalTabulated2DFunction<double>)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(UniformXTabulatedTwoDFunction)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
std::vector<double> xPos{1.0, 2.0};
|
||||
std::vector<double> yPos{3.0, 4.0};
|
||||
using SampleType = std::vector<std::vector<std::tuple<double,double,double>>>;
|
||||
SampleType samples{{std::make_tuple(1.0, 2.0, 3.0)},
|
||||
{std::make_tuple(4.0, 5.0, 6.0)}};
|
||||
using FFuncType = Opm::UniformXTabulated2DFunction<double>;
|
||||
FFuncType val1(xPos, yPos, samples, FFuncType::Vertical);
|
||||
auto val2 = PackUnpack(val1);
|
||||
DO_CHECKS(UniformXTabulated2DFunction<double>)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(OilVaporizationProperties)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
|
||||
Reference in New Issue
Block a user