Loading...
Searching...
No Matches
terra::communication::shell::SubdomainNeighborhoodSendRecvBuffer< ScalarType, VecDim > Class Template Reference

Send and receive buffers for all process-local subdomain boundaries. More...

#include <communication.hpp>

Public Member Functions

 SubdomainNeighborhoodSendRecvBuffer (const grid::shell::DistributedDomain &domain)
 Constructs a SubdomainNeighborhoodSendRecvBuffer for the passed distributed domain object.
 
const grid::Grid0DDataVec< ScalarType, VecDim > & buffer_vertex (const grid::shell::SubdomainInfo &local_subdomain, const grid::BoundaryVertex local_boundary_vertex, const grid::shell::SubdomainInfo &neighbor_subdomain, const grid::BoundaryVertex neighbor_boundary_vertex) const
 Const reference to the view that is a buffer for a vertex of a subdomain.
 
const grid::Grid1DDataVec< ScalarType, VecDim > & buffer_edge (const grid::shell::SubdomainInfo &local_subdomain, const grid::BoundaryEdge local_boundary_edge, const grid::shell::SubdomainInfo &neighbor_subdomain, const grid::BoundaryEdge neighbor_boundary_edge) const
 Const reference to the view that is a buffer for an edge of a subdomain.
 
const grid::Grid2DDataVec< ScalarType, VecDim > & buffer_face (const grid::shell::SubdomainInfo &local_subdomain, const grid::BoundaryFace local_boundary_face, const grid::shell::SubdomainInfo &neighbor_subdomain, const grid::BoundaryFace neighbor_boundary_face) const
 Const reference to the view that is a buffer for a face of a subdomain.
 
grid::Grid0DDataVec< ScalarType, VecDim > & buffer_vertex (const grid::shell::SubdomainInfo &local_subdomain, const grid::BoundaryVertex local_boundary_vertex, const grid::shell::SubdomainInfo &neighbor_subdomain, const grid::BoundaryVertex neighbor_boundary_vertex)
 Mutable reference to the view that is a buffer for a vertex of a subdomain.
 
grid::Grid1DDataVec< ScalarType, VecDim > & buffer_edge (const grid::shell::SubdomainInfo &local_subdomain, const grid::BoundaryEdge local_boundary_edge, const grid::shell::SubdomainInfo &neighbor_subdomain, const grid::BoundaryEdge neighbor_boundary_edge)
 Mutable reference to the view that is a buffer for an edge of a subdomain.
 
grid::Grid2DDataVec< ScalarType, VecDim > & buffer_face (const grid::shell::SubdomainInfo &local_subdomain, const grid::BoundaryFace local_boundary_face, const grid::shell::SubdomainInfo &neighbor_subdomain, const grid::BoundaryFace neighbor_boundary_face)
 Mutable reference to the view that is a buffer for a face of a subdomain.
 

Detailed Description

template<typename ScalarType, int VecDim = 1>
class terra::communication::shell::SubdomainNeighborhoodSendRecvBuffer< ScalarType, VecDim >

Send and receive buffers for all process-local subdomain boundaries.

Allocates views for all boundaries of local subdomains. Those are the nodes that overlap with values from neighboring subdomains.

One buffer per local boundary + neighbor is allocated. So, for instance, for an edge shared with several neighbors, just as many buffers as neighbors are allocated. This facilitates the receiving step since all neighbors that a subdomain receives data from can send their data simultaneously.

Can be reused after communication (send + recv) has been completed to avoid unnecessary reallocation.

Constructor & Destructor Documentation

◆ SubdomainNeighborhoodSendRecvBuffer()

template<typename ScalarType , int VecDim = 1>
terra::communication::shell::SubdomainNeighborhoodSendRecvBuffer< ScalarType, VecDim >::SubdomainNeighborhoodSendRecvBuffer ( const grid::shell::DistributedDomain domain)
inlineexplicit

Constructs a SubdomainNeighborhoodSendRecvBuffer for the passed distributed domain object.

Member Function Documentation

◆ buffer_edge() [1/2]

template<typename ScalarType , int VecDim = 1>
grid::Grid1DDataVec< ScalarType, VecDim > & terra::communication::shell::SubdomainNeighborhoodSendRecvBuffer< ScalarType, VecDim >::buffer_edge ( const grid::shell::SubdomainInfo local_subdomain,
const grid::BoundaryEdge  local_boundary_edge,
const grid::shell::SubdomainInfo neighbor_subdomain,
const grid::BoundaryEdge  neighbor_boundary_edge 
)
inline

