PmePencilZ Class Reference

#include <PmeSolver.h>

List of all members.

Public Member Functions

PmePencilZ_SDAG_CODE PmePencilZ ()
 PmePencilZ (CkMigrateMessage *m)
virtual ~PmePencilZ ()
void skip ()

Protected Member Functions

void initBlockSizes ()
void submitReductions ()

Protected Attributes

PmeGrid pmeGrid
bool doEnergy
bool doVirial
FFTComputefftCompute
PmeTransposepmeTranspose
PmeKSpaceComputepmeKSpaceCompute
std::vector< int > blockSizes
Lattice lattice
int numStrayAtoms
int imsg

Detailed Description

Definition at line 239 of file PmeSolver.h.


Constructor & Destructor Documentation

PmePencilZ::PmePencilZ (  ) 

Definition at line 366 of file PmeSolver.C.

References doEnergy, doVirial, fftCompute, numStrayAtoms, ReductionMgr::Object(), pmeKSpaceCompute, pmeTranspose, REDUCTIONS_BASIC, and ReductionMgr::willSubmit().

00366                        {
00367   __sdag_init();
00368   setMigratable(false);
00369   fftCompute = NULL;
00370   pmeTranspose = NULL;
00371   pmeKSpaceCompute = NULL;
00372   reduction = ReductionMgr::Object()->willSubmit(REDUCTIONS_BASIC);
00373   doEnergy = false;
00374   doVirial = false;
00375   numStrayAtoms = 0;
00376 }

PmePencilZ::PmePencilZ ( CkMigrateMessage *  m  ) 

Definition at line 378 of file PmeSolver.C.

References NAMD_bug().

00378                                           {
00379   NAMD_bug("PmePencilZ cannot be migrated");
00380   //__sdag_init();
00381   // setMigratable(false);
00382   // fftCompute = NULL;
00383   // pmeTranspose = NULL;
00384 }

PmePencilZ::~PmePencilZ (  )  [virtual]

Definition at line 386 of file PmeSolver.C.

References fftCompute, pmeKSpaceCompute, and pmeTranspose.

00386                         {
00387   if (fftCompute != NULL) delete fftCompute;
00388   if (pmeTranspose != NULL) delete pmeTranspose;
00389   if (pmeKSpaceCompute != NULL) delete pmeKSpaceCompute;
00390   delete reduction;
00391 }


Member Function Documentation

void PmePencilZ::initBlockSizes (  )  [protected]

Definition at line 411 of file PmeSolver.C.

References blockSizes, getBlockDim(), Perm_Z_cX_Y, pmeGrid, and PmeGrid::zBlocks.

00411                                 {
00412   blockSizes.resize(pmeGrid.zBlocks);
00413   for (int z=0;z < pmeGrid.zBlocks;z++) {
00414     int i0, i1, j0, j1, k0, k1;
00415     getBlockDim(pmeGrid, Perm_Z_cX_Y, z, thisIndex.x, thisIndex.y,
00416       i0, i1, j0, j1, k0, k1);
00417     int size = (i1-i0+1)*(j1-j0+1)*(k1-k0+1);
00418     blockSizes[z] = size;
00419   }
00420 }

void PmePencilZ::skip ( void   ) 

Definition at line 462 of file PmeSolver.C.

References SubmitReduction::submit().

00462                       {
00463   reduction->submit();  
00464 }

void PmePencilZ::submitReductions (  )  [protected]

Definition at line 428 of file PmeSolver.C.

References PmeKSpaceCompute::getEnergy(), PmeKSpaceCompute::getVirial(), SubmitReduction::item(), NAMD_bug(), numStrayAtoms, pmeKSpaceCompute, REDUCTION_ELECT_ENERGY_SLOW, REDUCTION_STRAY_CHARGE_ERRORS, and SubmitReduction::submit().

00428                                   {
00429   if (pmeKSpaceCompute == NULL)
00430     NAMD_bug("PmePencilZ::submitReductions, pmeKSpaceCompute not initialized");
00431   double virial[9];
00432   double energy = pmeKSpaceCompute->getEnergy();
00433   // fprintf(stderr, "PmePencilZ::submitReductions(), numStrayAtoms %d\n", numStrayAtoms);
00434   pmeKSpaceCompute->getVirial(virial);
00435   reduction->item(REDUCTION_ELECT_ENERGY_SLOW) += energy;
00436   reduction->item(REDUCTION_VIRIAL_SLOW_XX) += virial[0];
00437   reduction->item(REDUCTION_VIRIAL_SLOW_XY) += virial[1];
00438   reduction->item(REDUCTION_VIRIAL_SLOW_XZ) += virial[2];
00439   reduction->item(REDUCTION_VIRIAL_SLOW_YX) += virial[3];
00440   reduction->item(REDUCTION_VIRIAL_SLOW_YY) += virial[4];
00441   reduction->item(REDUCTION_VIRIAL_SLOW_YZ) += virial[5];
00442   reduction->item(REDUCTION_VIRIAL_SLOW_ZX) += virial[6];
00443   reduction->item(REDUCTION_VIRIAL_SLOW_ZY) += virial[7];
00444   reduction->item(REDUCTION_VIRIAL_SLOW_ZZ) += virial[8];
00445   reduction->item(REDUCTION_STRAY_CHARGE_ERRORS) += numStrayAtoms;
00446   reduction->submit();
00447   numStrayAtoms = 0;
00448 }


Member Data Documentation

std::vector<int> PmePencilZ::blockSizes [protected]

Definition at line 252 of file PmeSolver.h.

Referenced by initBlockSizes().

bool PmePencilZ::doEnergy [protected]

Definition at line 248 of file PmeSolver.h.

Referenced by PmePencilZ().

bool PmePencilZ::doVirial [protected]

Definition at line 248 of file PmeSolver.h.

Referenced by PmePencilZ().

Definition at line 249 of file PmeSolver.h.

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

int PmePencilZ::imsg [protected]

Definition at line 257 of file PmeSolver.h.

Definition at line 253 of file PmeSolver.h.

int PmePencilZ::numStrayAtoms [protected]

Definition at line 254 of file PmeSolver.h.

Referenced by PmePencilZ(), and submitReductions().

Definition at line 247 of file PmeSolver.h.

Referenced by initBlockSizes().

Definition at line 251 of file PmeSolver.h.

Referenced by PmePencilZ(), submitReductions(), and ~PmePencilZ().

Definition at line 250 of file PmeSolver.h.

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


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

Generated on 4 Jun 2020 for NAMD by  doxygen 1.6.1