NAMD
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PmePencilX Class Reference

#include <PmeSolver.h>

Inheritance diagram for PmePencilX:

Public Member Functions

PmePencilX_SDAG_CODE PmePencilX ()
 
 PmePencilX (CkMigrateMessage *m)
 
virtual ~PmePencilX ()
 

Protected Member Functions

void initBlockSizes ()
 

Protected Attributes

PmeGrid pmeGrid
 
bool doEnergy
 
bool doVirial
 
int simulationStep
 
std::array< FFTCompute *, NUM_GRID_MAXfftComputes
 
std::array< PmeTranspose *, NUM_GRID_MAXpmeTransposes
 
std::vector< int > blockSizes
 
Lattice lattice
 
int numStrayAtoms
 
int imsg
 

Detailed Description

Definition at line 196 of file PmeSolver.h.

Constructor & Destructor Documentation

◆ PmePencilX() [1/2]

PmePencilX::PmePencilX ( )

Definition at line 395 of file PmeSolver.C.

References fftComputes, NUM_GRID_MAX, numStrayAtoms, and pmeTransposes.

395  {
396  __sdag_init();
397  setMigratable(false);
398  for (unsigned int iGrid = 0; iGrid < NUM_GRID_MAX; ++iGrid) {
399  pmeTransposes[iGrid] = NULL;
400  fftComputes[iGrid] = NULL;
401  }
402  numStrayAtoms = 0;
403 }
const unsigned int NUM_GRID_MAX
Definition: PmeSolverUtil.h:9
std::array< PmeTranspose *, NUM_GRID_MAX > pmeTransposes
Definition: PmeSolver.h:207
std::array< FFTCompute *, NUM_GRID_MAX > fftComputes
Definition: PmeSolver.h:206
int numStrayAtoms
Definition: PmeSolver.h:210

◆ PmePencilX() [2/2]

PmePencilX::PmePencilX ( CkMigrateMessage *  m)

Definition at line 405 of file PmeSolver.C.

References NAMD_bug().

405  {
406  NAMD_bug("PmePencilX cannot be migrated");
407 //__sdag_init();
408  // setMigratable(false);
409  // fftCompute = NULL;
410  // pmeTranspose = NULL;
411 }
void NAMD_bug(const char *err_msg)
Definition: common.C:195

◆ ~PmePencilX()

PmePencilX::~PmePencilX ( )
virtual

Definition at line 413 of file PmeSolver.C.

References fftComputes, NUM_GRID_MAX, and pmeTransposes.

413  {
414  for (unsigned int iGrid = 0; iGrid < NUM_GRID_MAX; ++iGrid) {
415  if (pmeTransposes[iGrid] != NULL) delete pmeTransposes[iGrid];
416  if (fftComputes[iGrid] != NULL) delete fftComputes[iGrid];
417  }
418 }
const unsigned int NUM_GRID_MAX
Definition: PmeSolverUtil.h:9
std::array< PmeTranspose *, NUM_GRID_MAX > pmeTransposes
Definition: PmeSolver.h:207
std::array< FFTCompute *, NUM_GRID_MAX > fftComputes
Definition: PmeSolver.h:206

Member Function Documentation

◆ initBlockSizes()

void PmePencilX::initBlockSizes ( )
protected

Definition at line 448 of file PmeSolver.C.

References blockSizes, getBlockDim(), Perm_cX_Y_Z, pmeGrid, and PmeGrid::xBlocks.

448  {
449  blockSizes.resize(pmeGrid.xBlocks);
450  for (int x=0;x < pmeGrid.xBlocks;x++) {
451  int i0, i1, j0, j1, k0, k1;
452  getBlockDim(pmeGrid, Perm_cX_Y_Z, x, thisIndex.y, thisIndex.z,
453  i0, i1, j0, j1, k0, k1);
454  int size = (i1-i0+1)*(j1-j0+1)*(k1-k0+1);
455  blockSizes[x] = size;
456  }
457 }
std::vector< int > blockSizes
Definition: PmeSolver.h:208
static void getBlockDim(const PmeGrid &pmeGrid, const int permutation, const int iblock, const int jblock, const int kblock, int &i0, int &i1, int &j0, int &j1, int &k0, int &k1)
Definition: PmeSolverUtil.h:89
int xBlocks
Definition: PmeBase.h:25
PmeGrid pmeGrid
Definition: PmeSolver.h:203

Member Data Documentation

◆ blockSizes

std::vector<int> PmePencilX::blockSizes
protected

Definition at line 208 of file PmeSolver.h.

Referenced by initBlockSizes().

◆ doEnergy

bool PmePencilX::doEnergy
protected

Definition at line 204 of file PmeSolver.h.

◆ doVirial

bool PmePencilX::doVirial
protected

Definition at line 204 of file PmeSolver.h.

◆ fftComputes

std::array<FFTCompute*, NUM_GRID_MAX> PmePencilX::fftComputes
protected

Definition at line 206 of file PmeSolver.h.

Referenced by PmePencilX(), and ~PmePencilX().

◆ imsg

int PmePencilX::imsg
protected

Definition at line 212 of file PmeSolver.h.

◆ lattice

Lattice PmePencilX::lattice
protected

Definition at line 209 of file PmeSolver.h.

◆ numStrayAtoms

int PmePencilX::numStrayAtoms
protected

Definition at line 210 of file PmeSolver.h.

Referenced by PmePencilX().

◆ pmeGrid

PmeGrid PmePencilX::pmeGrid
protected

Definition at line 203 of file PmeSolver.h.

Referenced by initBlockSizes().

◆ pmeTransposes

std::array<PmeTranspose*, NUM_GRID_MAX> PmePencilX::pmeTransposes
protected

Definition at line 207 of file PmeSolver.h.

Referenced by PmePencilX(), and ~PmePencilX().

◆ simulationStep

int PmePencilX::simulationStep
protected

Definition at line 205 of file PmeSolver.h.


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