mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixed: do not handle TimeMap::StepData as POD
valgrind is not happy
This commit is contained in:
parent
b7d7ced43d
commit
720fd66638
@ -457,7 +457,7 @@ HANDLE_AS_POD(PVCDORecord)
|
||||
HANDLE_AS_POD(Regdims)
|
||||
HANDLE_AS_POD(ROCKRecord)
|
||||
HANDLE_AS_POD(Tabdims)
|
||||
HANDLE_AS_POD(TimeMap::StepData)
|
||||
HANDLE_AS_POD(TimeStampUTC::YMD)
|
||||
HANDLE_AS_POD(VISCREFRecord)
|
||||
HANDLE_AS_POD(WATDENTRecord)
|
||||
HANDLE_AS_POD(Well::WellGuideRate)
|
||||
@ -1891,6 +1891,23 @@ std::size_t packSize(const RestartSchedule& data,
|
||||
packSize(data.rptsched_restart, comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const TimeStampUTC& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.ymd(), comm) +
|
||||
packSize(data.hour(), comm) +
|
||||
packSize(data.minutes(), comm) +
|
||||
packSize(data.seconds(), comm) +
|
||||
packSize(data.microseconds(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const TimeMap::StepData& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.stepnumber, comm) +
|
||||
packSize(data.timestamp, comm);
|
||||
}
|
||||
|
||||
////// pack routines
|
||||
|
||||
template<class T>
|
||||
@ -3671,6 +3688,25 @@ void pack(const RestartSchedule& data,
|
||||
pack(data.rptsched_restart, buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const TimeStampUTC& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.ymd(), buffer, position, comm);
|
||||
pack(data.hour(), buffer, position, comm);
|
||||
pack(data.minutes(), buffer, position, comm);
|
||||
pack(data.seconds(), buffer, position, comm);
|
||||
pack(data.microseconds(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const TimeMap::StepData& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.stepnumber, buffer, position, comm);
|
||||
pack(data.timestamp, buffer, position, comm);
|
||||
}
|
||||
|
||||
/// unpack routines
|
||||
|
||||
template<class T>
|
||||
@ -6235,6 +6271,29 @@ void unpack(RestartSchedule& data,
|
||||
unpack(data.rptsched_restart, buffer, position, comm);
|
||||
}
|
||||
|
||||
void unpack(TimeStampUTC& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
TimeStampUTC::YMD ymd;
|
||||
int hour, minutes, seconds, usec;
|
||||
|
||||
unpack(ymd, buffer, position, comm);
|
||||
unpack(hour, buffer, position, comm);
|
||||
unpack(minutes, buffer, position, comm);
|
||||
unpack(seconds, buffer, position, comm);
|
||||
unpack(usec, buffer, position, comm);
|
||||
data = TimeStampUTC(ymd, hour, minutes, seconds, usec);
|
||||
}
|
||||
|
||||
void unpack(TimeMap::StepData& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
unpack(data.stepnumber, buffer, position, comm);
|
||||
unpack(data.timestamp, buffer, position, comm);
|
||||
}
|
||||
|
||||
#define INSTANTIATE_PACK_VECTOR(T) \
|
||||
template std::size_t packSize(const std::vector<T>& data, \
|
||||
Dune::MPIHelper::MPICommunicator comm); \
|
||||
|
@ -136,6 +136,7 @@ class TableContainer;
|
||||
class TableManager;
|
||||
class TableSchema;
|
||||
class ThresholdPressure;
|
||||
class TimeStampUTC;
|
||||
class Tuning;
|
||||
class UDAValue;
|
||||
class UDQASTNode;
|
||||
@ -720,6 +721,7 @@ ADD_PACK_PROTOTYPES(TableSchema)
|
||||
ADD_PACK_PROTOTYPES(ThresholdPressure)
|
||||
ADD_PACK_PROTOTYPES(TimeMap)
|
||||
ADD_PACK_PROTOTYPES(TimeMap::StepData)
|
||||
ADD_PACK_PROTOTYPES(TimeStampUTC)
|
||||
ADD_PACK_PROTOTYPES(Tuning)
|
||||
ADD_PACK_PROTOTYPES(UDAValue)
|
||||
ADD_PACK_PROTOTYPES(UDQActive)
|
||||
|
Loading…
Reference in New Issue
Block a user