ESyS-Particle  4.0.1
Public Member Functions
TML_CartComm Class Reference

class for a cartesian communicator More...

#include <cart_comm.h>

Inheritance diagram for TML_CartComm:
Inheritance graph
[legend]
Collaboration diagram for TML_CartComm:
Collaboration graph
[legend]

List of all members.

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)

Detailed Description

class for a cartesian communicator

Author:
Steffen Abe $Revision$ $Date$

Constructor & Destructor Documentation

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.

Parameters:
old_commthe old communicator
dimsthe dimensions
circularcircular boundaries

References BasicCon::Debug().

Here is the call graph for this function:

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

Parameters:
old_commthe old communicator
ndimsthe number of dimensions
dimsthe dimensions
circularcircular 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

Parameters:
old_commthe old communicator
ndimsthe number of dimensions
dimsthe dimensions
circularcircular boundaries
Warning:
no checking of nr. of dims and boundary cond.

Member Function Documentation

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

Parameters:
rankthe rank of the process

Referenced by ParallelParticleArray< T >::ParallelParticleArray().

Here is the caller graph for this function:

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

Parameters:
ithe number of the direction

Referenced by ParallelParticleArray< T >::ParallelParticleArray().

Here is the caller graph for this function:

template<typename T , typename P >
void TML_CartComm::shift ( 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.

Parameters:
send_datadata to be sent
recvdata data to be received
dirdirection
distthe shift distance along dir
tagthe message tag

References TML_Comm::sendrecv().

Here is the call graph for this function:

template<typename T , typename P >
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.

Parameters:
send_datadata to be sent
sizeof arry to be sent
recvdata data to be received
sizeof arry to be received
dirdirection
distthe shift distance along dir
tagthe message tag

References TML_Comm::sendrecv().

Here is the call graph for this function:

template<typename T , typename P >
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.

Parameters:
send_datadata to be sent
sizeof arry to be sent
recvdata data to be received
sizeof arry to be received
dirdirection
distthe shift distance along dir
tagthe message tag
template<typename T , typename P >
void TML_CartComm::shift_cont ( 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.

Parameters:
send_datadata to be sent
recvdata data to be received
dirdirection
distthe shift distance along dir
tagthe message tag

References TML_Comm::sendrecv_cont().

Here is the call graph for this function:

template<typename T , typename P >
void TML_CartComm::shift_cont_packed ( 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.

Parameters:
send_datadata to be sent
recvdata data to be received
dirdirection
distthe shift distance along dir
tagthe message tag

References TML_Comm::sendrecv_cont_packed().

Here is the call graph for this function:

template<typename T , typename P >
void TML_CartComm::shift_packed ( 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.

Parameters:
send_datadata to be sent
recvdata data to be received
dirdirection
distthe shift distance along dir
tagthe message tag

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