fixed: do not handle GuideRateConfig::WellTarget as POD

valgrind is not happy
This commit is contained in:
Arne Morten Kvarving 2020-01-16 12:27:39 +01:00
parent 4d0bf970fd
commit 446af27a42

View File

@ -448,7 +448,6 @@ HANDLE_AS_POD(data::Segment)
HANDLE_AS_POD(DENSITYRecord) HANDLE_AS_POD(DENSITYRecord)
HANDLE_AS_POD(Eqldims) HANDLE_AS_POD(Eqldims)
HANDLE_AS_POD(GuideRateConfig::GroupTarget); HANDLE_AS_POD(GuideRateConfig::GroupTarget);
HANDLE_AS_POD(GuideRateConfig::WellTarget);
HANDLE_AS_POD(MLimits) HANDLE_AS_POD(MLimits)
HANDLE_AS_POD(PVTWRecord) HANDLE_AS_POD(PVTWRecord)
HANDLE_AS_POD(PVCDORecord) HANDLE_AS_POD(PVCDORecord)
@ -1942,6 +1941,14 @@ std::size_t packSize(const Well::WellGuideRate& data,
packSize(data.scale_factor, comm); packSize(data.scale_factor, comm);
} }
std::size_t packSize(const GuideRateConfig::WellTarget& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.guide_rate, comm) +
packSize(data.target, comm) +
packSize(data.scaling_factor, comm);
}
////// pack routines ////// pack routines
template<class T> template<class T>
@ -3783,6 +3790,15 @@ void pack(const Well::WellGuideRate& data,
pack(data.scale_factor, buffer, position, comm); pack(data.scale_factor, buffer, position, comm);
} }
void pack(const GuideRateConfig::WellTarget& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.guide_rate, buffer, position, comm);
pack(data.target, buffer, position, comm);
pack(data.scaling_factor, buffer, position, comm);
}
/// unpack routines /// unpack routines
template<class T> template<class T>
@ -6423,6 +6439,15 @@ void unpack(Well::WellGuideRate& data,
unpack(data.scale_factor, buffer, position, comm); unpack(data.scale_factor, buffer, position, comm);
} }
void unpack(GuideRateConfig::WellTarget& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
unpack(data.guide_rate, buffer, position, comm);
unpack(data.target, buffer, position, comm);
unpack(data.scaling_factor, buffer, position, comm);
}
#define INSTANTIATE_PACK_VECTOR(T) \ #define INSTANTIATE_PACK_VECTOR(T) \
template std::size_t packSize(const std::vector<T>& data, \ template std::size_t packSize(const std::vector<T>& data, \
Dune::MPIHelper::MPICommunicator comm); \ Dune::MPIHelper::MPICommunicator comm); \