add mpi serialization for UDQFunctionTable

This commit is contained in:
Arne Morten Kvarving
2020-01-02 12:03:54 +01:00
parent abe09ae93d
commit 5873b56025
3 changed files with 43 additions and 0 deletions
+14
View File
@@ -44,6 +44,7 @@
#include <opm/parser/eclipse/EclipseState/Schedule/OilVaporizationProperties.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/TimeMap.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunction.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/UDQ/UDQFunctionTable.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/Well/Connection.hpp>
@@ -1676,6 +1677,19 @@ BOOST_AUTO_TEST_CASE(UDQFunction)
}
BOOST_AUTO_TEST_CASE(UDQFunctionTable)
{
#ifdef HAVE_MPI
Opm::UDQFunctionTable::FunctionMap map{{"test",
std::make_shared<Opm::UDQFunction>()}};
Opm::UDQFunctionTable val1(Opm::UDQParams(true, 1, 2.0, 3.0, 4.0), map);
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;