From a8a30cbd4ccc117577f4f91fe415bf73959b784d Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Mon, 2 Dec 2019 15:52:39 +0100 Subject: [PATCH] add mpi serialization for WATDENTRecord --- opm/simulators/utils/ParallelRestart.cpp | 1 + opm/simulators/utils/ParallelRestart.hpp | 2 ++ tests/test_ParallelRestart.cpp | 11 +++++++++++ 3 files changed, 14 insertions(+) diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index 6a49eb92a..86cae2ccb 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -219,6 +219,7 @@ HANDLE_AS_POD(PVCDORecord) HANDLE_AS_POD(Tabdims) HANDLE_AS_POD(TimeMap::StepData) HANDLE_AS_POD(VISCREFRecord) +HANDLE_AS_POD(WATDENTRecord) HANDLE_AS_POD(Welldims) HANDLE_AS_POD(WellSegmentDims) diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index dcda0ac50..2797b4594 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -77,6 +77,7 @@ class ThresholdPressure; class UDQParams; class VISCREFRecord; class ViscrefTable; +class WATDENTRecord; class Welldims; class WellSegmentDims; @@ -304,6 +305,7 @@ ADD_PACK_PROTOTYPES(TimeMap::StepData) ADD_PACK_PROTOTYPES(UDQParams) ADD_PACK_PROTOTYPES(VISCREFRecord) ADD_PACK_PROTOTYPES(ViscrefTable) +ADD_PACK_PROTOTYPES(WATDENTRecord) ADD_PACK_PROTOTYPES(Welldims) ADD_PACK_PROTOTYPES(WellSegmentDims) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index d6311e633..d67a02f51 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -805,6 +805,17 @@ BOOST_AUTO_TEST_CASE(ViscrefTable) } +BOOST_AUTO_TEST_CASE(WATDENTRecord) +{ +#if HAVE_MPI + Opm::WATDENTRecord val1{1.0, 2.0, 3.0}; + 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;