ESyS-Particle
4.0.1
|
class for a cartesian communicator More...
#include <cart_comm.h>
Public Member Functions | |
TML_CartComm (TML_Comm *comm, vector< unsigned int > dims, vector< bool > circular) | |
TML_CartComm (TML_Comm *comm, unsigned int ndims, const vector< int > &dims, const vector< bool > &circular) | |
TML_CartComm (TML_Comm *, unsigned int, int *, int *) | |
vector< int > | get_coords (int) |
get coords of a process | |
vector< int > | get_coords () const |
get own coords | |
vector< int > | get_all_dims () const |
get size of communicator in all directions | |
int | get_dim (int) |
get size of communicator in one direction | |
int | get_ndim () const |
template<typename T , typename P > | |
void | shift (T, P &, int, int, int=0) |
shift ops | |
template<typename T , typename P > | |
void | shift_array (T *, int, P *, int, int, int, int=0) |
template<typename T , typename P > | |
void | shift_cont (T, P &, int, int, int=0) |
template<typename T , typename P > | |
void | shift_packed (T, P &, int, int, int=0) |
packed shift ops | |
template<typename T , typename P > | |
void | shift_array_packed (T *, int, P *, int, int, int, int=0) |
template<typename T , typename P > | |
void | shift_cont_packed (T, P &, int, int, int=0) |
![]() | |
bool | isNull () const |
int | rank () const |
int | size () |
MPI_Comm | comm () const |
TML_Comm & | operator= (const TML_Comm &) |
void | setComm (MPI_Comm) |
TML_Comm () | |
TML_Comm (MPI_Comm) | |
TML_Comm | include (const vector< int > &) |
TML_Comm | exclude (const vector< int > &) |
template<typename T > | |
void | send (T, int, int=0) |
template<typename T > | |
void | receive (T &, int, int=MPI_ANY_TAG) |
template<typename T > | |
void | send_array (T *, int, int, int=0) |
template<typename T > | |
void | receive_array (T *, int, int, int=MPI_ANY_TAG) |
template<typename T > | |
void | send_cont (const T &, int, int=0) |
template<typename T > | |
void | receive_cont (T &, int, int=MPI_ANY_TAG) |
template<typename T > | |
void | send_cont_packed (T, int, bool, int=0) |
template<typename T > | |
void | receive_cont_packed (T &, int, bool, int=MPI_ANY_TAG) |
template<typename T , typename P > | |
void | sendrecv (T, P &, int, int, int=0) |
template<typename T , typename P > | |
void | sendrecv_array (T *, int, P *, int, int, int, int=0) |
template<typename T , typename P > | |
void | sendrecv_cont (T, P &, int, int, int=0) |
template<typename T > | |
void | sendrecv_cont_replace (T &, int, int, int=0) |
template<typename T , typename P > | |
void | sendrecv_cont_packed (T, P &, int, int, bool, int=0) |
template<typename T > | |
void | sendrecv_cont_packed_replace (T &, int, int, bool, int=0) |
template<typename T > | |
void | broadcast (T) |
template<typename T > | |
void | broadcast_array (T *, int) |
template<typename T > | |
void | broadcast_cont (const T &) |
template<typename T > | |
void | broadcast_cont_packed (const T &) |
template<typename T > | |
void | recv_broadcast (T &, int) |
template<typename T > | |
void | recv_broadcast_array (T *, int, int) |
template<typename T > | |
void | recv_broadcast_cont (T &, int) |
template<typename T > | |
void | recv_broadcast_cont_packed (T &, int) |
template<typename T > | |
void | scatter (const multimap< int, T >) |
template<typename T > | |
void | recv_scatter (T &, int) |
template<typename T > | |
void | gather (multimap< int, T > &) |
template<typename T > | |
void | send_gather (T &, int) |
template<typename T > | |
void | gather_debug (multimap< int, T > &) |
template<typename T > | |
void | send_gather_debug (T &, int) |
template<typename T > | |
void | scatter_packed (const multimap< int, T >) |
template<typename T > | |
void | recv_scatter_packed (T &, int) |
template<typename T > | |
void | gather_packed (multimap< int, T > &) |
template<typename T > | |
void | send_gather_packed (const T &, int) |
template<typename T > | |
T | sum_all (const T &) |
void | barrier () |
void | barrier (const string &) |
Additional Inherited Members | |
![]() | |
MPI_Status | m_status |
MPI_Comm | m_comm |
class for a cartesian communicator
TML_CartComm::TML_CartComm | ( | TML_Comm * | old_comm, |
vector< unsigned int > | dims, | ||
vector< bool > | circular | ||
) |
Constructor, using an STL vector for boundary conditions and optionally prescribing dimensions. Dimensions are choosen according to the size of the communicator via MPI_Create_dims.
old_comm | the old communicator |
dims | the dimensions |
circular | circular boundaries |
References BasicCon::Debug().
TML_CartComm::TML_CartComm | ( | TML_Comm * | old_comm, |
unsigned int | ndims, | ||
const vector< int > & | dims, | ||
const vector< bool > & | circular | ||
) |
Constructor, using STL vectors for dimensions and boundary conditions
old_comm | the old communicator |
ndims | the number of dimensions |
dims | the dimensions |
circular | circular boundaries |
TML_CartComm::TML_CartComm | ( | TML_Comm * | old_comm, |
unsigned int | ndims, | ||
int * | dims, | ||
int * | circular | ||
) |
Constructor, using C arrays for dimensions and boundary conditions
old_comm | the old communicator |
ndims | the number of dimensions |
dims | the dimensions |
circular | circular boundaries |
vector< int > TML_CartComm::get_all_dims | ( | ) | const |
get size of communicator in all directions
Get size of the communicator in all directions
vector< int > TML_CartComm::get_coords | ( | int | rank | ) |
get coords of a process
Get cartesian coordinates of a given process in the communicator
rank | the rank of the process |
Referenced by ParallelParticleArray< T >::ParallelParticleArray().
vector< int > TML_CartComm::get_coords | ( | ) | const |
get own coords
Get cartesian coordinates of local process
int TML_CartComm::get_dim | ( | int | i | ) |
get size of communicator in one direction
get size of communicator in direction i
i | the number of the direction |
Referenced by ParallelParticleArray< T >::ParallelParticleArray().
void TML_CartComm::shift | ( | T | send_data, |
P & | recv_data, | ||
int | dir, | ||
int | dist, | ||
int | tag = 0 |
||
) |
shift ops
Shift a single value along a cartesian direction. Gets the source/destination with MPI_Cart_shift and moves the data with sendrecv. If the direction is out of range, nothing is done.
send_data | data to be sent |
recv | data data to be received |
dir | direction |
dist | the shift distance along dir |
tag | the message tag |
References TML_Comm::sendrecv().
void TML_CartComm::shift_array | ( | T * | send_data, |
int | send_count, | ||
P * | recv_data, | ||
int | recv_count, | ||
int | dir, | ||
int | dist, | ||
int | tag = 0 |
||
) |
Shift C-arrays of known size value along a cartesian direction. Gets the source/destination with MPI_Cart_shift and moves the data with sendrecv. If the direction is out of range, nothing is done.
send_data | data to be sent |
size | of arry to be sent |
recv | data data to be received |
size | of arry to be received |
dir | direction |
dist | the shift distance along dir |
tag | the message tag |
References TML_Comm::sendrecv().
void TML_CartComm::shift_array_packed | ( | T * | send_data, |
int | send_count, | ||
P * | recv_data, | ||
int | recv_count, | ||
int | dir, | ||
int | dist, | ||
int | tag = 0 |
||
) |
Shift C-arrays of packable objects of known size value along a cartesian direction. Gets the source/destination with MPI_Cart_shift and moves the data with sendrecv. If the direction is out of range, nothing is done.
send_data | data to be sent |
size | of arry to be sent |
recv | data data to be received |
size | of arry to be received |
dir | direction |
dist | the shift distance along dir |
tag | the message tag |
void TML_CartComm::shift_cont | ( | T | send_data, |
P & | recv_data, | ||
int | dir, | ||
int | dist, | ||
int | tag = 0 |
||
) |
Shift STL containers along a cartesian direction. Gets the source/destination with MPI_Cart_shift and moves the data with sendrecv. If the direction is out of range, nothing is done.
send_data | data to be sent |
recv | data data to be received |
dir | direction |
dist | the shift distance along dir |
tag | the message tag |
References TML_Comm::sendrecv_cont().
void TML_CartComm::shift_cont_packed | ( | T | send_data, |
P & | recv_data, | ||
int | dir, | ||
int | dist, | ||
int | tag = 0 |
||
) |
Shift STL containers of packable objects along a cartesian direction. Gets the source/destination with MPI_Cart_shift and moves the data with sendrecv. If the direction is out of range, nothing is done.
send_data | data to be sent |
recv | data data to be received |
dir | direction |
dist | the shift distance along dir |
tag | the message tag |
References TML_Comm::sendrecv_cont_packed().
void TML_CartComm::shift_packed | ( | T | send_data, |
P & | recv_data, | ||
int | dir, | ||
int | dist, | ||
int | tag = 0 |
||
) |
packed shift ops
Shift a single packable object along a cartesian direction. Gets the source/destination with MPI_Cart_shift and moves the data with sendrecv. If the direction is out of range, nothing is done.
send_data | data to be sent |
recv | data data to be received |
dir | direction |
dist | the shift distance along dir |
tag | the message tag |