mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add mpi serialization for SimpleTable
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/ColumnSchema.hpp>
|
||||
#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/TableColumn.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp>
|
||||
#include <opm/output/eclipse/RestartValue.hpp>
|
||||
@@ -139,6 +140,14 @@ Opm::TableColumn getTableColumn()
|
||||
}
|
||||
|
||||
|
||||
Opm::SimpleTable getSimpleTable()
|
||||
{
|
||||
Opm::OrderedMap<std::string, Opm::TableColumn> data;
|
||||
data.insert({"test3", getTableColumn()});
|
||||
return Opm::SimpleTable(getTableSchema(), data, true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -356,6 +365,17 @@ BOOST_AUTO_TEST_CASE(TableColumn)
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(SimpleTable)
|
||||
{
|
||||
#if HAVE_MPI
|
||||
Opm::SimpleTable val1 = getSimpleTable();
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user