diff --git a/opm/simulators/utils/ParallelRestart.cpp b/opm/simulators/utils/ParallelRestart.cpp index dce381e22..b4d65844a 100644 --- a/opm/simulators/utils/ParallelRestart.cpp +++ b/opm/simulators/utils/ParallelRestart.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -209,6 +210,7 @@ HANDLE_AS_POD(data::Segment) HANDLE_AS_POD(EclHysterConfig) HANDLE_AS_POD(EquilRecord) HANDLE_AS_POD(FoamData) +HANDLE_AS_POD(JFunc) HANDLE_AS_POD(RestartSchedule) HANDLE_AS_POD(Tabdims) HANDLE_AS_POD(TimeMap::StepData) @@ -1421,7 +1423,6 @@ void unpack(PvtoTable& data, std::vector& buffer, int& position, unpack_pvt(data, buffer, position, comm); } - } // end namespace Mpi RestartValue loadParallelRestart(const EclipseIO* eclIO, SummaryState& summaryState, const std::vector& solutionKeys, diff --git a/opm/simulators/utils/ParallelRestart.hpp b/opm/simulators/utils/ParallelRestart.hpp index 33487df8f..8ae89d3bb 100644 --- a/opm/simulators/utils/ParallelRestart.hpp +++ b/opm/simulators/utils/ParallelRestart.hpp @@ -50,6 +50,7 @@ class FoamConfig; class FoamData; class InitConfig; class IOConfig; +class JFunc; class NNC; struct NNCdata; class Phases; @@ -263,6 +264,7 @@ ADD_PACK_PROTOTYPES(FoamData) ADD_PACK_PROTOTYPES(EclHysterConfig) ADD_PACK_PROTOTYPES(InitConfig) ADD_PACK_PROTOTYPES(IOConfig) +ADD_PACK_PROTOTYPES(JFunc) ADD_PACK_PROTOTYPES(NNC) ADD_PACK_PROTOTYPES(NNCdata) ADD_PACK_PROTOTYPES(Phases) diff --git a/tests/test_ParallelRestart.cpp b/tests/test_ParallelRestart.cpp index aec990d1e..3b3abed83 100644 --- a/tests/test_ParallelRestart.cpp +++ b/tests/test_ParallelRestart.cpp @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -703,6 +704,18 @@ BOOST_AUTO_TEST_CASE(PvtoTable) } +BOOST_AUTO_TEST_CASE(JFunc) +{ +#if HAVE_MPI + Opm::JFunc val1(Opm::JFunc::Flag::BOTH, 1.0, 2.0, + 3.0, 4.0, Opm::JFunc::Direction::XY); + 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;