ThunderEgg  1.0.0
ThunderEgg::Schur::PatchIfaceScatter< D > Class Template Reference

Scatters between a global Schur compliment vector and a local patch iface vector. More...

#include <PatchIfaceScatter.h>

Public Member Functions

void setIncomingBufferMapsAndDetermineLocalVectorSize (const InterfaceDomain< D > &iface_domain)
 Set the incoming buffer maps (incoming_rank_to_local_indexes) and set num_local_patch_ifaces. More...
 
void setOutgoingBufferMaps (const InterfaceDomain< D > &iface_domain)
 Set the outgoing buffer maps (outgoing_rank_to_local_indexes) More...
 
State initializeMPIBuffers () const
 Initialize the mpi buffers.
 
 PatchIfaceScatter (const InterfaceDomain< D > &iface_domain)
 Construct a new PatchIfaceScatter object. More...
 
std::shared_ptr< Vector< D - 1 > > getNewLocalPatchIfaceVector () const
 Get a nw local patch iface vector. More...
 
State scatterStart (const Vector< D - 1 > &global_vector, Vector< D - 1 > &local_patch_iface_vector) const
 Start the scatter from the global Schur compliment vector to the local patch iface vector. More...
 
void scatterFinish (const State &state, const Vector< D - 1 > &global_vector, Vector< D - 1 > &local_patch_iface_vector) const
 Finish the scatter from the global Schur compliment vector to the local patch iface vector. More...
 

Public Attributes

std::array< int, D - 1 > lengths
 the number of cells in each direction of the interface
 
int num_local_patch_ifaces
 the number of interfaces in the local vector
 
int iface_stride
 the number of interfaces in the local vector
 
int num_sends
 number of MPI sends
 
std::vector< int > send_ranks
 MPI Send ranks.
 
std::vector< std::vector< int > > send_local_indexes
 the local indexes of the local vector to send
 
int num_recvs
 number of MPI recvs
 
std::vector< int > recv_ranks
 MPI recv ranks.
 
std::vector< std::vector< int > > recv_local_indexes
 local indexes of the local vector to receive
 

Detailed Description

template<int D>
class ThunderEgg::Schur::PatchIfaceScatter< D >

Scatters between a global Schur compliment vector and a local patch iface vector.

The scatters functions are split with a Start and Finish, this allows for local computation to occur while the communicating

Template Parameters
Dthe number of cartesian dimensions on a patch

Constructor & Destructor Documentation

◆ PatchIfaceScatter()

template<int D>
ThunderEgg::Schur::PatchIfaceScatter< D >::PatchIfaceScatter ( const InterfaceDomain< D > &  iface_domain)
inlineexplicit

Construct a new PatchIfaceScatter object.

Parameters
iface_domainthe InterfaceDomain

Member Function Documentation

◆ getNewLocalPatchIfaceVector()

template<int D>
std::shared_ptr<Vector<D - 1> > ThunderEgg::Schur::PatchIfaceScatter< D >::getNewLocalPatchIfaceVector ( ) const
inline

Get a nw local patch iface vector.

Returns
std::shared_ptr<Vector<D - 1>> the new vector

◆ scatterFinish()

template<int D>
void ThunderEgg::Schur::PatchIfaceScatter< D >::scatterFinish ( const State &  state,
const Vector< D - 1 > &  global_vector,
Vector< D - 1 > &  local_patch_iface_vector 
) const
inline

Finish the scatter from the global Schur compliment vector to the local patch iface vector.

Will throw an exception if different vectors are passed from when scatterStart was called

Parameters
global_vectorthe global Schur compliment vector
local_patch_iface_vectorthe the local patch iface vector

◆ scatterStart()

template<int D>
State ThunderEgg::Schur::PatchIfaceScatter< D >::scatterStart ( const Vector< D - 1 > &  global_vector,
Vector< D - 1 > &  local_patch_iface_vector 
) const
inline

Start the scatter from the global Schur compliment vector to the local patch iface vector.

Interfaces that are local to this processor will be copied to the local_patch_iface_vector at the end of this call

Will throw an exception if any communcation is in progress

Parameters
global_vectorthe global Schur compliment vector
local_patch_iface_vectorthe the local patch iface vector

◆ setIncomingBufferMapsAndDetermineLocalVectorSize()

template<int D>
void ThunderEgg::Schur::PatchIfaceScatter< D >::setIncomingBufferMapsAndDetermineLocalVectorSize ( const InterfaceDomain< D > &  iface_domain)
inline

Set the incoming buffer maps (incoming_rank_to_local_indexes) and set num_local_patch_ifaces.

Parameters
iface_domainthe InterfaceDomain

◆ setOutgoingBufferMaps()

template<int D>
void ThunderEgg::Schur::PatchIfaceScatter< D >::setOutgoingBufferMaps ( const InterfaceDomain< D > &  iface_domain)
inline

Set the outgoing buffer maps (outgoing_rank_to_local_indexes)

Parameters
iface_domainthe InterfaceDomain

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