PmeRealSpaceCompute Class Reference

#include <PmeSolverUtil.h>

Inheritance diagram for PmeRealSpaceCompute:

CudaPmeRealSpaceCompute List of all members.

Public Member Functions

 PmeRealSpaceCompute (PmeGrid pmeGrid, const int jblock, const int kblock)
virtual ~PmeRealSpaceCompute ()
virtual void copyAtoms (const int numAtoms, const CudaAtom *atoms)=0
virtual void spreadCharge (Lattice &lattice)=0
virtual void gatherForce (Lattice &lattice, CudaForce *force)=0
float * getData ()
int getDataSize ()

Static Public Member Functions

static double calcGridCoord (const double x, const double recip11, const int nfftx)
static void calcGridCoord (const double x, const double y, const double z, const double recip11, const double recip22, const double recip33, const int nfftx, const int nffty, const int nfftz, double &frx, double &fry, double &frz)
static void calcGridCoord (const float x, const float y, const float z, const float recip11, const float recip22, const float recip33, const int nfftx, const int nffty, const int nfftz, float &frx, float &fry, float &frz)
static void calcGridCoord (const float x, const float y, const float z, const int nfftx, const int nffty, const int nfftz, float &frx, float &fry, float &frz)
static void calcGridCoord (const double x, const double y, const double z, const int nfftx, const int nffty, const int nfftz, double &frx, double &fry, double &frz)

Protected Attributes

int numAtoms
PmeGrid pmeGrid
int y0
int z0
int xsize
int ysize
int zsize
int dataSize
float * data
const int jblock
const int kblock

Detailed Description

Definition at line 309 of file PmeSolverUtil.h.


Constructor & Destructor Documentation

PmeRealSpaceCompute::PmeRealSpaceCompute ( PmeGrid  pmeGrid,
const int  jblock,
const int  kblock 
) [inline]

Definition at line 326 of file PmeSolverUtil.h.

References dataSize, getPencilDim(), Perm_X_Y_Z, pmeGrid, xsize, y0, ysize, z0, and zsize.

00326                                                                            : 
00327     pmeGrid(pmeGrid), jblock(jblock), kblock(kblock), data(NULL) {
00328       int x0, x1, y1, z1;
00329       getPencilDim(pmeGrid, Perm_X_Y_Z, jblock, kblock, x0, x1, y0, y1, z0, z1);
00330       xsize = x1-x0+1;
00331       ysize = y1-y0+1;
00332       zsize = z1-z0+1;
00333       // Allocate enough data for storing the complex data
00334       // dataSize = 2*(xsize/2+1)*ysize*zsize;
00335       // Only allocate enough data for storing the real-space data
00336       // Complex data is stored in FFTCompute
00337       dataSize = xsize*ysize*zsize;
00338     }

virtual PmeRealSpaceCompute::~PmeRealSpaceCompute (  )  [inline, virtual]

Definition at line 339 of file PmeSolverUtil.h.

00339 {}


Member Function Documentation

static void PmeRealSpaceCompute::calcGridCoord ( const double  x,
const double  y,
const double  z,
const int  nfftx,
const int  nffty,
const int  nfftz,
double &  frx,
double &  fry,
double &  frz 
) [inline, static]

Definition at line 393 of file PmeSolverUtil.h.

00394                                                                                               {
00395     frx = (double)(nfftx)*x;
00396     fry = (double)(nffty)*y;
00397     frz = (double)(nfftz)*z;
00398   }

static void PmeRealSpaceCompute::calcGridCoord ( const float  x,
const float  y,
const float  z,
const int  nfftx,
const int  nffty,
const int  nfftz,
float &  frx,
float &  fry,
float &  frz 
) [inline, static]

Definition at line 386 of file PmeSolverUtil.h.

00387                                                                                            {
00388     frx = (float)(nfftx)*x;
00389     fry = (float)(nffty)*y;
00390     frz = (float)(nfftz)*z;
00391   }

static void PmeRealSpaceCompute::calcGridCoord ( const float  x,
const float  y,
const float  z,
const float  recip11,
const float  recip22,
const float  recip33,
const int  nfftx,
const int  nffty,
const int  nfftz,
float &  frx,
float &  fry,
float &  frz 
) [inline, static]

Definition at line 373 of file PmeSolverUtil.h.

References f.

00376                                         {
00377     float w;
00378     w = x*recip11 + 2.0f;
00379     frx = (float)(nfftx*(w - (floorf(w + 0.5f) - 0.5f)));
00380     w = y*recip22 + 2.0f;
00381     fry = (float)(nffty*(w - (floorf(w + 0.5f) - 0.5f)));
00382     w = z*recip33 + 2.0f;
00383     frz = (float)(nfftz*(w - (floorf(w + 0.5f) - 0.5f)));
00384   }

static void PmeRealSpaceCompute::calcGridCoord ( const double  x,
const double  y,
const double  z,
const double  recip11,
const double  recip22,
const double  recip33,
const int  nfftx,
const int  nffty,
const int  nfftz,
double &  frx,
double &  fry,
double &  frz 
) [inline, static]

Definition at line 360 of file PmeSolverUtil.h.

