mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add mpi serialization for TableContainer
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#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/TableContainer.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Tables/TableSchema.hpp>
|
||||
#include <opm/output/eclipse/RestartValue.hpp>
|
||||
|
||||
@@ -376,6 +377,22 @@ BOOST_AUTO_TEST_CASE(SimpleTable)
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(TableContainer)
|
||||
{
|
||||
#if HAVE_MPI
|
||||
Opm::OrderedMap<std::string, Opm::TableColumn> data;
|
||||
data.insert({"test3", getTableColumn()});
|
||||
Opm::SimpleTable tab1(getTableSchema(), data, true);
|
||||
Opm::TableContainer val1(2);
|
||||
val1.addTable(0, std::make_shared<const Opm::SimpleTable>(tab1));
|
||||
val1.addTable(1, std::make_shared<const Opm::SimpleTable>(tab1));
|
||||
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