mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixed: do not handle FoamData as POD
valgrind is not happy
This commit is contained in:
parent
64e943176b
commit
1b81e43e73
@ -448,7 +448,6 @@ HANDLE_AS_POD(data::Segment)
|
||||
HANDLE_AS_POD(DENSITYRecord)
|
||||
HANDLE_AS_POD(EclHysterConfig)
|
||||
HANDLE_AS_POD(Eqldims)
|
||||
HANDLE_AS_POD(FoamData)
|
||||
HANDLE_AS_POD(GuideRateConfig::GroupTarget);
|
||||
HANDLE_AS_POD(GuideRateConfig::WellTarget);
|
||||
HANDLE_AS_POD(JFunc)
|
||||
@ -1873,6 +1872,16 @@ std::size_t packSize(const EquilRecord& data,
|
||||
packSize(data.initializationTargetAccuracy(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const FoamData& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.referenceSurfactantConcentration(), comm) +
|
||||
packSize(data.exponent(), comm) +
|
||||
packSize(data.minimumSurfactantConcentration(), comm) +
|
||||
packSize(data.allowDesorption(), comm) +
|
||||
packSize(data.rockDensity(), comm);
|
||||
}
|
||||
|
||||
////// pack routines
|
||||
|
||||
template<class T>
|
||||
@ -3631,6 +3640,17 @@ void pack(const EquilRecord& data,
|
||||
pack(data.initializationTargetAccuracy(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const FoamData& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.referenceSurfactantConcentration(), buffer, position, comm);
|
||||
pack(data.exponent(), buffer, position, comm);
|
||||
pack(data.minimumSurfactantConcentration(), buffer, position, comm);
|
||||
pack(data.allowDesorption(), buffer, position, comm);
|
||||
pack(data.rockDensity(), buffer, position, comm);
|
||||
}
|
||||
|
||||
/// unpack routines
|
||||
|
||||
template<class T>
|
||||
@ -6166,6 +6186,24 @@ void unpack(EquilRecord& data,
|
||||
wetGasInitConstantRv, initializationTargetAccuracy);
|
||||
}
|
||||
|
||||
void unpack(FoamData& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
double referenceSurfactantConcentration, exponent;
|
||||
double minimumSurfactantConcentration;
|
||||
bool allowDesorption;
|
||||
double rockDensity;
|
||||
|
||||
unpack(referenceSurfactantConcentration, buffer, position, comm);
|
||||
unpack(exponent, buffer, position, comm);
|
||||
unpack(minimumSurfactantConcentration, buffer, position, comm);
|
||||
unpack(allowDesorption, buffer, position, comm);
|
||||
unpack(rockDensity, buffer, position, comm);
|
||||
data = FoamData(referenceSurfactantConcentration, exponent,
|
||||
minimumSurfactantConcentration, allowDesorption, rockDensity);
|
||||
}
|
||||
|
||||
#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