XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
send_recv_potential.hpp File Reference
#include "grid_field.hpp"
#include "domain_decomposition.hpp"
Include dependency graph for send_recv_potential.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void cyclical_send_recv (const DomainDecomposition< DeviceType > &pol_decomp, View< double *, CLayout, HostType > &send_buf, View< double *, CLayout, HostType > &recv_buf, GridField< HostType, VarType::Scalar, PhiInterpType::None, TorType::MultiplePlanes, KinType::DriftKin > &grid_field, int desired_plane, int source_rank)
 
void send_recv_potential (const DomainDecomposition< DeviceType > &pol_decomp, GridField< HostType, VarType::Scalar, PhiInterpType::None, TorType::MultiplePlanes, KinType::DriftKin > &potential)
 

Function Documentation

void cyclical_send_recv ( const DomainDecomposition< DeviceType > &  pol_decomp,
View< double *, CLayout, HostType > &  send_buf,
View< double *, CLayout, HostType > &  recv_buf,
GridField< HostType, VarType::Scalar, PhiInterpType::None, TorType::MultiplePlanes, KinType::DriftKin > &  grid_field,
int  desired_plane,
int  source_rank 
)

Gathers requested data from grid_field of other MPI ranks. The grid_fields are assumed to have 2 ghost planes on the left; thus, their offset with respect to the global numbering of planes is my_intpl_rank-2. This information, as well as the global plane index of the data the user wishes to gather, and the MPI rank to fetch this data from, is sufficient to create a cyclical communication (looping around the simulation in the toroidal direction) so every rank gets the requested data.

Parameters
[in]pol_decompis the domain decomposition and is used here to determine offsets and for MPI
[out]send_bufis a temporary allocation used by the function
[out]recv_bufis a temporary allocation used by the function
[in,out]grid_fieldis the data that will be updated by data from the grid_field of other MPI ranks
[in]desired_planeis the global plane index that is desired to be copied to the local grid_field
[in]source_rankis which MPI interplanar rank the desired plane data should be fetched from
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function:

void send_recv_potential ( const DomainDecomposition< DeviceType > &  pol_decomp,
GridField< HostType, VarType::Scalar, PhiInterpType::None, TorType::MultiplePlanes, KinType::DriftKin > &  potential 
)

Gathers data of the input potential belonging to the two neighboring planes to the left and the one to the right. The values in the third plane are presumed to be valid; these are shared with the three planes that need it. (The one to the left and the two to the right.)

Parameters
[in]pol_decompis the domain decomposition and is used here to determine offsets and for MPI
[in,out]potentialis a GridField with 4 planes. Plane 2 is an input; Planes 0, 1, and 3 are populated from other ranks
Returns
void

Here is the call graph for this function:

Here is the caller graph for this function: