add mpi serialization for Location

This commit is contained in:
Arne Morten Kvarving
2019-12-13 11:40:43 +01:00
parent 3a893fb149
commit 8ba18cf038
3 changed files with 40 additions and 1 deletions

View File

@@ -24,7 +24,7 @@
#include <boost/test/unit_test.hpp>
#include <opm/simulators/utils/ParallelRestart.hpp>
#include <opm/common/OpmLog/Location.hpp>
#include <opm/material/fluidsystems/blackoilpvt/DryGasPvt.hpp>
#include <opm/material/fluidsystems/blackoilpvt/SolventPvt.hpp>
#include <opm/material/fluidsystems/blackoilpvt/WetGasPvt.hpp>
@@ -86,6 +86,7 @@
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp>
#include <opm/output/eclipse/RestartValue.hpp>
#include <opm/simulators/utils/ParallelRestart.hpp>
namespace {
@@ -2029,6 +2030,17 @@ BOOST_AUTO_TEST_CASE(DeckRecord)
}
BOOST_AUTO_TEST_CASE(Location)
{
#ifdef HAVE_MPI
Opm::Location val1{"test", 1};
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;