|
| Torus () |
| constructor making uninitialized object More...
|
|
| Torus (Communication comm, int tag, iTupel size, int overlap, const Yasp::Partitioning< d > *partitioner) |
| make partitioner from communicator and coarse mesh size More...
|
|
int | rank () const |
| return own rank More...
|
|
iTupel | coord () const |
| return own coordinates More...
|
|
int | procs () const |
| return number of processes More...
|
|
const iTupel & | dims () const |
| return dimensions of torus More...
|
|
int | dims (int i) const |
| return dimensions of torus in direction i More...
|
|
Communication | comm () const |
| return communicator More...
|
|
int | tag () const |
| return tag used by torus More...
|
|
bool | inside (iTupel c) const |
| return true if coordinate is inside torus More...
|
|
iTupel | rank_to_coord (int rank) const |
| map rank to coordinate in torus using lexicographic ordering More...
|
|
int | coord_to_rank (iTupel coord) const |
| map coordinate in torus to rank using lexicographic ordering More...
|
|
int | rank_relative (int rank, int dir, int cnt) const |
| return rank of process where its coordinate in direction dir has offset cnt (handles periodic case) More...
|
|
int | color (const iTupel &coord) const |
| assign color to given coordinate More...
|
|
int | color (int rank) const |
| assign color to given rank More...
|
|
int | neighbors () const |
| return the number of neighbors, which is More...
|
|
bool | is_neighbor (iTupel delta, std::bitset< d > periodic) const |
| return true if neighbor with given delta is a neighbor under the given periodicity More...
|
|
double | partition (int rank, iTupel origin_in, iTupel size_in, iTupel &origin_out, iTupel &size_out) const |
| partition the given grid onto the torus and return the piece of the process with given rank; returns load imbalance More...
|
|
ProcListIterator | sendbegin () const |
| first process in send list More...
|
|
ProcListIterator | sendend () const |
| end of send list More...
|
|
ProcListIterator | recvbegin () const |
| first process in receive list More...
|
|
ProcListIterator | recvend () const |
| last process in receive list More...
|
|
void | send (int rank, void *buffer, int size) const |
| store a send request; buffers are sent in order; handles also local requests with memcpy More...
|
|
void | recv (int rank, void *buffer, int size) const |
| store a receive request; buffers are received in order; handles also local requests with memcpy More...
|
|
void | exchange () const |
| exchange messages stored in request buffers; clear request buffers afterwards More...
|
|
double | global_max (double x) const |
| global max More...
|
|
void | print (std::ostream &s) const |
| print contents of torus object More...
|
|
template<class Communication, int d>
class Dune::Torus< Communication, d >
Torus provides all the functionality to handle a toroidal communication structure:
- Map a set of processes (given by an MPI communicator) to a torus of dimension d. The "optimal" torus dimensions are determined by a coarse mesh. The maximum side length is minimized.
- Provide lists of neighboring processes and a method for nearest neighbor exchange using asynchronous communication with MPI. The periodic case is handled where one process might have to exchange several messages with the same process. (Logically, a process has always neighbors, but several of these logical neighbors might be identical)
- Provide means to partition a grid to the torus.