mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove old serialization support for UDAValue
This commit is contained in:
@@ -324,15 +324,6 @@ std::size_t packSize(const VFPProdTable& data,
|
||||
packSize(data.getTable(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const UDAValue& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.get_dim(), comm) +
|
||||
packSize(data.is<double>(), comm) +
|
||||
(data.is<double>() ? packSize(data.get<double>(), comm) :
|
||||
packSize(data.get<std::string>(), comm));
|
||||
}
|
||||
|
||||
template<class T>
|
||||
std::size_t packSize(const std::shared_ptr<T>& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
@@ -648,18 +639,6 @@ void pack(const VFPProdTable& data,
|
||||
pack(data.getTable(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const UDAValue& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.get_dim(), buffer, position, comm);
|
||||
pack(data.is<double>(), buffer, position, comm);
|
||||
if (data.is<double>())
|
||||
pack(data.get<double>(), buffer, position, comm);
|
||||
else
|
||||
pack(data.get<std::string>(), buffer, position, comm);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void pack(const std::shared_ptr<T>& data, std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
@@ -1017,25 +996,6 @@ void unpack(VFPProdTable& data,
|
||||
wfrAxis, gfrAxis, alqAxis, table);
|
||||
}
|
||||
|
||||
void unpack(UDAValue& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
bool isDouble;
|
||||
Dimension dim;
|
||||
unpack(dim, buffer, position, comm);
|
||||
unpack(isDouble, buffer, position, comm);
|
||||
if (isDouble) {
|
||||
double val;
|
||||
unpack(val, buffer, position, comm);
|
||||
data = UDAValue(val, dim);
|
||||
} else {
|
||||
std::string val;
|
||||
unpack(val, buffer, position, comm);
|
||||
data = UDAValue(val, dim);
|
||||
}
|
||||
}
|
||||
|
||||
template<class T>
|
||||
void unpack(std::shared_ptr<T>& data, std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
|
||||
@@ -41,7 +41,6 @@ namespace Opm
|
||||
{
|
||||
|
||||
class Dimension;
|
||||
class UDAValue;
|
||||
class UnitSystem;
|
||||
class VFPInjTable;
|
||||
class VFPProdTable;
|
||||
@@ -355,7 +354,6 @@ ADD_PACK_PROTOTYPES(Dimension)
|
||||
ADD_PACK_PROTOTYPES(RestartKey)
|
||||
ADD_PACK_PROTOTYPES(RestartValue)
|
||||
ADD_PACK_PROTOTYPES(std::string)
|
||||
ADD_PACK_PROTOTYPES(UDAValue)
|
||||
ADD_PACK_PROTOTYPES(UnitSystem)
|
||||
ADD_PACK_PROTOTYPES(VFPInjTable)
|
||||
ADD_PACK_PROTOTYPES(VFPProdTable)
|
||||
|
||||
@@ -1393,10 +1393,10 @@ BOOST_AUTO_TEST_CASE(UDAValue)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
Opm::UDAValue val1("test");
|
||||
auto val2 = PackUnpack(val1);
|
||||
auto val2 = PackUnpack2(val1);
|
||||
DO_CHECKS(UDAValue)
|
||||
val1 = Opm::UDAValue(1.0);
|
||||
val2 = PackUnpack(val1);
|
||||
val2 = PackUnpack2(val1);
|
||||
DO_CHECKS(UDAValue)
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user