Neighborhood information of a single subdomain. More...
#include <spherical_shell.hpp>
Public Types | |
| using | UnpackOrderingEdge = BoundaryDirection |
| using | UnpackOrderingFace = std::tuple< BoundaryDirection, BoundaryDirection > |
| using | NeighborSubdomainTupleVertex = std::tuple< SubdomainInfo, BoundaryVertex, mpi::MPIRank > |
| using | NeighborSubdomainTupleEdge = std::tuple< SubdomainInfo, BoundaryEdge, UnpackOrderingEdge, mpi::MPIRank > |
| using | NeighborSubdomainTupleFace = std::tuple< SubdomainInfo, BoundaryFace, UnpackOrderingFace, mpi::MPIRank > |
Public Member Functions | |
| SubdomainNeighborhood ()=default | |
| SubdomainNeighborhood (const DomainInfo &domain_info, const SubdomainInfo &subdomain_info, const SubdomainToRankDistributionFunction &subdomain_to_rank) | |
| const std::map< BoundaryVertex, std::vector< NeighborSubdomainTupleVertex > > & | neighborhood_vertex () const |
| const std::map< BoundaryEdge, std::vector< NeighborSubdomainTupleEdge > > & | neighborhood_edge () const |
| const std::map< BoundaryFace, NeighborSubdomainTupleFace > & | neighborhood_face () const |
Neighborhood information of a single subdomain.
Holds information such as the MPI ranks of the neighboring subdomains, and their orientation. Required for communication (packing, unpacking, sending, receiving 'ghost-layer' data).
Details on communication
Data is rotated during unpacking.
Packing/sending
Sender just packs data from the grid into a buffer using the (x, y, r) coordinates in order. For instance: the face boundary xr is packed into a 2D buffer: buffer( x, r ), the face boundary yr is packed as buffer( y, r ), always iterating locally from 0 to end.
Unpacking
When a packet from a certain neighbor subdomain arrives, we have the following information set up in this class (for instance in the NeighborSubdomainTupleFace instances):
Organization
At each boundary face of a local subdomain we store in this class a list of tuples with entries:
SubdomainInfo: neighboring subdomain identifier BoundaryFace: boundary face of the neighboring subdomain (from its local view) UnpackingOrderingFace: information how to iterate over the buffer for each coordinate during unpacking
So e.g., the data (for some subdomain):
means that for this subdomain, the boundary face F_X1R interfaces with the neighbor subdomain neighbor_subdomain_info, at its boundary F_1YR, that is located on rank neighbor_rank. If we unpack data that we receive from the subdomain, we must invert the iteration over the first buffer index, and move forward in the second index.
F_X1R. Roughly: 0 == start, 1 == end, X == varying in x, Y == varying in y, R == varying in r.Execution
Let's assume we receive data from the neighbor specified above.
Sender side (with local boundary F_1YR):
Receiver side (with local boundary F_X1R):
| using terra::grid::shell::SubdomainNeighborhood::NeighborSubdomainTupleEdge = std::tuple< SubdomainInfo, BoundaryEdge, UnpackOrderingEdge, mpi::MPIRank > |
| using terra::grid::shell::SubdomainNeighborhood::NeighborSubdomainTupleFace = std::tuple< SubdomainInfo, BoundaryFace, UnpackOrderingFace, mpi::MPIRank > |
| using terra::grid::shell::SubdomainNeighborhood::NeighborSubdomainTupleVertex = std::tuple< SubdomainInfo, BoundaryVertex, mpi::MPIRank > |
| using terra::grid::shell::SubdomainNeighborhood::UnpackOrderingFace = std::tuple< BoundaryDirection, BoundaryDirection > |
|
default |
|
inline |
|
inline |
|
inline |
|
inline |