mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixed: do not handle EclHysterConfig as POD
valgrind is not happy
This commit is contained in:
parent
720fd66638
commit
eca6108cbf
@ -446,7 +446,6 @@ HANDLE_AS_POD(data::Connection)
|
||||
HANDLE_AS_POD(data::Rates)
|
||||
HANDLE_AS_POD(data::Segment)
|
||||
HANDLE_AS_POD(DENSITYRecord)
|
||||
HANDLE_AS_POD(EclHysterConfig)
|
||||
HANDLE_AS_POD(Eqldims)
|
||||
HANDLE_AS_POD(GuideRateConfig::GroupTarget);
|
||||
HANDLE_AS_POD(GuideRateConfig::WellTarget);
|
||||
@ -1908,6 +1907,14 @@ std::size_t packSize(const TimeMap::StepData& data,
|
||||
packSize(data.timestamp, comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const EclHysterConfig& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.active(), comm) +
|
||||
packSize(data.pcHysteresisModel(), comm) +
|
||||
packSize(data.krHysteresisModel(), comm);
|
||||
}
|
||||
|
||||
////// pack routines
|
||||
|
||||
template<class T>
|
||||
@ -3707,6 +3714,15 @@ void pack(const TimeMap::StepData& data,
|
||||
pack(data.timestamp, buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const EclHysterConfig& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.active(), buffer, position, comm);
|
||||
pack(data.pcHysteresisModel(), buffer, position, comm);
|
||||
pack(data.krHysteresisModel(), buffer, position, comm);
|
||||
}
|
||||
|
||||
/// unpack routines
|
||||
|
||||
template<class T>
|
||||
@ -6294,6 +6310,19 @@ void unpack(TimeMap::StepData& data,
|
||||
unpack(data.timestamp, buffer, position, comm);
|
||||
}
|
||||
|
||||
void unpack(EclHysterConfig& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
bool active;
|
||||
int pcHysteresisModel, krHysteresisModel;
|
||||
|
||||
unpack(active, buffer, position, comm);
|
||||
unpack(pcHysteresisModel, buffer, position, comm);
|
||||
unpack(krHysteresisModel, buffer, position, comm);
|
||||
data = EclHysterConfig(active, pcHysteresisModel, krHysteresisModel);
|
||||
}
|
||||
|
||||
#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