ExaFMM 1
Fast-multipole Method for exascale systems
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
KernelBase Class Reference

Unified CPU/GPU kernel class. More...

#include <kernel.h>

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

List of all members.

Public Member Functions

 KernelBase ()
 Constructor.
 ~KernelBase ()
 Destructor.
void setX0 (vect x0)
 Set center of root cell.
void setR0 (real r0)
 Set radius of root cell.
vect getX0 () const
 Get center of root cell.
real getR0 () const
 Get radius of root cell.
void setDomain (Bodies &bodies, vect x0=0, real r0=M_PI)
 Set center and size of root cell.
void preCalculation ()
 Precalculate M2L translation matrix.
void postCalculation ()
 Free temporary allocations.
void setVanDerWaals (int atoms, double *rscale, double *gscale)
 Set paramters for Van der Waals.
void setEwald (real ksize, real alpha, real sigma)
 Set paramters for Ewald summation.

Public Attributes

real NP2P
 Number of P2P kernel calls.
real NM2P
 Number of M2P kernel calls.
real NM2L
 Number of M2L kernel calls.

Protected Member Functions

void evalMultipole (real rho, real alpha, real beta, complex *Ynm, complex *YnmTheta) const
 Evaluate solid harmonics $ r^n Y_{n}^{m} $.
void evalLocal (real rho, real alpha, real beta, complex *Ynm, complex *YnmTheta) const
 Evaluate singular harmonics $ r^{-n-1} Y_n^m $.

Protected Attributes

vect X0
 Center of root cell.
real R0
 Radius of root cell.
C_iter Ci0
 icells.begin()
C_iter Cj0
 jcells.begin()
int ATOMS
 Number of atom types in Van der Waals.
std::vector< realRSCALE
 Scaling parameter for Van der Waals.
std::vector< realGSCALE
 Scaling parameter for Van der Waals.
real KSIZE
 Number of waves in Ewald summation.
real ALPHA
 Scaling parameter for Ewald summation.
real SIGMA
 Scaling parameter for Ewald summation.
std::vector< int > keysHost
 Offsets for rangeHost.
std::vector< int > rangeHost
 Offsets for sourceHost.
std::vector< gpurealsourceHost
 Sources on host.
std::vector< gpurealtargetHost
 Targets on host.
std::vector< gpurealconstHost
 Constants on host.
Map sourceBegin
 Define map for offset of source cells.
Map sourceSize
 Define map for size of source cells.
Map targetBegin
 Define map for offset of target cells.
size_t keysDevcSize
 Size of offsets for rangeDevc.
size_t rangeDevcSize
 Size of offsets for sourceDevc.
size_t sourceDevcSize
 Size of sources on device.
size_t targetDevcSize
 Size of targets on device.
int * keysDevc
 Offsets for rangeDevc.
int * rangeDevc
 Offsets for sourceDevc.
gpurealsourceDevc
 Sources on device.
gpurealtargetDevc
 Targets on device.
realfactorial
 Factorial.
realprefactor
 $ \sqrt{ \frac{(n - |m|)!}{(n + |m|)!} } $
realAnm
 $ (-1)^n / \sqrt{ \frac{(n + m)!}{(n - m)!} } $
complexCnm
 M2L translation matrix $ C_{jn}^{km} $.

Detailed Description

Unified CPU/GPU kernel class.

Definition at line 31 of file kernel.h.


Constructor & Destructor Documentation

KernelBase::KernelBase ( ) [inline]

Constructor.

Definition at line 146 of file kernel.h.

KernelBase::~KernelBase ( ) [inline]

Destructor.

Definition at line 150 of file kernel.h.


Member Function Documentation

void KernelBase::evalLocal ( real  rho,
real  alpha,
real  beta,
complex Ynm,
complex YnmTheta 
) const [inline, protected]

Evaluate singular harmonics $ r^{-n-1} Y_n^m $.

Definition at line 109 of file kernel.h.

void KernelBase::evalMultipole ( real  rho,
real  alpha,
real  beta,
complex Ynm,
complex YnmTheta 
) const [inline, protected]

Evaluate solid harmonics $ r^n Y_{n}^{m} $.

Definition at line 73 of file kernel.h.

real KernelBase::getR0 ( ) const [inline]

Get radius of root cell.

Definition at line 160 of file kernel.h.

Here is the caller graph for this function:

vect KernelBase::getX0 ( ) const [inline]

Get center of root cell.

Definition at line 158 of file kernel.h.

Here is the caller graph for this function:

void KernelBase::postCalculation ( ) [inline]

Free temporary allocations.

Definition at line 238 of file kernel.h.

Here is the caller graph for this function:

void KernelBase::preCalculation ( ) [inline]

Precalculate M2L translation matrix.

