fixed: do not handle WellPolymerProperties as POD

valgrind is not happy
This commit is contained in:
Arne Morten Kvarving
2020-01-17 10:17:32 +01:00
parent 486602ea98
commit 8668ecaa64
+32 -1
View File
@@ -462,7 +462,6 @@ HANDLE_AS_POD(Well::WellGuideRate)
HANDLE_AS_POD(WellBrineProperties)
HANDLE_AS_POD(Welldims)
HANDLE_AS_POD(WellFoamProperties)
HANDLE_AS_POD(WellPolymerProperties)
HANDLE_AS_POD(WellSegmentDims)
std::size_t packSize(const data::Well& data, Dune::MPIHelper::MPICommunicator comm)
@@ -1925,6 +1924,16 @@ std::size_t packSize(const JFunc& data,
packSize(data.direction(), comm);
}
std::size_t packSize(const WellPolymerProperties& data,
Dune::MPIHelper::MPICommunicator comm)
{
return packSize(data.m_polymerConcentration, comm) +
packSize(data.m_saltConcentration, comm) +
packSize(data.m_plymwinjtable, comm) +
packSize(data.m_skprwattable, comm) +
packSize(data.m_skprpolytable, comm);
}
////// pack routines
template<class T>
@@ -3745,6 +3754,17 @@ void pack(const JFunc& data,
pack(data.direction(), buffer, position, comm);
}
void pack(const WellPolymerProperties& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
pack(data.m_polymerConcentration, buffer, position, comm);
pack(data.m_saltConcentration, buffer, position, comm);
pack(data.m_plymwinjtable, buffer, position, comm);
pack(data.m_skprwattable, buffer, position, comm);
pack(data.m_skprpolytable, buffer, position, comm);
}
/// unpack routines
template<class T>
@@ -6364,6 +6384,17 @@ void unpack(JFunc& data,
alphaFactor, betaFactor, dir);
}
void unpack(WellPolymerProperties& data,
std::vector<char>& buffer, int& position,
Dune::MPIHelper::MPICommunicator comm)
{
unpack(data.m_polymerConcentration, buffer, position, comm);
unpack(data.m_saltConcentration, buffer, position, comm);
unpack(data.m_plymwinjtable, buffer, position, comm);
unpack(data.m_skprwattable, buffer, position, comm);
unpack(data.m_skprpolytable, buffer, position, comm);
}
#define INSTANTIATE_PACK_VECTOR(T) \
template std::size_t packSize(const std::vector<T>& data, \
Dune::MPIHelper::MPICommunicator comm); \