mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add mpi serialization for UDQActive
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/MSW/Valve.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQActive.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQAssign.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQASTNode.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQConfig.hpp>
|
||||
@@ -1791,6 +1792,45 @@ BOOST_AUTO_TEST_CASE(UDQConfig)
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(UDQActiveInputRecord)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
Opm::UDQActive::InputRecord val1(1, "test1", "test2",
|
||||
Opm::UDAControl::WCONPROD_ORAT);
|
||||
auto val2 = PackUnpack(val1);
|
||||
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
|
||||
BOOST_CHECK(val1 == std::get<0>(val2));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(UDQActiveRecord)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
Opm::UDQActive::Record val1("test1", 1, 2, "test2",
|
||||
Opm::UDAControl::WCONPROD_ORAT);
|
||||
auto val2 = PackUnpack(val1);
|
||||
BOOST_CHECK(std::get<1>(val2) == std::get<2>(val2));
|
||||
BOOST_CHECK(val1 == std::get<0>(val2));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(UDQActive)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
Opm::UDQActive val1({Opm::UDQActive::InputRecord(1, "test1", "test2",
|
||||
Opm::UDAControl::WCONPROD_ORAT)},
|
||||
{Opm::UDQActive::Record("test1", 1, 2, "test2",
|
||||
Opm::UDAControl::WCONPROD_ORAT)},
|
||||
{{"test1", 1}}, {{"test2", 2}});
|
||||
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