ExaFMM 1
Fast-multipole Method for exascale systems
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
Partition< equation > Class Template Reference

Handles all the partitioning of domains. More...

#include <partition.h>

Inheritance diagram for Partition< equation >:
Inheritance graph
[legend]
Collaboration diagram for Partition< equation >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Partition ()
 Constructor.
 ~Partition ()
 Destructor.
void setGlobDomain (Bodies &bodies, vect x0=0, real r0=M_PI)
 Set bounds of domain to be partitioned.
void binBodies (Bodies &bodies, int d)
 Turn positions into indices of bins.
int splitBodies (Bodies &bodies, bigint iSplit)
 Split bodies according to iSplit.
void shiftBodies (Bodies &bodies)
 Send bodies to next rank (round robin)
template<typename T , typename T2 >
T2 nth_element (T &data, T2 n, MPI_Comm MPI_COMM0=0)
 Parallel global nth_element on distributed memory.
void bisection (Bodies &bodies)
 Partitioning by recursive bisection.
void octsection (Bodies &bodies)
 Partition by recursive octsection.
void unpartition (Bodies &bodies)
 Send bodies back to where they came from.

Protected Member Functions

void bisectionGetComm (int l)
 Split the MPI communicator into N-D hypercube.
void bisectionAlltoall (Bodies &bodies, int nthLocal, int numLocal, int &newSize, int l)
 One-to-one MPI_Alltoallv.
void bisectionScatter (Bodies &bodies, int nthLocal, int &newSize, int l)
 Scattering from leftover processes.
void bisectionGather (Bodies &bodies, int nthLocal, int numLocal, int &newSize, int l)
 Gathering to leftover processes.

Protected Attributes

int LEVEL
 Level of the MPI process binary tree.
std::vector< vectXMIN
 Minimum position vector of bodies.
std::vector< vectXMAX
 Maximum position vector of bodies.
int nprocs [64][2]
 Number of processes in the two split groups.
int offset [64][2]
 Offset of body in the two split groups.
int color [64][3]
 Color of hypercube communicators.
int key [64][3]
 Key of hypercube communicators.
MPI_Comm MPI_COMM [64][3]
 Hypercube communicators.

Private Member Functions

void splitDomain (bigint iSplit, int l, int d)
 < Max level for bottom up tree build
template<typename T >
int getBucket (T &data, int numData, int lOffset, Bigints &send, Bigints &recv, MPI_Comm MPI_COMM0)
 Get global bucket data for parallel nth_element.

Private Attributes

int numCells1D
 Number of cells in one dimension (leaf level)

Detailed Description

template<Equation equation>
class Partition< equation >

Handles all the partitioning of domains.

Definition at line 29 of file partition.h.


Constructor & Destructor Documentation

template<Equation equation>
Partition< equation >::Partition ( ) [inline]

Constructor.

Definition at line 251 of file partition.h.

Here is the call graph for this function:

template<Equation equation>
Partition< equation >::~Partition ( ) [inline]

Destructor.

Definition at line 267 of file partition.h.


Member Function Documentation

template<Equation equation>
void Partition< equation >::binBodies ( Bodies bodies,
int  d 
) [inline]

Turn positions into indices of bins.

Definition at line 309 of file partition.h.

Here is the caller graph for this function:

template<Equation equation>
void Partition< equation >::bisection ( Bodies bodies) [inline]

Partitioning by recursive bisection.

Definition at line 411 of file partition.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Partition< equation >::bisectionAlltoall ( Bodies bodies,
int  nthLocal,
int  numLocal,
int &  newSize,
int  l 
) [inline, protected]

One-to-one MPI_Alltoallv.

Definition at line 139 of file partition.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Partition< equation >::bisectionGather ( Bodies bodies,
int  nthLocal,
int  numLocal,
int &  newSize,
int  l 
) [inline, protected]

Gathering to leftover processes.

Definition at line 209 of file partition.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Partition< equation >::bisectionGetComm ( int  l) [inline, protected]

Split the MPI communicator into N-D hypercube.

Definition at line 108 of file partition.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Partition< equation >::bisectionScatter ( Bodies bodies,
int  nthLocal,
int &  newSize,
int  l 
) [inline, protected]

Scattering from leftover processes.

Definition at line 167 of file partition.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
template<typename T >
int Partition< equation >::getBucket ( T &  data,
int  numData,
int  lOffset,
Bigints send,
Bigints recv,
MPI_Comm  MPI_COMM0 
) [inline, private]

Get global bucket data for parallel nth_element.

Definition at line 69 of file partition.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
template<typename T , typename T2 >
T2 Partition< equation >::nth_element ( T &  data,
T2  n,
MPI_Comm  MPI_COMM0 = 0 
) [inline]

Parallel global nth_element on distributed memory.

Definition at line 349 of file partition.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Partition< equation >::octsection ( Bodies bodies) [inline]

Partition by recursive octsection.

Definition at line 461 of file partition.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Partition< equation >::setGlobDomain ( Bodies bodies,
vect  x0 = 0,
real  r0 = M_PI 
) [inline]

Set bounds of domain to be partitioned.

Definition at line 270 of file partition.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<Equation equation>
void Partition< equation >::shiftBodies ( Bodies bodies) [inline]

Send bodies to next rank (round robin)

Definition at line 324 of file partition.h.

Here is the caller graph for this function:

template<Equation equation>
int Partition< equation >::splitBodies ( Bodies bodies,
bigint  iSplit 
) [inline]

Split bodies according to iSplit.

Definition at line 317 of file partition.h.

Here is the caller graph for this function:

template<Equation equation>
void Partition< equation >::splitDomain ( bigint  iSplit,
int  l,
int  d 
) [inline, private]

< Max level for bottom up tree build

Split domain according to iSplit

Definition at line 56 of file partition.h.

Here is the caller graph for this function:

template<Equation equation>
void Partition< equation >::unpartition ( Bodies bodies) [inline]

Send bodies back to where they came from.

Definition at line 516 of file partition.h.

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

template<Equation equation>
int Partition< equation >::color[64][3] [protected]

Color of hypercube communicators.

Definition at line 39 of file partition.h.

template<Equation equation>
int Partition< equation >::key[64][3] [protected]

Key of hypercube communicators.

Definition at line 40 of file partition.h.

template<Equation equation>
int Partition< equation >::LEVEL [protected]

Level of the MPI process binary tree.

Definition at line 34 of file partition.h.

template<Equation equation>
MPI_Comm Partition< equation >::MPI_COMM[64][3] [protected]

Hypercube communicators.

Definition at line 41 of file partition.h.

template<Equation equation>
int Partition< equation >::nprocs[64][2] [protected]

Number of processes in the two split groups.

Definition at line 37 of file partition.h.

template<Equation equation>
int Partition< equation >::numCells1D [private]

Number of cells in one dimension (leaf level)

Definition at line 31 of file partition.h.

template<Equation equation>
int Partition< equation >::offset[64][2] [protected]

Offset of body in the two split groups.

Definition at line 38 of file partition.h.

template<Equation equation>
std::vector<vect> Partition< equation >::XMAX [protected]

Maximum position vector of bodies.

Definition at line 36 of file partition.h.

template<Equation equation>
std::vector<vect> Partition< equation >::XMIN [protected]

Minimum position vector of bodies.

Definition at line 35 of file partition.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines