add mpi serialization for Tabdims

This commit is contained in:
Arne Morten Kvarving 2019-12-02 11:10:34 +01:00
parent cdfac8c02b
commit 7c1b5bc25f
3 changed files with 15 additions and 0 deletions

View File

@ -206,6 +206,7 @@ HANDLE_AS_POD(data::Segment)
HANDLE_AS_POD(EquilRecord)
HANDLE_AS_POD(FoamData)
HANDLE_AS_POD(RestartSchedule)
HANDLE_AS_POD(Tabdims)
HANDLE_AS_POD(TimeMap::StepData)
std::size_t packSize(const data::Well& data, Dune::MPIHelper::MPICommunicator comm)

View File

@ -56,6 +56,7 @@ class Rock2dTable;
class Rock2dtrTable;
class SimulationConfig;
class SimpleTable;
class Tabdims;
class TableColumn;
class TableContainer;
class TableSchema;
@ -262,6 +263,7 @@ ADD_PACK_PROTOTYPES(Rock2dtrTable)
ADD_PACK_PROTOTYPES(std::string)
ADD_PACK_PROTOTYPES(SimulationConfig)
ADD_PACK_PROTOTYPES(SimpleTable)
ADD_PACK_PROTOTYPES(Tabdims)
ADD_PACK_PROTOTYPES(TableColumn)
ADD_PACK_PROTOTYPES(TableContainer)
ADD_PACK_PROTOTYPES(TableSchema)

View File

@ -40,6 +40,7 @@
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/Rock2dtrTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SimpleTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/Tabdims.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableColumn.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableContainer.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp>
@ -559,6 +560,17 @@ BOOST_AUTO_TEST_CASE(Phases)
}
BOOST_AUTO_TEST_CASE(Tabdims)
{
#if HAVE_MPI
Opm::Tabdims val1(1,2,3,4,5,6);
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;