Manages the data exchange in a DEM simulation.
More...
#include <mpi_manager.hpp>
Manages the data exchange in a DEM simulation.
Basicly, a DEM cycle would involve three rounds of data exchange:
- Round one: exchange particles as proxies and their corresponding contacts. A particle will be sent as a proxy as its surface exceeds the domain boundary (such that it could potentially contact with particles in other domains). If a particle needs to be sent to other domains as a proxy, its contacts need also to be sent.
- Round two: exchange the contacts of particle proxies back to its original domain, so that the contact forces could be applied onto the original particles.
- Round three: excange particles and their corresponding contacts if particle get out of the domain (i.e., the particle turn to belong to another domain after updating its positions at the end of a DEM cycle).
Terminologies:
- Particle proxy or contact proxy: Particle belongs to one domain, whereas if it overlaps with other domain, it needs to seed out as a proxy for contact detection and resolution. Thus, proxy means a real object but not belongs to one domain.
- Particle ghost: If a particle is gone (e.g., removed or migrated to another domain), it will leave a ghost copy of itself (to prevent the nullptr particle in the contacts). Thus, ghost means a virtual object.
- Note: proxy and ghost may exchange, which has facilitated the programming and computational efficiency.
◆ MPIManager()
netdem::MPIManager::MPIManager |
( |
| ) |
|
◆ ~MPIManager()
netdem::MPIManager::~MPIManager |
( |
| ) |
|
◆ BuildContactRefTable()
void netdem::MPIManager::BuildContactRefTable |
( |
| ) |
|
Build a look-up table for contacts between particles.
◆ ClearContactRefTable()
void netdem::MPIManager::ClearContactRefTable |
( |
| ) |
|
Clear the contact look-up table.
◆ CommitMPIDataType()
void netdem::MPIManager::CommitMPIDataType |
( |
| ) |
|
Commit the MPI data type for particle exchange.
◆ ExchangeDataBack()
void netdem::MPIManager::ExchangeDataBack |
( |
| ) |
|
Send exchanged data to original processors using ghost particles as proxies.
◆ ExchangeDataProxy()
void netdem::MPIManager::ExchangeDataProxy |
( |
| ) |
|
Exchange data between processors using particle proxies.
◆ ExchangeDataTransfer()
void netdem::MPIManager::ExchangeDataTransfer |
( |
| ) |
|
Exchange data between processors using ghost particles as proxies.
◆ GetSelfRank()
int netdem::MPIManager::GetSelfRank |
( |
| ) |
const |
Get the rank id of the domain.
◆ GetSelfRankStatic()
int netdem::MPIManager::GetSelfRankStatic |
( |
| ) |
|
|
static |
Gets the rank of the current process
- Returns
- The rank of the current process
◆ GetTotalRank()
int netdem::MPIManager::GetTotalRank |
( |
| ) |
const |
Get the total ranks of the simulation.
◆ GetTotalRankStatic()
int netdem::MPIManager::GetTotalRankStatic |
( |
| ) |
|
|
static |
Gets the total number of ranks
- Returns
- The total number of ranks
◆ Init()
◆ RecycleParticleGhost()
void netdem::MPIManager::RecycleParticleGhost |
( |
| ) |
|
◆ RecycleParticleProxy()
void netdem::MPIManager::RecycleParticleProxy |
( |
| ) |
|
Recycle a particle proxy.
◆ SyncContactToGhostSubDomains()
void netdem::MPIManager::SyncContactToGhostSubDomains |
( |
| ) |
|
Synchronize contact information with ghost sub-domains.
◆ SyncDataAmongProcessors() [1/2]
void netdem::MPIManager::SyncDataAmongProcessors |
( |
VecXT< double > *const | data | ) |
|
|
static |
Synchronizes data among all processes for a double vector
- Parameters
-
data | Pointer to the double vector to synchronize |
◆ SyncDataAmongProcessors() [2/2]
void netdem::MPIManager::SyncDataAmongProcessors |
( |
VecXT< int > *const | data | ) |
|
|
static |
Synchronizes data among all processes for an integer vector
- Parameters
-
data | Pointer to the integer vector to synchronize |
◆ SyncParticleToGhostSubDomains()
void netdem::MPIManager::SyncParticleToGhostSubDomains |
( |
| ) |
|
Synchronize particle information with ghost sub-domains.
◆ SyncShapeToAllProcessors()
void netdem::MPIManager::SyncShapeToAllProcessors |
( |
| ) |
|
Synchronize shape information between all processors.
◆ SyncWallToGhostSubDomains()
void netdem::MPIManager::SyncWallToGhostSubDomains |
( |
| ) |
|
Synchronize wall information with ghost sub-domains.
The documentation for this class was generated from the following files:
- /Users/lzhshou/Documents/Research/myProjects/apaam/repo/netdem/src/mpi/mpi_manager.hpp
- /Users/lzhshou/Documents/Research/myProjects/apaam/repo/netdem/src/mpi/mpi_manager.cpp