mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
add mpi serialization for DeckRecord
This commit is contained in:
@@ -1474,6 +1474,12 @@ std::size_t packSize(const DeckItem& data,
|
||||
packSize(data.defaultDimensions(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const DeckRecord& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.getItems(), comm);
|
||||
}
|
||||
|
||||
////// pack routines
|
||||
|
||||
template<class T>
|
||||
@@ -2975,6 +2981,13 @@ void pack(const DeckItem& data,
|
||||
pack(data.defaultDimensions(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const DeckRecord& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.getItems(), buffer, position, comm);
|
||||
}
|
||||
|
||||
/// unpack routines
|
||||
|
||||
template<class T>
|
||||
@@ -5087,6 +5100,15 @@ void unpack(DeckItem& data,
|
||||
valueStatus, rawData, activeDimensions, defaultDimensions);
|
||||
}
|
||||
|
||||
void unpack(DeckRecord& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
std::vector<DeckItem> items;
|
||||
unpack(items, buffer, position, comm);
|
||||
data = DeckRecord(std::move(items));
|
||||
}
|
||||
|
||||
#define INSTANTIATE_PACK_VECTOR(T) \
|
||||
template std::size_t packSize(const std::vector<T>& data, \
|
||||
Dune::MPIHelper::MPICommunicator comm); \
|
||||
|
||||
@@ -67,6 +67,7 @@ class Aqudims;
|
||||
class ColumnSchema;
|
||||
class Connection;
|
||||
class DeckItem;
|
||||
class DeckRecord;
|
||||
class DENSITYRecord;
|
||||
class DensityTable;
|
||||
class Dimension;
|
||||
@@ -594,6 +595,7 @@ ADD_PACK_PROTOTYPES(data::Solution)
|
||||
ADD_PACK_PROTOTYPES(data::Well)
|
||||
ADD_PACK_PROTOTYPES(data::WellRates)
|
||||
ADD_PACK_PROTOTYPES(DeckItem)
|
||||
ADD_PACK_PROTOTYPES(DeckRecord)
|
||||
ADD_PACK_PROTOTYPES(DENSITYRecord)
|
||||
ADD_PACK_PROTOTYPES(DensityTable)
|
||||
ADD_PACK_PROTOTYPES(Dimension)
|
||||
|
||||
Reference in New Issue
Block a user