mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #2340 from joakim-hove/remove-UDQFunctionTable-serialization
Remove serialization support for UDQFunctionTable and UDQFunction
This commit is contained in:
commit
47e6b0d87d
@ -1465,19 +1465,7 @@ std::size_t packSize(const WListManager& data,
|
||||
return packSize(data.lists(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const UDQFunction& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.name(), comm) +
|
||||
packSize(data.type(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const UDQFunctionTable& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.getParams(), comm) +
|
||||
packSize(data.functionMap(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const UDQASTNode& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
@ -3223,21 +3211,6 @@ void pack(const WListManager& data,
|
||||
pack(data.lists(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const UDQFunction& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.name(), buffer, position, comm);
|
||||
pack(data.type(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const UDQFunctionTable& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.getParams(), buffer, position, comm);
|
||||
pack(data.functionMap(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const UDQASTNode& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
@ -5645,27 +5618,6 @@ void unpack(WListManager& data,
|
||||
data = WListManager(lists);
|
||||
}
|
||||
|
||||
void unpack(UDQFunction& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
std::string name;
|
||||
UDQTokenType type;
|
||||
unpack(name, buffer, position, comm);
|
||||
unpack(type, buffer, position, comm);
|
||||
data = UDQFunction(name, type);
|
||||
}
|
||||
|
||||
void unpack(UDQFunctionTable& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
UDQParams params;
|
||||
UDQFunctionTable::FunctionMap map;
|
||||
unpack(params, buffer, position, comm);
|
||||
unpack(map, buffer, position, comm);
|
||||
data = UDQFunctionTable(params, map);
|
||||
}
|
||||
|
||||
void unpack(UDQASTNode& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
|
@ -151,8 +151,6 @@ class UDAValue;
|
||||
class UDQASTNode;
|
||||
class UDQConfig;
|
||||
class UDQDefine;
|
||||
class UDQFunction;
|
||||
class UDQFunctionTable;
|
||||
class UDQIndex;
|
||||
class UDQParams;
|
||||
class UnitSystem;
|
||||
@ -764,8 +762,6 @@ ADD_PACK_PROTOTYPES(UDQAssign::AssignRecord)
|
||||
ADD_PACK_PROTOTYPES(UDQASTNode)
|
||||
ADD_PACK_PROTOTYPES(UDQConfig)
|
||||
ADD_PACK_PROTOTYPES(UDQDefine)
|
||||
ADD_PACK_PROTOTYPES(UDQFunction)
|
||||
ADD_PACK_PROTOTYPES(UDQFunctionTable)
|
||||
ADD_PACK_PROTOTYPES(UDQIndex)
|
||||
ADD_PACK_PROTOTYPES(UDQParams)
|
||||
ADD_PACK_PROTOTYPES(UnitSystem)
|
||||
|
@ -1745,28 +1745,6 @@ BOOST_AUTO_TEST_CASE(WListManager)
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(UDQFunction)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
Opm::UDQFunction val1("test", Opm::UDQTokenType::binary_op_add);
|
||||
auto val2 = PackUnpack(val1);
|
||||
DO_CHECKS(UDQFunction)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
DO_CHECKS(UDQFunctionTable)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(UDQASTNode)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
|
Loading…
Reference in New Issue
Block a user