From f4e991e4911b37edd08e2759d99edc6961124124 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 9 Dec 2019 15:03:35 +0100 Subject: [PATCH] add mpi serialization for WellPolymerProperties --- opm/simulators/utils/ParallelRestart.cpp | 2 ++ opm/simulators/utils/ParallelRestart.hpp | 2 ++ tests/test_ParallelRestart.cpp | 12 ++++++++++++ 3 files changed, 16 insertions(+) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 5e5ddde7d..4d7fdc8d5 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -265,6 +266,7 @@ HANDLE_AS_POD(TimeMap::StepData) HANDLE_AS_POD(VISCREFRecord) HANDLE_AS_POD(WATDENTRecord) HANDLE_AS_POD(Welldims) +HANDLE_AS_POD(WellPolymerProperties) HANDLE_AS_POD(WellSegmentDims) std::size_t packSize(const data::Well& data, Dune::MPIHelper::MPICommunicator comm) diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index 7d3e5ae86..3950bae30 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -112,6 +112,7 @@ class ViscrefTable; class WATDENTRecord; class WatdentTable; class Welldims; +class WellPolymerProperties; class WellSegmentDims; namespace Mpi @@ -572,6 +573,7 @@ ADD_PACK_PROTOTYPES(ViscrefTable) ADD_PACK_PROTOTYPES(WATDENTRecord) ADD_PACK_PROTOTYPES(WatdentTable) ADD_PACK_PROTOTYPES(Welldims) +ADD_PACK_PROTOTYPES(WellPolymerProperties) ADD_PACK_PROTOTYPES(WellSegmentDims) ADD_PACK_PROTOTYPES(WellTestConfig) ADD_PACK_PROTOTYPES(WellTestConfig::WTESTWell) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 3161e6d4b..c53c92c9d 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -1312,6 +1313,17 @@ BOOST_AUTO_TEST_CASE(WellTestConfig) } +BOOST_AUTO_TEST_CASE(WellPolymerProperties) +{ +#ifdef HAVE_MPI + Opm::WellPolymerProperties val1{1.0, 2.0, 3, 4, 5}; + auto val2 = PackUnpack(val1); + BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2)); + BOOST_CHECK(val1 == std::get<0>(val2)); +#endif +} + + bool init_unit_test_func() { return true;