Merge pull request #3130 from akva2/segmentpressures_serialize

data::SegmentPressures: add serializer support
This commit is contained in:
Bård Skaflestad 2022-09-05 12:15:07 +02:00 committed by GitHub
commit 524752da63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -274,6 +274,24 @@ namespace Opm {
friend struct Mpi::Packing<SegmentPressures>;
template<class Serializer>
void serializeOp(Serializer& serializer)
{
serializer(values_);
}
static SegmentPressures serializeObject()
{
SegmentPressures spres;
spres[Value::Pressure] = 1.0;
spres[Value::PDrop] = 2.0;
spres[Value::PDropHydrostatic] = 3.0;
spres[Value::PDropAccel] = 4.0;
spres[Value::PDropFriction] = 5.0;
return spres;
}
private:
constexpr static std::size_t numvals = 5;