add mpi serialization for Phases

This commit is contained in:
Arne Morten Kvarving
2019-12-02 10:46:58 +01:00
parent 2a2effd54b
commit cdfac8c02b
3 changed files with 34 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
#include <boost/test/unit_test.hpp>
#include <opm/simulators/utils/ParallelRestart.hpp>
#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
#include <opm/parser/eclipse/EclipseState/Edit/EDITNNC.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/NNC.hpp>
#include <opm/parser/eclipse/EclipseState/InitConfig/Equil.hpp>
@@ -547,6 +548,17 @@ BOOST_AUTO_TEST_CASE(IOConfig)
}
BOOST_AUTO_TEST_CASE(Phases)
{
#if HAVE_MPI
Opm::Phases val1(true, true, true, false, true, false, true, false);
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;