mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
AquiferFetkovich: add serialization of dynamic state
This commit is contained in:
@@ -170,6 +170,24 @@ BOOST_AUTO_TEST_CASE(AquiferCarterTracy)
|
||||
BOOST_CHECK_MESSAGE(data_out == data_in, "Deserialized AquiferCarterTracy differ");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(AquiferFetkovich)
|
||||
{
|
||||
using TT = Opm::Properties::TTag::EbosTypeTag;
|
||||
Opm::EclGenericVanguard::readDeck("GLIFT1.DATA");
|
||||
using Simulator = Opm::GetPropType<TT, Opm::Properties::Simulator>;
|
||||
Simulator sim;
|
||||
auto data_out = Opm::AquiferFetkovich<TT>::serializationTestObject(sim);
|
||||
Opm::Serialization::MemPacker packer;
|
||||
Opm::Serializer ser(packer);
|
||||
ser.pack(data_out);
|
||||
size_t pos1 = ser.position();
|
||||
decltype(data_out) data_in({}, sim, {});
|
||||
ser.unpack(data_in);
|
||||
size_t pos2 = ser.position();
|
||||
BOOST_CHECK_MESSAGE(pos1 == pos2, "Packed size differ from unpack size for AquiferFetkovich");
|
||||
BOOST_CHECK_MESSAGE(data_out == data_in, "Deserialized AquiferFetkovich differ");
|
||||
}
|
||||
|
||||
bool init_unit_test_func()
|
||||
{
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user