From 1df01a373006c0193480c1ffc44437a6a180202b Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 5 Feb 2020 09:13:18 +0100 Subject: [PATCH] add mpi serialization for BlackoilBrineModule --- opm/models/blackoil/blackoilbrinemodules.hh | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/opm/models/blackoil/blackoilbrinemodules.hh b/opm/models/blackoil/blackoilbrinemodules.hh index 9a5432c59..fbab37bc5 100644 --- a/opm/models/blackoil/blackoilbrinemodules.hh +++ b/opm/models/blackoil/blackoilbrinemodules.hh @@ -318,6 +318,29 @@ public: return !bdensityTable_.empty(); } + template + static std::size_t packSize(Serializer& serializer) + { + return serializer.packSize(bdensityTable_) + + serializer.packSize(referencePressure_); + } + + template + static void pack(std::vector& buffer, int& position, + Serializer& serializer) + { + serializer.pack(bdensityTable_, buffer, position); + serializer.pack(referencePressure_, buffer, position); + } + + template + static void unpack(std::vector& buffer, int& position, + Serializer& serializer) + { + serializer.unpack(bdensityTable_, buffer, position); + serializer.unpack(referencePressure_, buffer, position); + } + private: static std::vector bdensityTable_; static std::vector referencePressure_;