mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove old serialization support for UnitSystem
This commit is contained in:
@@ -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); \
|
||||
|
||||
Reference in New Issue
Block a user