mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-09-05 04:40:19 -05:00
add mpi serialization for FaultCollection
This commit is contained in:
@@ -2005,6 +2005,12 @@ std::size_t packSize(const Fault& data,
|
||||
packSize(data.getFaceList(), comm);
|
||||
}
|
||||
|
||||
std::size_t packSize(const FaultCollection& data,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
return packSize(data.getFaults(), comm);
|
||||
}
|
||||
|
||||
////// pack routines
|
||||
|
||||
template<class T>
|
||||
@@ -3919,6 +3925,13 @@ void pack(const Fault& data,
|
||||
pack(data.getFaceList(), buffer, position, comm);
|
||||
}
|
||||
|
||||
void pack(const FaultCollection& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
pack(data.getFaults(), buffer, position, comm);
|
||||
}
|
||||
|
||||
/// unpack routines
|
||||
|
||||
template<class T>
|
||||
@@ -6659,6 +6672,16 @@ void unpack(Fault& data,
|
||||
data = Fault(name, transMult, faceList);
|
||||
}
|
||||
|
||||
void unpack(FaultCollection& data,
|
||||
std::vector<char>& buffer, int& position,
|
||||
Dune::MPIHelper::MPICommunicator comm)
|
||||
{
|
||||
OrderedMap<std::string, Fault> faults;
|
||||
|
||||
unpack(faults, buffer, position, comm);
|
||||
data = FaultCollection(faults);
|
||||
}
|
||||
|
||||
#define INSTANTIATE_PACK_VECTOR(...) \
|
||||
template std::size_t packSize(const std::vector<__VA_ARGS__>& data, \
|
||||
Dune::MPIHelper::MPICommunicator comm); \
|
||||
|
||||
@@ -92,6 +92,7 @@ class Equil;
|
||||
class EquilRecord;
|
||||
class Events;
|
||||
class Fault;
|
||||
class FaultCollection;
|
||||
class FaultFace;
|
||||
class FoamConfig;
|
||||
class FoamData;
|
||||
@@ -668,6 +669,7 @@ ADD_PACK_PROTOTYPES(Eqldims)
|
||||
ADD_PACK_PROTOTYPES(EquilRecord)
|
||||
ADD_PACK_PROTOTYPES(Events)
|
||||
ADD_PACK_PROTOTYPES(Fault)
|
||||
ADD_PACK_PROTOTYPES(FaultCollection)
|
||||
ADD_PACK_PROTOTYPES(FaultFace)
|
||||
ADD_PACK_PROTOTYPES(FoamConfig)
|
||||
ADD_PACK_PROTOTYPES(FoamData)
|
||||
|
||||
Reference in New Issue
Block a user