remove unused serialization support for Pvt classes

This commit is contained in:
Arne Morten Kvarving 2020-03-04 10:19:19 +01:00
parent 30892a006e
commit 2e30487bff
3 changed files with 3 additions and 1220 deletions

View File

@ -888,16 +888,6 @@ std::size_t packSize(const Tabulated1DFunction<Scalar>& data,
packSize(data.yValues(), comm);
}
template<class Scalar>
std::size_t packSize(const SolventPvt<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.solventReferenceDensity(), comm) +
packSize(data.inverseSolventB(), comm) +
packSize(data.solventMu(), comm) +
packSize(data.inverseSolventBMu(), comm);
}
template<class Scalar>
std::size_t packSize(const IntervalTabulated2DFunction<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
@ -923,232 +913,6 @@ std::size_t packSize(const UniformXTabulated2DFunction<Scalar>& data,
packSize(data.interpolationGuide(), comm);
}
template<class Scalar>
std::size_t packSize(const DryGasPvt<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.gasReferenceDensity(), comm) +
packSize(data.inverseGasB(), comm) +
packSize(data.gasMu(), comm) +
packSize(data.inverseGasBMu(), comm);
}
template<class Scalar>
std::size_t packSize(const GasPvtThermal<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
{
std::size_t size = packSize(data.gasvisctCurves(), comm) +
packSize(data.gasdentRefTemp(), comm) +
packSize(data.gasdentCT1(), comm) +
packSize(data.gasdentCT2(), comm) +
packSize(data.internalEnergyCurves(), comm) +
packSize(data.enableThermalDensity(), comm) +
packSize(data.enableThermalViscosity(), comm) +
packSize(data.enableInternalEnergy(), comm);
size += packSize(bool(), comm);
if (data.isoThermalPvt())
size += packSize(*data.isoThermalPvt(), comm);
return size;
}
template<class Scalar, bool enableThermal>
std::size_t packSize(const GasPvtMultiplexer<Scalar,enableThermal>& data,
Dune::MPIHelper::MPICommunicator comm)
{
std::size_t size = packSize(data.gasPvtApproach(), comm);
const void* realGasPvt = data.realGasPvt();
using PvtApproach = GasPvtMultiplexer<Scalar,enableThermal>;
if (data.gasPvtApproach() == PvtApproach::DryGasPvt) {
const auto& pvt = *static_cast<const DryGasPvt<Scalar>*>(realGasPvt);
size += packSize(pvt, comm);
} else if (data.gasPvtApproach() == PvtApproach::WetGasPvt) {
const auto& pvt = *static_cast<const WetGasPvt<Scalar>*>(realGasPvt);
size += packSize(pvt, comm);
} else if (data.gasPvtApproach() == PvtApproach::ThermalGasPvt) {
const auto& pvt = *static_cast<const GasPvtThermal<Scalar>*>(realGasPvt);
size += packSize(pvt, comm);
}
return size;
}
template<class Scalar>
std::size_t packSize(const WetGasPvt<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.gasReferenceDensity(), comm) +
packSize(data.oilReferenceDensity(), comm) +
packSize(data.inverseGasB(), comm) +
packSize(data.inverseSaturatedGasB(), comm) +
packSize(data.gasMu(), comm) +
packSize(data.inverseGasBMu(), comm) +
packSize(data.inverseSaturatedGasBMu(), comm) +
packSize(data.saturatedOilVaporizationFactorTable(), comm) +
packSize(data.saturationPressure(), comm) +
packSize(data.vapPar1(), comm);
}
template<class Scalar, bool enableThermal>
std::size_t packSize(const OilPvtMultiplexer<Scalar,enableThermal>& data,
Dune::MPIHelper::MPICommunicator comm)
{
std::size_t size = packSize(data.approach(), comm);
const void* realOilPvt = data.realOilPvt();
using PvtApproach = OilPvtMultiplexer<Scalar,enableThermal>;
if (data.approach() == PvtApproach::ConstantCompressibilityOilPvt) {
const auto& pvt = *static_cast<const ConstantCompressibilityOilPvt<Scalar>*>(realOilPvt);
size += packSize(pvt, comm);
} else if (data.approach() == PvtApproach::DeadOilPvt) {
const auto& pvt = *static_cast<const DeadOilPvt<Scalar>*>(realOilPvt);
size += packSize(pvt, comm);
} else if (data.approach() == PvtApproach::LiveOilPvt) {
const auto& pvt = *static_cast<const LiveOilPvt<Scalar>*>(realOilPvt);
size += packSize(pvt, comm);
} else if (data.approach() == PvtApproach::ThermalOilPvt) {
const auto& pvt = *static_cast<const OilPvtThermal<Scalar>*>(realOilPvt);
size += packSize(pvt, comm);
}
return size;
}
template<class Scalar>
std::size_t packSize(const ConstantCompressibilityOilPvt<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.oilReferenceDensity(), comm) +
packSize(data.oilReferencePressure(), comm) +
packSize(data.oilReferenceFormationVolumeFactor(), comm) +
packSize(data.oilCompressibility(), comm) +
packSize(data.oilViscosity(), comm) +
packSize(data.oilViscosibility(), comm);
}
template<class Scalar>
std::size_t packSize(const DeadOilPvt<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.oilReferenceDensity(), comm) +
packSize(data.inverseOilB(), comm) +
packSize(data.oilMu(), comm) +
packSize(data.inverseOilBMu(), comm);
}
template<class Scalar>
std::size_t packSize(const LiveOilPvt<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.gasReferenceDensity(), comm) +
packSize(data.oilReferenceDensity(), comm) +
packSize(data.inverseOilBTable(), comm) +
packSize(data.oilMuTable(), comm) +
packSize(data.inverseOilBMuTable(), comm) +
packSize(data.saturatedOilMuTable(), comm) +
packSize(data.inverseSaturatedOilBTable(), comm) +
packSize(data.inverseSaturatedOilBMuTable(), comm) +
packSize(data.saturatedGasDissolutionFactorTable(), comm) +
packSize(data.saturationPressure(), comm) +
packSize(data.vapPar2(), comm);
}
template<class Scalar>
std::size_t packSize(const OilPvtThermal<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
{
std::size_t size = packSize(data.oilvisctCurves(), comm) +
packSize(data.viscrefPress(), comm) +
packSize(data.viscrefRs(), comm) +
packSize(data.viscRef(), comm) +
packSize(data.oildentRefTemp(), comm) +
packSize(data.oildentCT1(), comm) +
packSize(data.oildentCT2(), comm) +
packSize(data.internalEnergyCurves(), comm) +
packSize(data.enableThermalDensity(), comm) +
packSize(data.enableThermalViscosity(), comm) +
packSize(data.enableInternalEnergy(), comm);
size += packSize(bool(), comm);
if (data.isoThermalPvt())
size += packSize(*data.isoThermalPvt(), comm);
return size;
}
template<class Scalar, bool enableThermal, bool enableBrine>
std::size_t packSize(const WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>& data,
Dune::MPIHelper::MPICommunicator comm)
{
std::size_t size = packSize(data.approach(), comm);
const void* realWaterPvt = data.realWaterPvt();
using PvtApproach = WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>;
if (data.approach() == PvtApproach::ConstantCompressibilityWaterPvt) {
const auto& pvt = *static_cast<const ConstantCompressibilityWaterPvt<Scalar>*>(realWaterPvt);
size += packSize(pvt, comm);
} else if (data.approach() == PvtApproach::ThermalWaterPvt) {
const auto& pvt = *static_cast<const WaterPvtThermal<Scalar>*>(realWaterPvt);
size += packSize(pvt, comm);
} else if (data.approach() == PvtApproach::ConstantCompressibilityBrinePvt) {
const auto& pvt = *static_cast<const ConstantCompressibilityBrinePvt<Scalar>*>(realWaterPvt);
size += packSize(pvt, comm);
}
return size;
}
template<class Scalar>
std::size_t packSize(const ConstantCompressibilityWaterPvt<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.waterReferenceDensity(), comm) +
packSize(data.waterReferencePressure(), comm) +
packSize(data.waterReferenceFormationVolumeFactor(), comm) +
packSize(data.waterCompressibility(), comm) +
packSize(data.waterViscosity(), comm) +
packSize(data.waterViscosibility(), comm);
}
template<class Scalar>
std::size_t packSize(const WaterPvtThermal<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
{
std::size_t size = packSize(data.viscrefPress(), comm) +
packSize(data.watdentRefTemp(), comm) +
packSize(data.watdentCT1(), comm) +
packSize(data.watdentCT2(), comm) +
packSize(data.pvtwRefPress(), comm) +
packSize(data.pvtwRefB(), comm) +
packSize(data.pvtwCompressibility(), comm) +
packSize(data.pvtwViscosity(), comm) +
packSize(data.pvtwViscosibility(), comm) +
packSize(data.watvisctCurves(), comm) +
packSize(data.internalEnergyCurves(), comm) +
packSize(data.enableThermalDensity(), comm) +
packSize(data.enableThermalViscosity(), comm) +
packSize(data.enableInternalEnergy(), comm);
size += packSize(bool(), comm);
if (data.isoThermalPvt())
size += packSize(data.isoThermalPvt()->approach(), comm);
using PvtApproach = WaterPvtThermal<Scalar>;
if (data.isoThermalPvt()->approach() != PvtApproach::IsothermalPvt::NoWaterPvt) {
size += packSize(*data.isoThermalPvt(), comm);
}
return size;
}
template<class Scalar>
std::size_t packSize(const ConstantCompressibilityBrinePvt<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.waterReferenceDensity(), comm) +
packSize(data.referencePressure(), comm) +
packSize(data.formationVolumeTables(), comm) +
packSize(data.compressibilityTables(), comm) +
packSize(data.viscosityTables(), comm) +
packSize(data.viscosibilityTables(), comm);
}
template<class Scalar>
std::size_t packSize(const EclEpsScalingPointsInfo<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm)
@ -2778,241 +2542,6 @@ void pack(const UniformXTabulated2DFunction<Scalar>& data, std::vector<char>& bu
pack(data.interpolationGuide(), buffer, position, comm);
}
template<class Scalar>
void pack(const SolventPvt<Scalar>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.solventReferenceDensity(), buffer, position, comm);
pack(data.inverseSolventB(), buffer, position, comm);
pack(data.solventMu(), buffer, position, comm);
pack(data.inverseSolventBMu(), buffer, position, comm);
}
template<class Scalar, bool enableThermal>
void pack(const GasPvtMultiplexer<Scalar,enableThermal>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.gasPvtApproach(), buffer, position, comm);
const void* realGasPvt = data.realGasPvt();
using PvtApproach = GasPvtMultiplexer<Scalar,enableThermal>;
if (data.gasPvtApproach() == PvtApproach::DryGasPvt) {
const auto& pvt = *static_cast<const DryGasPvt<Scalar>*>(realGasPvt);
pack(pvt, buffer, position, comm);
} else if (data.gasPvtApproach() == PvtApproach::WetGasPvt) {
const auto& pvt = *static_cast<const WetGasPvt<Scalar>*>(realGasPvt);
pack(pvt, buffer, position, comm);
} else if (data.gasPvtApproach() == PvtApproach::ThermalGasPvt) {
const auto& pvt = *static_cast<const GasPvtThermal<Scalar>*>(realGasPvt);
pack(pvt, buffer, position, comm);
}
}
template<class Scalar>
void pack(const DryGasPvt<Scalar>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.gasReferenceDensity(), buffer, position, comm);
pack(data.inverseGasB(), buffer, position, comm);
pack(data.gasMu(), buffer, position, comm);
pack(data.inverseGasBMu(), buffer, position, comm);
}
template<class Scalar>
void pack(const GasPvtThermal<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.gasvisctCurves(), buffer, position, comm);
pack(data.gasdentRefTemp(), buffer, position, comm);
pack(data.gasdentCT1(), buffer, position, comm);
pack(data.gasdentCT2(), buffer, position, comm);
pack(data.internalEnergyCurves(), buffer, position, comm);
pack(data.enableThermalDensity(), buffer, position, comm);
pack(data.enableThermalViscosity(), buffer, position, comm);
pack(data.enableInternalEnergy(), buffer, position, comm);
pack(data.isoThermalPvt() != nullptr, buffer, position, comm);
if (data.isoThermalPvt())
pack(*data.isoThermalPvt(), buffer, position, comm);
}
template<class Scalar>
void pack(const WetGasPvt<Scalar>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.gasReferenceDensity(), buffer, position, comm);
pack(data.oilReferenceDensity(), buffer, position, comm);
pack(data.inverseGasB(), buffer, position, comm);
pack(data.inverseSaturatedGasB(), buffer, position, comm);
pack(data.gasMu(), buffer, position, comm);
pack(data.inverseGasBMu(), buffer, position, comm);
pack(data.inverseSaturatedGasBMu(), buffer, position, comm);
pack(data.saturatedOilVaporizationFactorTable(), buffer, position, comm);
pack(data.saturationPressure(), buffer, position, comm);
pack(data.vapPar1(), buffer, position, comm);
}
template<class Scalar, bool enableThermal>
void pack(const OilPvtMultiplexer<Scalar,enableThermal>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.approach(), buffer, position, comm);
const void* realOilPvt = data.realOilPvt();
using PvtApproach = OilPvtMultiplexer<Scalar,enableThermal>;
if (data.approach() == PvtApproach::ConstantCompressibilityOilPvt) {
const auto& pvt = *static_cast<const ConstantCompressibilityOilPvt<Scalar>*>(realOilPvt);
pack(pvt, buffer, position, comm);
} else if (data.approach() == PvtApproach::DeadOilPvt) {
const auto& pvt = *static_cast<const DeadOilPvt<Scalar>*>(realOilPvt);
pack(pvt, buffer, position, comm);
} else if (data.approach() == PvtApproach::LiveOilPvt) {
const auto& pvt = *static_cast<const LiveOilPvt<Scalar>*>(realOilPvt);
pack(pvt, buffer, position, comm);
} else if (data.approach() == PvtApproach::ThermalOilPvt) {
const auto& pvt = *static_cast<const OilPvtThermal<Scalar>*>(realOilPvt);
pack(pvt, buffer, position, comm);
}
}
template<class Scalar>
void pack(const ConstantCompressibilityOilPvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.oilReferenceDensity(), buffer, position, comm);
pack(data.oilReferencePressure(), buffer, position, comm);
pack(data.oilReferenceFormationVolumeFactor(), buffer, position, comm);
pack(data.oilCompressibility(), buffer, position, comm);
pack(data.oilViscosity(), buffer, position, comm);
pack(data.oilViscosibility(), buffer, position, comm);
}
template<class Scalar>
void pack(const DeadOilPvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.oilReferenceDensity(), buffer, position, comm);
pack(data.inverseOilB(), buffer, position, comm);
pack(data.oilMu(), buffer, position, comm);
pack(data.inverseOilBMu(), buffer, position, comm);
}
template<class Scalar>
void pack(const LiveOilPvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.gasReferenceDensity(), buffer, position, comm);
pack(data.oilReferenceDensity(), buffer, position, comm);
pack(data.inverseOilBTable(), buffer, position, comm);
pack(data.oilMuTable(), buffer, position, comm);
pack(data.inverseOilBMuTable(), buffer, position, comm);
pack(data.saturatedOilMuTable(), buffer, position, comm);
pack(data.inverseSaturatedOilBTable(), buffer, position, comm);
pack(data.inverseSaturatedOilBMuTable(), buffer, position, comm);
pack(data.saturatedGasDissolutionFactorTable(), buffer, position, comm);
pack(data.saturationPressure(), buffer, position, comm);
pack(data.vapPar2(), buffer, position, comm);
}
template<class Scalar>
void pack(const OilPvtThermal<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.oilvisctCurves(), buffer, position, comm);
pack(data.viscrefPress(), buffer, position, comm);
pack(data.viscrefRs(), buffer, position, comm);
pack(data.viscRef(), buffer, position, comm);
pack(data.oildentRefTemp(), buffer, position, comm);
pack(data.oildentCT1(), buffer, position, comm);
pack(data.oildentCT2(), buffer, position, comm);
pack(data.internalEnergyCurves(), buffer, position, comm);
pack(data.enableThermalDensity(), buffer, position, comm);
pack(data.enableThermalViscosity(), buffer, position, comm);
pack(data.enableInternalEnergy(), buffer, position, comm);
pack(data.isoThermalPvt() != nullptr, buffer, position, comm);
if (data.isoThermalPvt())
pack(*data.isoThermalPvt(), buffer, position, comm);
}
template<class Scalar, bool enableThermal, bool enableBrine>
void pack(const WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.approach(), buffer, position, comm);
const void* realWaterPvt = data.realWaterPvt();
using PvtApproach = WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>;
if (data.approach() == PvtApproach::ConstantCompressibilityWaterPvt) {
const auto& pvt = *static_cast<const ConstantCompressibilityWaterPvt<Scalar>*>(realWaterPvt);
pack(pvt, buffer, position, comm);
} else if (data.approach() == PvtApproach::ThermalWaterPvt) {
const auto& pvt = *static_cast<const WaterPvtThermal<Scalar>*>(realWaterPvt);
pack(pvt, buffer, position, comm);
} else if (data.approach() == PvtApproach::ConstantCompressibilityBrinePvt) {
const auto& pvt = *static_cast<const ConstantCompressibilityBrinePvt<Scalar>*>(realWaterPvt);
pack(pvt, buffer, position, comm);
}
}
template<class Scalar>
void pack(const ConstantCompressibilityWaterPvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.waterReferenceDensity(), buffer, position, comm);
pack(data.waterReferencePressure(), buffer, position, comm);
pack(data.waterReferenceFormationVolumeFactor(), buffer, position, comm);
pack(data.waterCompressibility(), buffer, position, comm);
pack(data.waterViscosity(), buffer, position, comm);
pack(data.waterViscosibility(), buffer, position, comm);
}
template<class Scalar>
void pack(const ConstantCompressibilityBrinePvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.waterReferenceDensity(), buffer, position, comm);
pack(data.referencePressure(), buffer, position, comm);
pack(data.formationVolumeTables(), buffer, position, comm);
pack(data.compressibilityTables(), buffer, position, comm);
pack(data.viscosityTables(), buffer, position, comm);
pack(data.viscosibilityTables(), buffer, position, comm);
}
template<class Scalar>
void pack(const WaterPvtThermal<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.viscrefPress(), buffer, position, comm);
pack(data.watdentRefTemp(), buffer, position, comm);
pack(data.watdentCT1(), buffer, position, comm);
pack(data.watdentCT2(), buffer, position, comm);
pack(data.pvtwRefPress(), buffer, position, comm);
pack(data.pvtwRefB(), buffer, position, comm);
pack(data.pvtwCompressibility(), buffer, position, comm);
pack(data.pvtwViscosity(), buffer, position, comm);
pack(data.pvtwViscosibility(), buffer, position, comm);
pack(data.watvisctCurves(), buffer, position, comm);
pack(data.internalEnergyCurves(), buffer, position, comm);
pack(data.enableThermalDensity(), buffer, position, comm);
pack(data.enableThermalViscosity(), buffer, position, comm);
pack(data.enableInternalEnergy(), buffer, position, comm);
pack(data.isoThermalPvt() != nullptr, buffer, position, comm);
using PvtApproach = WaterPvtThermal<Scalar>;
if (data.isoThermalPvt())
pack(data.isoThermalPvt()->approach(), buffer, position, comm);
if (data.isoThermalPvt()->approach() != PvtApproach::IsothermalPvt::NoWaterPvt) {
pack(*data.isoThermalPvt(), buffer, position, comm);
}
}
void pack(const OilVaporizationProperties& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
@ -4986,389 +4515,6 @@ void unpack(UniformXTabulated2DFunction<Scalar>& data, std::vector<char>& buffer
interpolationGuide);
}
template<class Scalar>
void unpack(SolventPvt<Scalar>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<Scalar> solventReferenceDensity;
std::vector<typename SolventPvt<Scalar>::TabulatedOneDFunction> inverseSolventB;
std::vector<typename SolventPvt<Scalar>::TabulatedOneDFunction> solventMu;
std::vector<typename SolventPvt<Scalar>::TabulatedOneDFunction> inverseSolventBMu;
unpack(solventReferenceDensity, buffer, position, comm);
unpack(inverseSolventB, buffer, position, comm);
unpack(solventMu, buffer, position, comm);
unpack(inverseSolventBMu, buffer, position, comm);
data = SolventPvt<Scalar>(solventReferenceDensity, inverseSolventB,
solventMu, inverseSolventBMu);
}
template<class Scalar, bool enableThermal>
void unpack(GasPvtMultiplexer<Scalar,enableThermal>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
typename GasPvtMultiplexer<Scalar,enableThermal>::GasPvtApproach approach;
unpack(approach, buffer, position, comm);
using PvtApproach = GasPvtMultiplexer<Scalar,enableThermal>;
void* pvt = nullptr;
if (approach == PvtApproach::DryGasPvt) {
DryGasPvt<Scalar>* realPvt = new DryGasPvt<Scalar>;
unpack(*realPvt, buffer, position, comm);
pvt = realPvt;
} else if (approach == PvtApproach::WetGasPvt) {
WetGasPvt<Scalar>* realPvt = new WetGasPvt<Scalar>;
unpack(*realPvt, buffer, position, comm);
pvt = realPvt;
} else if (approach == PvtApproach::ThermalGasPvt) {
GasPvtThermal<Scalar>* realPvt = new GasPvtThermal<Scalar>;
unpack(*realPvt, buffer, position, comm);
pvt = realPvt;
}
data = GasPvtMultiplexer<Scalar,enableThermal>(approach, pvt);
}
template<class Scalar>
void unpack(DryGasPvt<Scalar>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<Scalar> gasReferenceDensity;
std::vector<typename DryGasPvt<Scalar>::TabulatedOneDFunction> inverseGasB;
std::vector<typename DryGasPvt<Scalar>::TabulatedOneDFunction> gasMu;
std::vector<typename DryGasPvt<Scalar>::TabulatedOneDFunction> inverseGasBMu;
unpack(gasReferenceDensity, buffer, position, comm);
unpack(inverseGasB, buffer, position, comm);
unpack(gasMu, buffer, position, comm);
unpack(inverseGasBMu, buffer, position, comm);
data = DryGasPvt<Scalar>(gasReferenceDensity, inverseGasB,
gasMu, inverseGasBMu);
}
template<class Scalar>
void unpack(GasPvtThermal<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<typename GasPvtThermal<Scalar>::TabulatedOneDFunction> gasvisctCurves;
std::vector<Scalar> gasdentRefTemp, gasdentCT1, gasdentCT2;
std::vector<typename GasPvtThermal<Scalar>::TabulatedOneDFunction> internalEnergyCurves;
bool enableThermalDensity, enableThermalViscosity, enableInternalEnergy;
unpack(gasvisctCurves, buffer, position, comm);
unpack(gasdentRefTemp, buffer, position, comm);
unpack(gasdentCT1, buffer, position, comm);
unpack(gasdentCT2, buffer, position, comm);
unpack(internalEnergyCurves, buffer, position, comm);
unpack(enableThermalDensity, buffer, position, comm);
unpack(enableThermalViscosity, buffer, position, comm);
unpack(enableInternalEnergy, buffer, position, comm);
bool isothermal;
unpack(isothermal, buffer, position, comm);
typename GasPvtThermal<Scalar>::IsothermalPvt* pvt = nullptr;
if (isothermal) {
pvt = new typename GasPvtThermal<Scalar>::IsothermalPvt;
unpack(*pvt, buffer, position, comm);
}
data = GasPvtThermal<Scalar>(pvt, gasvisctCurves, gasdentRefTemp,
gasdentCT1, gasdentCT2,
internalEnergyCurves,
enableThermalDensity,
enableThermalViscosity,
enableInternalEnergy);
}
template<class Scalar>
void unpack(WetGasPvt<Scalar>& data, std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<Scalar> gasReferenceDensity, oilReferenceDensity;
std::vector<typename WetGasPvt<Scalar>::TabulatedTwoDFunction> inverseGasB;
std::vector<typename WetGasPvt<Scalar>::TabulatedOneDFunction> inverseSaturatedGasB;
std::vector<typename WetGasPvt<Scalar>::TabulatedTwoDFunction> gasMu;
std::vector<typename WetGasPvt<Scalar>::TabulatedTwoDFunction> inverseGasBMu;
std::vector<typename WetGasPvt<Scalar>::TabulatedOneDFunction> inverseSaturatedGasBMu;
std::vector<typename WetGasPvt<Scalar>::TabulatedOneDFunction> satOilVapFacTable;
std::vector<typename WetGasPvt<Scalar>::TabulatedOneDFunction> saturationPressure;
Scalar vapPar1;
unpack(gasReferenceDensity, buffer, position, comm);
unpack(oilReferenceDensity, buffer, position, comm);
unpack(inverseGasB, buffer, position, comm);
unpack(inverseSaturatedGasB, buffer, position, comm);
unpack(gasMu, buffer, position, comm);
unpack(inverseGasBMu, buffer, position, comm);
unpack(inverseSaturatedGasBMu, buffer, position, comm);
unpack(satOilVapFacTable, buffer, position, comm);
unpack(saturationPressure, buffer, position, comm);
unpack(vapPar1, buffer, position, comm);
data = WetGasPvt<Scalar>(gasReferenceDensity, oilReferenceDensity, inverseGasB,
inverseSaturatedGasB, gasMu, inverseGasBMu,
inverseSaturatedGasBMu, satOilVapFacTable,
saturationPressure, vapPar1);
}
template<class Scalar, bool enableThermal>
void unpack(OilPvtMultiplexer<Scalar,enableThermal>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
typename OilPvtMultiplexer<Scalar,enableThermal>::OilPvtApproach approach;
unpack(approach, buffer, position, comm);
using PvtApproach = OilPvtMultiplexer<Scalar,enableThermal>;
void* pvt = nullptr;
if (approach == PvtApproach::ConstantCompressibilityOilPvt) {
auto* realPvt = new ConstantCompressibilityOilPvt<Scalar>;
unpack(*realPvt, buffer, position, comm);
pvt = realPvt;
} else if (approach == PvtApproach::DeadOilPvt) {
auto* realPvt = new DeadOilPvt<Scalar>;
unpack(*realPvt, buffer, position, comm);
pvt = realPvt;
} else if (approach == PvtApproach::LiveOilPvt) {
auto* realPvt = new LiveOilPvt<Scalar>;
unpack(*realPvt, buffer, position, comm);
pvt = realPvt;
} else if (approach == PvtApproach::ThermalOilPvt) {
auto* realPvt = new OilPvtThermal<Scalar>;
unpack(*realPvt, buffer, position, comm);
pvt = realPvt;
}
data = OilPvtMultiplexer<Scalar,enableThermal>(approach, pvt);
}
template<class Scalar>
void unpack(ConstantCompressibilityOilPvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<Scalar> oilReferenceDensity, oilReferencePressure,
oilReferenceFormationVolumeFactor,
oilCompressibility, oilViscosity, oilViscosibility;
unpack(oilReferenceDensity, buffer, position, comm);
unpack(oilReferencePressure, buffer, position, comm);
unpack(oilReferenceFormationVolumeFactor, buffer, position, comm);
unpack(oilCompressibility, buffer, position, comm);
unpack(oilViscosity, buffer, position, comm);
unpack(oilViscosibility, buffer, position, comm);
data = ConstantCompressibilityOilPvt<Scalar>(oilReferenceDensity,
oilReferencePressure,
oilReferenceFormationVolumeFactor,
oilCompressibility,
oilViscosity,
oilViscosibility);
}
template<class Scalar>
void unpack(DeadOilPvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<Scalar> oilReferenceDensity;
using FuncVec = std::vector<typename DeadOilPvt<Scalar>::TabulatedOneDFunction>;
FuncVec inverseOilB, oilMu, inverseOilBMu;
unpack(oilReferenceDensity, buffer, position, comm);
unpack(inverseOilB, buffer, position, comm);
unpack(oilMu, buffer, position, comm);
unpack(inverseOilBMu, buffer, position, comm);
data = DeadOilPvt<Scalar>(oilReferenceDensity, inverseOilB,
oilMu, inverseOilBMu);
}
template<class Scalar>
void unpack(LiveOilPvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<Scalar> gasReferenceDensity, oilReferenceDensity;
using FuncVec = std::vector<typename LiveOilPvt<Scalar>::TabulatedOneDFunction>;
using FuncVec2 = std::vector<typename LiveOilPvt<Scalar>::TabulatedTwoDFunction>;
FuncVec2 inverseOilBTable, oilMuTable, inverseOilBMuTable;
FuncVec saturatedOilMuTable, inverseSaturatedOilBTable,
inverseSaturatedOilBMuTable,
saturatedGasDissolutionFactorTable, saturationPressure;
Scalar vapPar2;
unpack(gasReferenceDensity, buffer, position, comm);
unpack(oilReferenceDensity, buffer, position, comm);
unpack(inverseOilBTable, buffer, position, comm);
unpack(oilMuTable, buffer, position, comm);
unpack(inverseOilBMuTable, buffer, position, comm);
unpack(saturatedOilMuTable, buffer, position, comm);
unpack(inverseSaturatedOilBTable, buffer, position, comm);
unpack(inverseSaturatedOilBMuTable, buffer, position, comm);
unpack(saturatedGasDissolutionFactorTable, buffer, position, comm);
unpack(saturationPressure, buffer, position, comm);
unpack(vapPar2, buffer, position, comm);
data = LiveOilPvt<Scalar>(gasReferenceDensity,
oilReferenceDensity,
inverseOilBTable,
oilMuTable,
inverseOilBMuTable,
saturatedOilMuTable,
inverseSaturatedOilBTable,
inverseSaturatedOilBMuTable,
saturatedGasDissolutionFactorTable,
saturationPressure,
vapPar2);
}
template<class Scalar>
void unpack(OilPvtThermal<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<typename OilPvtThermal<Scalar>::TabulatedOneDFunction> oilvisctCurves;
std::vector<Scalar> oildentRefTemp, oildentCT1, oildentCT2, viscrefPress, viscrefRs, viscRef;
std::vector<typename OilPvtThermal<Scalar>::TabulatedOneDFunction> internalEnergyCurves;
bool enableThermalDensity, enableThermalViscosity, enableInternalEnergy;
unpack(oilvisctCurves, buffer, position, comm);
unpack(viscrefPress, buffer, position, comm);
unpack(viscrefRs, buffer, position, comm);
unpack(viscRef, buffer, position, comm);
unpack(oildentRefTemp, buffer, position, comm);
unpack(oildentCT1, buffer, position, comm);
unpack(oildentCT2, buffer, position, comm);
unpack(internalEnergyCurves, buffer, position, comm);
unpack(enableThermalDensity, buffer, position, comm);
unpack(enableThermalViscosity, buffer, position, comm);
unpack(enableInternalEnergy, buffer, position, comm);
bool isothermal;
unpack(isothermal, buffer, position, comm);
typename OilPvtThermal<Scalar>::IsothermalPvt* pvt = nullptr;
if (isothermal) {
pvt = new typename OilPvtThermal<Scalar>::IsothermalPvt;
unpack(*pvt, buffer, position, comm);
}
data = OilPvtThermal<Scalar>(pvt, oilvisctCurves,
viscrefPress, viscrefRs, viscRef,
oildentRefTemp,
oildentCT1, oildentCT2,
internalEnergyCurves,
enableThermalDensity,
enableThermalViscosity,
enableInternalEnergy);
}
template<class Scalar, bool enableThermal, bool enableBrine>
void unpack(WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
typename WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>::WaterPvtApproach approach;
unpack(approach, buffer, position, comm);
using PvtApproach = WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>;
void* pvt = nullptr;
if (approach == PvtApproach::ConstantCompressibilityWaterPvt) {
auto* realPvt = new ConstantCompressibilityWaterPvt<Scalar>;
unpack(*realPvt, buffer, position, comm);
pvt = realPvt;
} else if (approach == PvtApproach::ThermalWaterPvt) {
auto* realPvt = new WaterPvtThermal<Scalar>;
unpack(*realPvt, buffer, position, comm);
pvt = realPvt;
} else if (approach == PvtApproach::ConstantCompressibilityBrinePvt) {
auto* realPvt = new ConstantCompressibilityBrinePvt<Scalar>;
unpack(*realPvt, buffer, position, comm);
pvt = realPvt;
}
data = WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>(approach, pvt);
}
template<class Scalar>
void unpack(ConstantCompressibilityWaterPvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<Scalar> waterReferenceDensity, waterReferencePressure,
waterReferenceFormationVolumeFactor,
waterCompressibility, waterViscosity, waterViscosibility;
unpack(waterReferenceDensity, buffer, position, comm);
unpack(waterReferencePressure, buffer, position, comm);
unpack(waterReferenceFormationVolumeFactor, buffer, position, comm);
unpack(waterCompressibility, buffer, position, comm);
unpack(waterViscosity, buffer, position, comm);
unpack(waterViscosibility, buffer, position, comm);
data = ConstantCompressibilityWaterPvt<Scalar>(waterReferenceDensity,
waterReferencePressure,
waterReferenceFormationVolumeFactor,
waterCompressibility,
waterViscosity,
waterViscosibility);
}
template<class Scalar>
void unpack(ConstantCompressibilityBrinePvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
using TabulatedFunction = typename ConstantCompressibilityBrinePvt<Scalar>::TabulatedFunction;
std::vector<Scalar> waterReferenceDensity, referencePressure;
std::vector<TabulatedFunction> formationVolumeTables, compressibilityTables,
viscosityTables, viscosibilityTables;
unpack(waterReferenceDensity, buffer, position, comm);
unpack(referencePressure, buffer, position, comm);
unpack(formationVolumeTables, buffer, position, comm);
unpack(compressibilityTables, buffer, position, comm);
unpack(viscosityTables, buffer, position, comm);
unpack(viscosibilityTables, buffer, position, comm);
data = ConstantCompressibilityBrinePvt<Scalar>(waterReferenceDensity,
referencePressure,
formationVolumeTables,
compressibilityTables,
viscosityTables,
viscosibilityTables);
}
template<class Scalar>
void unpack(WaterPvtThermal<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
std::vector<Scalar> viscrefPress, watdentRefTemp, watdentCT1, watdentCT2,
pvtwRefPress, pvtwRefB, pvtwCompressibility,
pvtwViscosity, pvtwViscosibility;
std::vector<typename WaterPvtThermal<Scalar>::TabulatedOneDFunction> watvisctCurves;
std::vector<typename WaterPvtThermal<Scalar>::TabulatedOneDFunction> internalEnergyCurves;
bool enableThermalDensity, enableThermalViscosity, enableInternalEnergy;
unpack(viscrefPress, buffer, position, comm);
unpack(watdentRefTemp, buffer, position, comm);
unpack(watdentCT1, buffer, position, comm);
unpack(watdentCT2, buffer, position, comm);
unpack(pvtwRefPress, buffer, position, comm);
unpack(pvtwRefB, buffer, position, comm);
unpack(pvtwCompressibility, buffer, position, comm);
unpack(pvtwViscosity, buffer, position, comm);
unpack(pvtwViscosibility, buffer, position, comm);
unpack(watvisctCurves, buffer, position, comm);
unpack(internalEnergyCurves, buffer, position, comm);
unpack(enableThermalDensity, buffer, position, comm);
unpack(enableThermalViscosity, buffer, position, comm);
unpack(enableInternalEnergy, buffer, position, comm);
bool isothermal;
unpack(isothermal, buffer, position, comm);
typename WaterPvtThermal<Scalar>::IsothermalPvt* pvt = nullptr;
if (isothermal) {
pvt = new typename WaterPvtThermal<Scalar>::IsothermalPvt;
using PvtApproach = WaterPvtThermal<Scalar>;
typename PvtApproach::IsothermalPvt::WaterPvtApproach approach;
unpack(approach, buffer, position, comm);
if (approach != PvtApproach::IsothermalPvt::NoWaterPvt)
unpack(*pvt, buffer, position, comm);
}
data = WaterPvtThermal<Scalar>(pvt, viscrefPress, watdentRefTemp,
watdentCT1, watdentCT2,
pvtwRefPress, pvtwRefB,
pvtwCompressibility,
pvtwViscosity,
pvtwViscosibility,
watvisctCurves,
internalEnergyCurves,
enableThermalDensity,
enableThermalViscosity,
enableInternalEnergy);
}
void unpack(OilVaporizationProperties& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
@ -6807,9 +5953,6 @@ template void unpack(std::shared_ptr<__VA_ARGS__>& data, \
std::vector<char>& buffer, int& position, \
Dune::MPIHelper::MPICommunicator comm);
INSTANTIATE_PACK_SHARED_PTR(Opm::GasPvtMultiplexer<double, true>)
INSTANTIATE_PACK_SHARED_PTR(Opm::OilPvtMultiplexer<double, true>)
INSTANTIATE_PACK_SHARED_PTR(Opm::WaterPvtMultiplexer<double, true>)
INSTANTIATE_PACK_SHARED_PTR(SpiralICD)
#undef INSTANTIATE_PACK_SHARED_PTR
@ -6837,23 +5980,6 @@ INSTANTIATE_PACK(Tabulated1DFunction<double>)
INSTANTIATE_PACK(IntervalTabulated2DFunction<double>)
INSTANTIATE_PACK(UniformXTabulated2DFunction<double>)
INSTANTIATE_PACK(std::map<int,IntervalTabulated2DFunction<double>>)
INSTANTIATE_PACK(SolventPvt<double>)
INSTANTIATE_PACK(GasPvtMultiplexer<double,true>)
INSTANTIATE_PACK(GasPvtMultiplexer<double,false>)
INSTANTIATE_PACK(DryGasPvt<double>)
INSTANTIATE_PACK(GasPvtThermal<double>)
INSTANTIATE_PACK(WetGasPvt<double>)
INSTANTIATE_PACK(OilPvtMultiplexer<double,true>)
INSTANTIATE_PACK(OilPvtMultiplexer<double,false>)
INSTANTIATE_PACK(ConstantCompressibilityOilPvt<double>)
INSTANTIATE_PACK(DeadOilPvt<double>)
INSTANTIATE_PACK(LiveOilPvt<double>)
INSTANTIATE_PACK(OilPvtThermal<double>)
INSTANTIATE_PACK(WaterPvtMultiplexer<double,true,true>)
INSTANTIATE_PACK(WaterPvtMultiplexer<double,false,true>)
INSTANTIATE_PACK(ConstantCompressibilityWaterPvt<double>)
INSTANTIATE_PACK(WaterPvtThermal<double>)
INSTANTIATE_PACK(ConstantCompressibilityBrinePvt<double>)
#undef INSTANTIATE_PACK
} // end namespace Mpi

View File

@ -26,17 +26,6 @@
#include <opm/material/common/Tabulated1DFunction.hpp>
#include <opm/material/common/IntervalTabulated2DFunction.hpp>
#include <opm/material/common/UniformXTabulated2DFunction.hpp>
#include <opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityBrinePvt.hpp>
#include <opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityOilPvt.hpp>
#include <opm/material/fluidsystems/blackoilpvt/ConstantCompressibilityWaterPvt.hpp>
#include <opm/material/fluidsystems/blackoilpvt/DeadOilPvt.hpp>
#include <opm/material/fluidsystems/blackoilpvt/DryGasPvt.hpp>
#include <opm/material/fluidsystems/blackoilpvt/GasPvtMultiplexer.hpp>
#include <opm/material/fluidsystems/blackoilpvt/LiveOilPvt.hpp>
#include <opm/material/fluidsystems/blackoilpvt/OilPvtMultiplexer.hpp>
#include <opm/material/fluidsystems/blackoilpvt/SolventPvt.hpp>
#include <opm/material/fluidsystems/blackoilpvt/WaterPvtMultiplexer.hpp>
#include <opm/material/fluidsystems/blackoilpvt/WetGasPvt.hpp>
#include <opm/output/eclipse/RestartValue.hpp>
#include <opm/output/eclipse/EclipseIO.hpp>
#include <opm/output/eclipse/Summary.hpp>
@ -55,6 +44,9 @@
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Well.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestConfig.hpp>
#include <opm/parser/eclipse/EclipseState/SimulationConfig/BCConfig.hpp>
#include <opm/parser/eclipse/EclipseState/SimulationConfig/RockConfig.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/DenT.hpp>
#include <opm/parser/eclipse/EclipseState/Util/OrderedMap.hpp>
#include <dune/common/parallel/mpihelper.hh>
@ -86,7 +78,6 @@ class Connection;
class DeckItem;
class DeckRecord;
class DENSITYRecord;
class DenT;
class DensityTable;
class Dimension;
class EclHysterConfig;
@ -130,7 +121,6 @@ class Regdims;
class RestartConfig;
class RestartSchedule;
class RFTConfig;
class RockConfig;
class ROCKRecord;
class RockTable;
class Rock2dTable;
@ -266,56 +256,6 @@ std::size_t packSize(const IntervalTabulated2DFunction<Scalar>& data, Dune::MPIH
template<class Scalar>
std::size_t packSize(const UniformXTabulated2DFunction<Scalar>& data, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
std::size_t packSize(const SolventPvt<Scalar>& data, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar, bool enableThermal>
std::size_t packSize(const GasPvtMultiplexer<Scalar,enableThermal>& data,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
std::size_t packSize(const DryGasPvt<Scalar>& data, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
std::size_t packSize(const GasPvtThermal<Scalar>& data, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
std::size_t packSize(const WetGasPvt<Scalar>& data, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar, bool enableThermal>
std::size_t packSize(const OilPvtMultiplexer<Scalar,enableThermal>& data,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
std::size_t packSize(const ConstantCompressibilityOilPvt<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
std::size_t packSize(const DeadOilPvt<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
std::size_t packSize(const LiveOilPvt<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
std::size_t packSize(const OilPvtThermal<Scalar>& data, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar, bool enableThermal, bool enableBrine>
std::size_t packSize(const WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>& data,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
std::size_t packSize(const ConstantCompressibilityWaterPvt<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
std::size_t packSize(const ConstantCompressibilityBrinePvt<Scalar>& data,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
std::size_t packSize(const WaterPvtThermal<Scalar>& data, Dune::MPIHelper::MPICommunicator comm);
template<class T>
std::size_t packSize(const IOrderSet<T>& data, Dune::MPIHelper::MPICommunicator comm);
@ -420,70 +360,6 @@ template<class Scalar>
void pack(const UniformXTabulated2DFunction<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void pack(const SolventPvt<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar, bool enableThermal>
void pack(const GasPvtMultiplexer<Scalar,enableThermal>& data,
const std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void pack(const DryGasPvt<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void pack(const GasPvtThermal<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void pack(const WetGasPvt<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar, bool enableThermal>
void pack(const OilPvtMultiplexer<Scalar,enableThermal>& data,
const std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void pack(const ConstantCompressibilityOilPvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void pack(const DeadOilPvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void pack(const LiveOilPvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void pack(const OilPvtThermal<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar, bool enableThermal, bool enableBrine>
void pack(const WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>& data,
const std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void pack(const ConstantCompressibilityWaterPvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void pack(const ConstantCompressibilityBrinePvt<Scalar>& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void pack(const WaterPvtThermal<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);
@ -592,65 +468,6 @@ template<class Scalar>
void unpack(UniformXTabulated2DFunction<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void unpack(SolventPvt<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar, bool enableThermal>
void unpack(GasPvtMultiplexer<Scalar,enableThermal>& data,
const std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void unpack(DryGasPvt<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void unpack(GasPvtThermal<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void unpack(WetGasPvt<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar, bool enableThermal>
void unpack(OilPvtMultiplexer<Scalar,enableThermal>& data,
const std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void unpack(ConstantCompressibilityOilPvt<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void unpack(DeadOilPvt<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void unpack(LiveOilPvt<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void unpack(OilPvtThermal<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar, bool enableThermal, bool enableBrine>
void unpack(WaterPvtMultiplexer<Scalar,enableThermal,enableBrine>& data,
const std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void unpack(WaterPvtThermal<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void unpack(ConstantCompressibilityWaterPvt<Scalar>& data, std::vector<char>& buffer,
int& position, Dune::MPIHelper::MPICommunicator comm);
template<class Scalar>
void unpack(ConstantCompressibilityBrinePvt<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);

View File

@ -26,9 +26,6 @@
#include <opm/common/OpmLog/Location.hpp>
#include <opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp>
#include <opm/material/fluidsystems/blackoilpvt/DryGasPvt.hpp>
#include <opm/material/fluidsystems/blackoilpvt/SolventPvt.hpp>
#include <opm/material/fluidsystems/blackoilpvt/WetGasPvt.hpp>
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/EclipseState/Aquancon.hpp>
@ -1271,163 +1268,6 @@ BOOST_AUTO_TEST_CASE(UniformXTabulatedTwoDFunction)
}
BOOST_AUTO_TEST_CASE(SolventPvt)
{
#ifdef HAVE_MPI
Opm::Tabulated1DFunction<double> func(2, std::vector<double>{1.0, 2.0},
std::vector<double>{3.0, 4.0});
Opm::SolventPvt<double> val1({1.0, 2.0}, {func}, {func}, {func});
auto val2 = PackUnpack(val1);
DO_CHECKS(SolventPvt<double>)
#endif
}
BOOST_AUTO_TEST_CASE(DryGasPvt)
{
#ifdef HAVE_MPI
Opm::Tabulated1DFunction<double> func(2, std::vector<double>{1.0, 2.0},
std::vector<double>{3.0, 4.0});
Opm::DryGasPvt<double> val1({1.0, 2.0}, {func}, {func}, {func});
auto val2 = PackUnpack(val1);
DO_CHECKS(DryGasPvt<double>)
#endif
}
BOOST_AUTO_TEST_CASE(GasPvtThermal)
{
#ifdef HAVE_MPI
Opm::Tabulated1DFunction<double> func(2, std::vector<double>{1.0, 2.0},
std::vector<double>{3.0, 4.0});
Opm::GasPvtThermal<double>::IsothermalPvt* pvt = new Opm::GasPvtThermal<double>::IsothermalPvt;
Opm::GasPvtThermal<double> val1(pvt, {func}, {1.0, 2.0}, {3.0, 4.0}, {5.0, 6.0},
{func}, true, true, false);
auto val2 = PackUnpack(val1);
DO_CHECKS(GasPvtThermal<double>)
#endif
}
BOOST_AUTO_TEST_CASE(WetGasPvt)
{
#ifdef HAVE_MPI
Opm::Tabulated1DFunction<double> func(2, std::vector<double>{1.0, 2.0},
std::vector<double>{3.0, 4.0});
std::vector<double> xPos{1.0, 2.0};
std::vector<double> yPos{3.0, 4.0};
using FFuncType = Opm::UniformXTabulated2DFunction<double>;
using Samples = std::vector<std::vector<FFuncType::SamplePoint>>;
Samples samples({{std::make_tuple(1.0, 2.0, 3.0), std::make_tuple(3.0, 4.0, 5.0)}});
FFuncType func2(xPos, yPos, samples, FFuncType::Vertical);
Opm::WetGasPvt<double> val1({1.0, 2.0}, {3.0, 4.0},
{func2}, {func}, {func2},
{func2}, {func}, {func}, {func}, 5.0);
auto val2 = PackUnpack(val1);
DO_CHECKS(WetGasPvt<double>)
#endif
}
BOOST_AUTO_TEST_CASE(ConstantCompressibilityOilPvt)
{
#ifdef HAVE_MPI
Opm::ConstantCompressibilityOilPvt<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});
auto val2 = PackUnpack(val1);
DO_CHECKS(ConstantCompressibilityOilPvt<double>)
#endif
}
BOOST_AUTO_TEST_CASE(DeadOilPvt)
{
#ifdef HAVE_MPI
Opm::Tabulated1DFunction<double> func(2, std::vector<double>{1.0, 2.0},
std::vector<double>{3.0, 4.0});
Opm::DeadOilPvt<double> val1({1.0, 2.0}, {func}, {func}, {func});
auto val2 = PackUnpack(val1);
DO_CHECKS(DeadOilPvt<double>)
#endif
}
BOOST_AUTO_TEST_CASE(LiveOilPvt)
{
#ifdef HAVE_MPI
Opm::Tabulated1DFunction<double> func(2, std::vector<double>{1.0, 2.0},
std::vector<double>{3.0, 4.0});
std::vector<double> xPos{1.0, 2.0};
std::vector<double> yPos{3.0, 4.0};
using FFuncType = Opm::UniformXTabulated2DFunction<double>;
using Samples = std::vector<std::vector<FFuncType::SamplePoint>>;
Samples samples({{std::make_tuple(1.0, 2.0, 3.0), std::make_tuple(3.0, 4.0, 5.0)}});
FFuncType func2(xPos, yPos, samples, FFuncType::Vertical);
Opm::LiveOilPvt<double> val1({1.0, 2.0}, {3.0, 4.0},
{func2}, {func2}, {func2},
{func}, {func}, {func}, {func}, {func}, 5.0);
auto val2 = PackUnpack(val1);
DO_CHECKS(LiveOilPvt<double>)
#endif
}
BOOST_AUTO_TEST_CASE(OilPvtThermal)
{
#ifdef HAVE_MPI
Opm::Tabulated1DFunction<double> func(2, std::vector<double>{1.0, 2.0},
std::vector<double>{3.0, 4.0});
Opm::OilPvtThermal<double>::IsothermalPvt* pvt = new Opm::OilPvtThermal<double>::IsothermalPvt;
Opm::OilPvtThermal<double> val1(pvt, {func}, {1.0, 2.0}, {3.0, 4.0}, {5.0, 6.0},
{7.0, 8.0}, {9.0, 10.0}, {11.0, 12.0},
{func}, true, true, false);
auto val2 = PackUnpack(val1);
DO_CHECKS(OilPvtThermal<double>)
#endif
}
BOOST_AUTO_TEST_CASE(ConstantCompressibilityWaterPvt)
{
#ifdef HAVE_MPI
Opm::ConstantCompressibilityWaterPvt<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});
auto val2 = PackUnpack(val1);
DO_CHECKS(ConstantCompressibilityWaterPvt<double>)
#endif
}
BOOST_AUTO_TEST_CASE(ConstantCompressibilityBrinePvt)
{
#ifdef HAVE_MPI
Opm::Tabulated1DFunction<double> func(2, std::vector<double>{1.0, 2.0},
std::vector<double>{3.0, 4.0});
Opm::ConstantCompressibilityBrinePvt<double> val1({1.0, 2.0}, {3.0, 4.0}, {func},
{func}, {func}, {func});
auto val2 = PackUnpack(val1);
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
BOOST_CHECK(val1 == std::get<0>(val2));
#endif
}
BOOST_AUTO_TEST_CASE(WaterPvtThermal)
{
#ifdef HAVE_MPI
Opm::Tabulated1DFunction<double> func(2, std::vector<double>{1.0, 2.0},
std::vector<double>{3.0, 4.0});
Opm::WaterPvtThermal<double>::IsothermalPvt* pvt = new Opm::WaterPvtThermal<double>::IsothermalPvt;
Opm::WaterPvtThermal<double> val1(pvt, {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},
{func}, {func}, true, true, false);
auto val2 = PackUnpack(val1);
DO_CHECKS(WaterPvtThermal<double>)
#endif
}
BOOST_AUTO_TEST_CASE(OilVaporizationProperties)
{
#ifdef HAVE_MPI