Mutable reference to the view that is a buffer for an edge of a subdomain.

◆ buffer_edge() [2/2]

template<typename ScalarType , int VecDim = 1>
const grid::Grid1DDataVec< ScalarType, VecDim > & terra::communication::shell::SubdomainNeighborhoodSendRecvBuffer< ScalarType, VecDim >::buffer_edge ( const grid::shell::SubdomainInfo local_subdomain,
const grid::BoundaryEdge  local_boundary_edge,
const grid::shell::SubdomainInfo neighbor_subdomain,
const grid::BoundaryEdge  neighbor_boundary_edge 
) const
inline

Const reference to the view that is a buffer for an edge of a subdomain.

Parameters
local_subdomainthe SubdomainInfo identifying the local subdomain
local_boundary_edgethe boundary edge of the local subdomain
neighbor_subdomainthe SubdomainInfo identifying the neighboring subdomain
neighbor_boundary_edgethe boundary edge of the neighboring subdomain
Returns
A const ref to a Kokkos::View with shape (N, VecDim), where N is the number of grid nodes on the edge and VecDim is the number of scalars per node (class template parameter).

◆ buffer_face() [1/2]

template<typename ScalarType , int VecDim = 1>
grid::Grid2DDataVec< ScalarType, VecDim > & terra::communication::shell::SubdomainNeighborhoodSendRecvBuffer< ScalarType, VecDim >::buffer_face ( const grid::shell::SubdomainInfo local_subdomain,
const grid::BoundaryFace  local_boundary_face,
const grid::shell::SubdomainInfo neighbor_subdomain,
const grid::BoundaryFace  neighbor_boundary_face 
)
inline

Mutable reference to the view that is a buffer for a face of a subdomain.

◆ buffer_face() [2/2]

template<typename ScalarType , int VecDim = 1>
const grid::Grid2DDataVec< ScalarType, VecDim > & terra::communication::shell::SubdomainNeighborhoodSendRecvBuffer< ScalarType, VecDim >::buffer_face ( const grid::shell::SubdomainInfo local_subdomain,
const grid::BoundaryFace  local_boundary_face,
const grid::shell::SubdomainInfo neighbor_subdomain,
const grid::BoundaryFace  neighbor_boundary_face 
) const
inline

Const reference to the view that is a buffer for a face of a subdomain.

Parameters
local_subdomainthe SubdomainInfo identifying the local subdomain
local_boundary_facethe boundary face of the local subdomain
neighbor_subdomainthe SubdomainInfo identifying the neighboring subdomain
neighbor_boundary_facethe boundary face of the neighboring subdomain
Returns
A const ref to a Kokkos::View with shape (N, M, VecDim), where N, M are the number of grid nodes on each side of the face and VecDim is the number of scalars per node (class template parameter).

◆ buffer_vertex() [1/2]

template<typename ScalarType , int VecDim = 1>
grid::Grid0DDataVec< ScalarType, VecDim > & terra::communication::shell::SubdomainNeighborhoodSendRecvBuffer< ScalarType, VecDim >::buffer_vertex ( const grid::shell::SubdomainInfo local_subdomain,
const grid::BoundaryVertex  local_boundary_vertex,
const grid::shell::SubdomainInfo neighbor_subdomain,
const grid::BoundaryVertex  neighbor_boundary_vertex 
)
inline

Mutable reference to the view that is a buffer for a vertex of a subdomain.

◆ buffer_vertex() [2/2]

template<typename ScalarType , int VecDim = 1>
const grid::Grid0DDataVec< ScalarType, VecDim > & terra::communication::shell::SubdomainNeighborhoodSendRecvBuffer< ScalarType, VecDim >::buffer_vertex ( const grid::shell::SubdomainInfo local_subdomain,
const grid::BoundaryVertex  local_boundary_vertex,
const grid::shell::SubdomainInfo neighbor_subdomain,
const grid::BoundaryVertex  neighbor_boundary_vertex 
) const
inline

Const reference to the view that is a buffer for a vertex of a subdomain.

Parameters
local_subdomainthe SubdomainInfo identifying the local subdomain
local_boundary_vertexthe boundary vertex of the local subdomain
neighbor_subdomainthe SubdomainInfo identifying the neighboring subdomain
neighbor_boundary_vertexthe boundary vertex of the neighboring subdomain
Returns
A const ref to a Kokkos::View with shape (VecDim), where VecDim is the number of scalars per node (class template parameter).

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