From c19a816bfa970f3676870c8120e46e843e711c9f Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Tue, 3 Dec 2019 10:09:43 +0100 Subject: [PATCH] add mpi serialization for Aqudims --- 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 7ca9115ac..5eb7702e7 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -211,6 +212,7 @@ std::size_t packSize(const std::unordered_map& data, Dune::MPIHelpe } HANDLE_AS_POD(Actdims) +HANDLE_AS_POD(Aqudims) HANDLE_AS_POD(data::Connection) HANDLE_AS_POD(data::Rates) HANDLE_AS_POD(data::Segment) diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index 7a8ccc559..264a2fa87 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -40,6 +40,7 @@ namespace Opm { class Actdims; +class Aqudims; class ColumnSchema; class DENSITYRecord; class DensityTable; @@ -263,6 +264,7 @@ void unpack(char* str, std::size_t length, std::vector& buffer, int& posit Dune::MPIHelper::MPICommunicator comm); ADD_PACK_PROTOTYPES(Actdims) +ADD_PACK_PROTOTYPES(Aqudims) ADD_PACK_PROTOTYPES(ColumnSchema) ADD_PACK_PROTOTYPES(data::CellData) ADD_PACK_PROTOTYPES(data::Connection) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index 7de7000c0..44daca6b6 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -887,6 +888,17 @@ BOOST_AUTO_TEST_CASE(Eqldims) } +BOOST_AUTO_TEST_CASE(Aqudims) +{ +#if HAVE_MPI + Opm::Aqudims val1(1,2,3,4,5,6,7,8); + 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;