00363                                            {
00364     double w;
00365     w = x*recip11 + 2.0;
00366     frx = (double)((double)nfftx*(w - (floor(w + 0.5) - 0.5)));
00367     w = y*recip22 + 2.0;
00368     fry = (double)((double)nffty*(w - (floor(w + 0.5) - 0.5)));
00369     w = z*recip33 + 2.0;
00370     frz = (double)((double)nfftz*(w - (floor(w + 0.5) - 0.5)));
00371   }

static double PmeRealSpaceCompute::calcGridCoord ( const double  x,
const double  recip11,
const int  nfftx 
) [inline, static]

Definition at line 354 of file PmeSolverUtil.h.

Referenced by PmeAtomFiler::fileAtoms().

00354                                                                                             {
00355     double w;
00356     w = x*recip11 + 2.0;
00357     return (double)((double)nfftx*(w - (floor(w + 0.5) - 0.5)));
00358   }

virtual void PmeRealSpaceCompute::copyAtoms ( const int  numAtoms,
const CudaAtom atoms 
) [pure virtual]

Implemented in CudaPmeRealSpaceCompute.

Referenced by ComputePmeCUDADevice::spreadCharge().

virtual void PmeRealSpaceCompute::gatherForce ( Lattice lattice,
CudaForce force 
) [pure virtual]

Implemented in CudaPmeRealSpaceCompute.

Referenced by ComputePmeCUDADevice::gatherForce().

float* PmeRealSpaceCompute::getData (  )  [inline]

Definition at line 351 of file PmeSolverUtil.h.

References data.

Referenced by ComputePmeCUDADevice::activate_pencils().

00351 {return data;}

int PmeRealSpaceCompute::getDataSize (  )  [inline]

Definition at line 352 of file PmeSolverUtil.h.

References dataSize.

Referenced by ComputePmeCUDADevice::activate_pencils().

00352 {return dataSize;}

virtual void PmeRealSpaceCompute::spreadCharge ( Lattice lattice  )  [pure virtual]

Implemented in CudaPmeRealSpaceCompute.

Referenced by ComputePmeCUDADevice::spreadCharge().


Member Data Documentation

float* PmeRealSpaceCompute::data [protected]

Definition at line 322 of file PmeSolverUtil.h.

Referenced by CudaPmeRealSpaceCompute::CudaPmeRealSpaceCompute(), getData(), CudaPmeRealSpaceCompute::spreadCharge(), and CudaPmeRealSpaceCompute::~CudaPmeRealSpaceCompute().

int PmeRealSpaceCompute::dataSize [protected]

Definition at line 321 of file PmeSolverUtil.h.

Referenced by CudaPmeRealSpaceCompute::CudaPmeRealSpaceCompute(), getDataSize(), and PmeRealSpaceCompute().

const int PmeRealSpaceCompute::jblock [protected]

Definition at line 324 of file PmeSolverUtil.h.

const int PmeRealSpaceCompute::kblock [protected]

Definition at line 324 of file PmeSolverUtil.h.

int PmeRealSpaceCompute::numAtoms [protected]

Definition at line 313 of file PmeSolverUtil.h.

Referenced by CudaPmeRealSpaceCompute::gatherForce(), and CudaPmeRealSpaceCompute::spreadCharge().

PmeGrid PmeRealSpaceCompute::pmeGrid [protected]

Definition at line 315 of file PmeSolverUtil.h.

Referenced by CudaPmeRealSpaceCompute::gatherForce(), PmeRealSpaceCompute(), and CudaPmeRealSpaceCompute::spreadCharge().

int PmeRealSpaceCompute::xsize [protected]

Definition at line 319 of file PmeSolverUtil.h.

Referenced by CudaPmeRealSpaceCompute::CudaPmeRealSpaceCompute(), CudaPmeRealSpaceCompute::gatherForce(), PmeRealSpaceCompute(), and CudaPmeRealSpaceCompute::spreadCharge().

int PmeRealSpaceCompute::y0 [protected]

Definition at line 317 of file PmeSolverUtil.h.

Referenced by CudaPmeRealSpaceCompute::gatherForce(), PmeRealSpaceCompute(), and CudaPmeRealSpaceCompute::spreadCharge().

int PmeRealSpaceCompute::ysize [protected]

Definition at line 319 of file PmeSolverUtil.h.

Referenced by CudaPmeRealSpaceCompute::CudaPmeRealSpaceCompute(), CudaPmeRealSpaceCompute::gatherForce(), PmeRealSpaceCompute(), and CudaPmeRealSpaceCompute::spreadCharge().

int PmeRealSpaceCompute::z0 [protected]

Definition at line 317 of file PmeSolverUtil.h.

Referenced by CudaPmeRealSpaceCompute::gatherForce(), PmeRealSpaceCompute(), and CudaPmeRealSpaceCompute::spreadCharge().

int PmeRealSpaceCompute::zsize [protected]

Definition at line 319 of file PmeSolverUtil.h.

Referenced by CudaPmeRealSpaceCompute::CudaPmeRealSpaceCompute(), CudaPmeRealSpaceCompute::gatherForce(), PmeRealSpaceCompute(), and CudaPmeRealSpaceCompute::spreadCharge().


The documentation for this class was generated from the following file:
Generated on Tue Nov 21 01:17:20 2017 for NAMD by  doxygen 1.4.7