Chi-Tech
AAH_AsynComm_senddownstreampsi.cc
Go to the documentation of this file.
1#include "AAH_AsynComm.h"
2
5
7
8//###################################################################
9/**Sends downstream psi. This method gets called after a sweep chunk has
10 * executed */
12SendDownstreamPsi(int angle_set_num)
13{
14 const auto& spds = fluds_.GetSPDS();
15
16 const auto& location_successors = spds.GetLocationSuccessors();
17
18 const size_t num_successors = location_successors.size();
19 for (size_t deplocI=0; deplocI<num_successors; deplocI++)
20 {
21 int locJ = location_successors[deplocI];
22
23 int num_mess = deplocI_message_count[deplocI];
24 for (int m=0; m<num_mess; m++)
25 {
26 u_ll_int block_addr = deplocI_message_blockpos[deplocI][m];
27 u_ll_int message_size = deplocI_message_size[deplocI][m];
28
29 const auto& outgoing_psi = fluds_.DeplocIOutgoingPsi()[deplocI];
30
31 MPI_Isend(&outgoing_psi[block_addr],
32 static_cast<int>(message_size),
33 MPI_DOUBLE,
34 comm_set_.MapIonJ(locJ,locJ),
35 max_num_mess*angle_set_num + m, //tag
37 &deplocI_message_request[deplocI][m]);
38 }//for message
39 }//for deplocI
40}
unsigned long long int u_ll_int
Definition: AAH_AsynComm.h:9
MPI_Comm LocICommunicator(int locI) const
int MapIonJ(int locI, int locJ) const
std::vector< std::vector< u_ll_int > > deplocI_message_blockpos
Definition: AAH_AsynComm.h:45
std::vector< std::vector< u_ll_int > > deplocI_message_size
Definition: AAH_AsynComm.h:41
std::vector< std::vector< MPI_Request > > deplocI_message_request
Definition: AAH_AsynComm.h:51
const chi::ChiMPICommunicatorSet & comm_set_
Definition: AsyncComm.h:36
virtual std::vector< std::vector< double > > & DeplocIOutgoingPsi()=0
const SPDS & GetSPDS() const
Definition: FLUDS.h:31
const VecInt & GetLocationSuccessors() const
Definition: SPDS.h:33