Definition at line 195 of file kernel.h.

Here is the caller graph for this function:

void KernelBase::setDomain ( Bodies bodies,
vect  x0 = 0,
real  r0 = M_PI 
) [inline]

Set center and size of root cell.

Definition at line 163 of file kernel.h.

Here is the caller graph for this function:

void KernelBase::setEwald ( real  ksize,
real  alpha,
real  sigma 
) [inline]

Set paramters for Ewald summation.

Definition at line 259 of file kernel.h.

Here is the caller graph for this function:

void KernelBase::setR0 ( real  r0) [inline]

Set radius of root cell.

Definition at line 155 of file kernel.h.

Here is the caller graph for this function:

void KernelBase::setVanDerWaals ( int  atoms,
double *  rscale,
double *  gscale 
) [inline]

Set paramters for Van der Waals.

Definition at line 246 of file kernel.h.

void KernelBase::setX0 ( vect  x0) [inline]

Set center of root cell.

Definition at line 153 of file kernel.h.

Here is the caller graph for this function:


Member Data Documentation

real KernelBase::ALPHA [protected]

Scaling parameter for Ewald summation.

Definition at line 42 of file kernel.h.

real* KernelBase::Anm [protected]

$ (-1)^n / \sqrt{ \frac{(n + m)!}{(n - m)!} } $

Definition at line 64 of file kernel.h.

int KernelBase::ATOMS [protected]

Number of atom types in Van der Waals.

Definition at line 38 of file kernel.h.

C_iter KernelBase::Ci0 [protected]

icells.begin()

Definition at line 35 of file kernel.h.

C_iter KernelBase::Cj0 [protected]

jcells.begin()

Definition at line 36 of file kernel.h.

complex* KernelBase::Cnm [protected]

M2L translation matrix $ C_{jn}^{km} $.

Definition at line 65 of file kernel.h.

std::vector<gpureal> KernelBase::constHost [protected]

Constants on host.

Definition at line 49 of file kernel.h.

Factorial.

Definition at line 62 of file kernel.h.

std::vector<real> KernelBase::GSCALE [protected]

Scaling parameter for Van der Waals.

Definition at line 40 of file kernel.h.

int* KernelBase::keysDevc [protected]

Offsets for rangeDevc.

Definition at line 57 of file kernel.h.

size_t KernelBase::keysDevcSize [protected]

Size of offsets for rangeDevc.

Definition at line 53 of file kernel.h.

std::vector<int> KernelBase::keysHost [protected]

Offsets for rangeHost.

Definition at line 45 of file kernel.h.

real KernelBase::KSIZE [protected]

Number of waves in Ewald summation.

Definition at line 41 of file kernel.h.

Number of M2L kernel calls.

Definition at line 69 of file kernel.h.

Number of M2P kernel calls.

Definition at line 68 of file kernel.h.

Number of P2P kernel calls.

Definition at line 67 of file kernel.h.

$ \sqrt{ \frac{(n - |m|)!}{(n + |m|)!} } $

Definition at line 63 of file kernel.h.

real KernelBase::R0 [protected]

Radius of root cell.

Definition at line 34 of file kernel.h.

int* KernelBase::rangeDevc [protected]

Offsets for sourceDevc.

Definition at line 58 of file kernel.h.

size_t KernelBase::rangeDevcSize [protected]

Size of offsets for sourceDevc.

Definition at line 54 of file kernel.h.

std::vector<int> KernelBase::rangeHost [protected]

Offsets for sourceHost.

Definition at line 46 of file kernel.h.

std::vector<real> KernelBase::RSCALE [protected]

Scaling parameter for Van der Waals.

Definition at line 39 of file kernel.h.

real KernelBase::SIGMA [protected]

Scaling parameter for Ewald summation.

Definition at line 43 of file kernel.h.

Define map for offset of source cells.

Definition at line 50 of file kernel.h.

Sources on device.

Definition at line 59 of file kernel.h.

size_t KernelBase::sourceDevcSize [protected]

Size of sources on device.

Definition at line 55 of file kernel.h.

std::vector<gpureal> KernelBase::sourceHost [protected]

Sources on host.

Definition at line 47 of file kernel.h.

Define map for size of source cells.

Definition at line 51 of file kernel.h.

Define map for offset of target cells.

Definition at line 52 of file kernel.h.

Targets on device.

Definition at line 60 of file kernel.h.

size_t KernelBase::targetDevcSize [protected]

Size of targets on device.

Definition at line 56 of file kernel.h.

std::vector<gpureal> KernelBase::targetHost [protected]

Targets on host.

Definition at line 48 of file kernel.h.

vect KernelBase::X0 [protected]

Center of root cell.

Definition at line 33 of file kernel.h.


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