mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixed: do not handle EquilRecord as POD
valgrind is not happy
This commit is contained in:
parent
72b33edf81
commit
64e943176b
@ -448,7 +448,6 @@ HANDLE_AS_POD(data::Segment)
|
||||
HANDLE_AS_POD(DENSITYRecord)
|
||||
HANDLE_AS_POD(EclHysterConfig)
|
||||
HANDLE_AS_POD(Eqldims)
|
||||
HANDLE_AS_POD(EquilRecord)
|
||||
HANDLE_AS_POD(FoamData)
|
||||
HANDLE_AS_POD(GuideRateConfig::GroupTarget);
|
||||
HANDLE_AS_POD(GuideRateConfig::WellTarget);
|
||||
@ -1860,6 +1859,20 @@ std::size_t packSize(const SummaryConfig& data,
|
||||
packSize(data.getSmryKwds(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const EquilRecord& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.datumDepth(), comm) +
|
||||
packSize(data.datumDepthPressure(), comm) +
|
||||
packSize(data.waterOilContactDepth(), comm) +
|
||||
packSize(data.waterOilContactCapillaryPressure(), comm) +
|
||||
packSize(data.gasOilContactDepth(), comm) +
|
||||
packSize(data.gasOilContactCapillaryPressure(), comm) +
|
||||
packSize(data.liveOilInitConstantRs(), comm) +
|
||||
packSize(data.wetGasInitConstantRv(), comm) +
|
||||
packSize(data.initializationTargetAccuracy(), comm);
|
||||
}
|
||||
|
||||
////// pack routines
|
||||
|
||||
template<class T>
|
||||
@ -3602,8 +3615,21 @@ void pack(const SummaryConfig& data,
|
||||
pack(data.getShortKwds(), buffer, position, comm);
|
||||
pack(data.getSmryKwds(), buffer, position, comm);
|
||||
}
|
||||
|
||||
|
||||
void pack(const EquilRecord& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.datumDepth(), buffer, position, comm);
|
||||
pack(data.datumDepthPressure(), buffer, position, comm);
|
||||
pack(data.waterOilContactDepth(), buffer, position, comm);
|
||||
pack(data.waterOilContactCapillaryPressure(), buffer, position, comm);
|
||||
pack(data.gasOilContactDepth(), buffer, position, comm);
|
||||
pack(data.gasOilContactCapillaryPressure(), buffer, position, comm);
|
||||
pack(data.liveOilInitConstantRs(), buffer, position, comm);
|
||||
pack(data.wetGasInitConstantRv(), buffer, position, comm);
|
||||
pack(data.initializationTargetAccuracy(), buffer, position, comm);
|
||||
}
|
||||
|
||||
/// unpack routines
|
||||
|
||||
@ -6115,6 +6141,31 @@ void unpack(SummaryConfig& data,
|
||||
data = SummaryConfig(kwds, shortKwds, smryKwds);
|
||||
}
|
||||
|
||||
void unpack(EquilRecord& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
double datumDepth, datumDepthPressure, waterOilContactDepth;
|
||||
double waterOilContactCapillaryPressure, gasOilContactDepth;
|
||||
double gasOilContactCapillaryPressure;
|
||||
bool liveOilInitConstantRs, wetGasInitConstantRv;
|
||||
int initializationTargetAccuracy;
|
||||
|
||||
unpack(datumDepth, buffer, position, comm);
|
||||
unpack(datumDepthPressure, buffer, position, comm);
|
||||
unpack(waterOilContactDepth, buffer, position, comm);
|
||||
unpack(waterOilContactCapillaryPressure, buffer, position, comm);
|
||||
unpack(gasOilContactDepth, buffer, position, comm);
|
||||
unpack(gasOilContactCapillaryPressure, buffer, position, comm);
|
||||
unpack(liveOilInitConstantRs, buffer, position, comm);
|
||||
unpack(wetGasInitConstantRv, buffer, position, comm);
|
||||
unpack(initializationTargetAccuracy, buffer, position, comm);
|
||||
data = EquilRecord(datumDepth, datumDepthPressure, waterOilContactDepth,
|
||||
waterOilContactCapillaryPressure, gasOilContactDepth,
|
||||
gasOilContactCapillaryPressure, liveOilInitConstantRs,
|
||||
wetGasInitConstantRv, initializationTargetAccuracy);
|
||||
}
|
||||
|
||||
#define INSTANTIATE_PACK_VECTOR(T) \
|
||||
template std::size_t packSize(const std::vector<T>& data, \
|
||||
Dune::MPIHelper::MPICommunicator comm); \
|
||||
|
Loading…
Reference in New Issue
Block a user