mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-09 10:15:34 -06:00
remove old serialization support for UnitSystem
This commit is contained in:
parent
02af915917
commit
d905e0f037
@ -346,22 +346,6 @@ std::size_t packSize(const std::unique_ptr<T>& data,
|
||||
return size;
|
||||
}
|
||||
|
||||
std::size_t packSize(const Dimension& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.getSIScalingRaw(), comm) +
|
||||
packSize(data.getSIOffset(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const UnitSystem& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.getName(), comm) +
|
||||
packSize(data.getType(), comm) +
|
||||
packSize(data.getDimensions(), comm) +
|
||||
packSize(data.use_count(), comm);
|
||||
}
|
||||
|
||||
////// pack routines
|
||||
|
||||
template<class T>
|
||||
@ -657,24 +641,6 @@ void pack(const std::unique_ptr<T>& data, std::vector<char>& buffer, int& positi
|
||||
pack(*data, buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const Dimension& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.getSIScalingRaw(), buffer, position, comm);
|
||||
pack(data.getSIOffset(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const UnitSystem& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.getName(), buffer, position, comm);
|
||||
pack(data.getType(), buffer, position, comm);
|
||||
pack(data.getDimensions(), buffer, position, comm);
|
||||
pack(data.use_count(), buffer, position, comm);
|
||||
}
|
||||
|
||||
/// unpack routines
|
||||
|
||||
template<class T>
|
||||
@ -1020,33 +986,6 @@ void unpack(std::unique_ptr<T>& data, std::vector<char>& buffer, int& position,
|
||||
}
|
||||
}
|
||||
|
||||
void unpack(Dimension& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
double siScaling, siOffset;
|
||||
|
||||
unpack(siScaling, buffer, position, comm);
|
||||
unpack(siOffset, buffer, position, comm);
|
||||
data = Dimension(siScaling, siOffset);
|
||||
}
|
||||
|
||||
void unpack(UnitSystem& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
std::string name;
|
||||
UnitSystem::UnitType type;
|
||||
std::map<std::string, Dimension> dimensions;
|
||||
size_t use_count;
|
||||
unpack(name, buffer, position, comm);
|
||||
unpack(type, buffer, position, comm);
|
||||
unpack(dimensions, buffer, position, comm);
|
||||
unpack(use_count, buffer, position, comm);
|
||||
|
||||
data = UnitSystem(name, type, dimensions, use_count);
|
||||
}
|
||||
|
||||
#define INSTANTIATE_PACK_VECTOR(...) \
|
||||
template std::size_t packSize(const std::vector<__VA_ARGS__>& data, \
|
||||
Dune::MPIHelper::MPICommunicator comm); \
|
||||
|
@ -40,7 +40,6 @@
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
class UnitSystem;
|
||||
class VFPInjTable;
|
||||
class VFPProdTable;
|
||||
|
||||
@ -352,7 +351,6 @@ ADD_PACK_PROTOTYPES(data::WellRates)
|
||||
ADD_PACK_PROTOTYPES(RestartKey)
|
||||
ADD_PACK_PROTOTYPES(RestartValue)
|
||||
ADD_PACK_PROTOTYPES(std::string)
|
||||
ADD_PACK_PROTOTYPES(UnitSystem)
|
||||
ADD_PACK_PROTOTYPES(VFPInjTable)
|
||||
ADD_PACK_PROTOTYPES(VFPProdTable)
|
||||
|
||||
|
@ -1552,7 +1552,7 @@ BOOST_AUTO_TEST_CASE(UnitSystem)
|
||||
{
|
||||
#ifdef HAVE_MPI
|
||||
Opm::UnitSystem val1(Opm::UnitSystem::UnitType::UNIT_TYPE_METRIC);
|
||||
auto val2 = PackUnpack(val1);
|
||||
auto val2 = PackUnpack2(val1);
|
||||
DO_CHECKS(UnitSystem)
|
||||
#endif
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user