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 247 of file PmeSolver.h.


Constructor & Destructor Documentation

PmePencilZ::PmePencilZ (  ) 

Definition at line 368 of file PmeSolver.C.

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

00368                        {
00369   __sdag_init();
00370   setMigratable(false);
00371   fftCompute = NULL;
00372   pmeTranspose = NULL;
00373   pmeKSpaceCompute = NULL;
00374   reduction = ReductionMgr::Object()->willSubmit(REDUCTIONS_BASIC);
00375   numSelfEnergyRecv = 0;
00376   selfEnergy = 0.0;
00377   doEnergy = false;
00378   doVirial = false;
00379   numStrayAtoms = 0;
00380 }

PmePencilZ::PmePencilZ ( CkMigrateMessage *  m  ) 

Definition at line 382 of file PmeSolver.C.

References NAMD_bug().

00382                                           {
00383   NAMD_bug("PmePencilZ cannot be migrated");
00384   //__sdag_init();
00385   // setMigratable(false);
00386   // fftCompute = NULL;
00387   // pmeTranspose = NULL;
00388 }

PmePencilZ::~PmePencilZ (  )  [virtual]

Definition at line 390 of file PmeSolver.C.

References fftCompute, pmeKSpaceCompute, and pmeTranspose.

00390                         {
00391   if (fftCompute != NULL) delete fftCompute;
00392   if (pmeTranspose != NULL) delete pmeTranspose;
00393   if (pmeKSpaceCompute != NULL) delete pmeKSpaceCompute;
00394   delete reduction;
00395 }


Member Function Documentation

void PmePencilZ::initBlockSizes (  )  [protected]

Definition at line 415 of file PmeSolver.C.

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

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

void PmePencilZ::skip (  ) 

Definition at line 466 of file PmeSolver.C.

References SubmitReduction::submit().

00466                       {
00467   reduction->submit();  
00468 }

void PmePencilZ::submitReductions (  )  [protected]

Definition at line 432 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().

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


Member Data Documentation

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

Definition at line 260 of file PmeSolver.h.

Referenced by initBlockSizes().

bool PmePencilZ::doEnergy [protected]

Definition at line 256 of file PmeSolver.h.

Referenced by PmePencilZ().

bool PmePencilZ::doVirial [protected]

Definition at line 256 of file PmeSolver.h.

Referenced by PmePencilZ().

FFTCompute* PmePencilZ::fftCompute [protected]

Definition at line 257 of file PmeSolver.h.

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

int PmePencilZ::imsg [protected]

Definition at line 265 of file PmeSolver.h.

Lattice PmePencilZ::lattice [protected]

Definition at line 261 of file PmeSolver.h.

int PmePencilZ::numStrayAtoms [protected]

Definition at line 262 of file PmeSolver.h.

Referenced by PmePencilZ(), and submitReductions().

PmeGrid PmePencilZ::pmeGrid [protected]

Definition at line 255 of file PmeSolver.h.

Referenced by initBlockSizes().

PmeKSpaceCompute* PmePencilZ::pmeKSpaceCompute [protected]

Definition at line 259 of file PmeSolver.h.

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

PmeTranspose* PmePencilZ::pmeTranspose [protected]

Definition at line 258 of file PmeSolver.h.

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


The documentation for this class was generated from the following files:
Generated on Thu Nov 23 01:17:19 2017 for NAMD by  doxygen 1.4.7