ls1-MarDyn
ls1-MarDyn molecular dynamics code
Static Public Member Functions | Friends | List of all members
NeighborAcquirer Class Reference

Static Public Member Functions

static std::tuple< std::vector< CommunicationPartner >, std::vector< CommunicationPartner > > acquireNeighbors (const std::array< double, 3 > &globalDomainLength, HaloRegion *ownRegion, std::vector< HaloRegion > &desiredRegions, const MPI_Comm &comm, bool excludeOwnRank=true)
 
static std::vector< CommunicationPartnersqueezePartners (const std::vector< CommunicationPartner > &partners)
 

Friends

class NeighborAcquirerTest
 

Member Function Documentation

◆ acquireNeighbors()

std::tuple< std::vector< CommunicationPartner >, std::vector< CommunicationPartner > > NeighborAcquirer::acquireNeighbors ( const std::array< double, 3 > &  globalDomainLength,
HaloRegion ownRegion,
std::vector< HaloRegion > &  desiredRegions,
const MPI_Comm &  comm,
bool  excludeOwnRank = true 
)
static

Acquire the needed neighbors defined through the specific desired HaloRegions.

Parameters
domainThe domain object.
ownRegionThe region of the own process.
desiredRegionsThis is a vector of the desired regions. Partners are generated if at least parts of the desiredRegions lie outside of ownRegion.
partners01Vector of communication partners that contain domains outside of ownRegion.
partners02Vector of communication partners that contain domains inside of ownRegion.
commthe mpi communicator
excludeOwnRankSpecifies to not include CommunicationPartners communicating with the own rank.
Returns
A tuple of 2 vectors: The first vector represents the partners NOT owning the haloDomain, while the second vector will own the particles.

We now receive as many regions as we previously determined that we will receive. For that we keep track, how many regions we received and increase this according to the number of regions received per MPI operation.


The documentation for this class was generated from the following files: