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

#include <PmeSolver.h>

Inheritance diagram for PmePencilXYZ:

Public Member Functions

PmePencilXYZ_SDAG_CODE PmePencilXYZ ()
 
 PmePencilXYZ (CkMigrateMessage *m)
 
virtual ~PmePencilXYZ ()
 
void skip ()
 

Protected Member Functions

virtual void backwardDone ()
 
void submitReductions ()
 

Protected Attributes

PmeGrid pmeGrid
 
bool doEnergy
 
bool doVirial
 
FFTComputefftCompute
 
PmeKSpaceComputepmeKSpaceCompute
 
Lattice lattice
 
int numStrayAtoms
 

Detailed Description

Definition at line 131 of file PmeSolver.h.

Constructor & Destructor Documentation

PmePencilXYZ::PmePencilXYZ ( )

Definition at line 18 of file PmeSolver.C.

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

18  {
19  __sdag_init();
20  setMigratable(false);
21  fftCompute = NULL;
22  pmeKSpaceCompute = NULL;
24  doEnergy = false;
25  doVirial = false;
26 }
FFTCompute * fftCompute
Definition: PmeSolver.h:141
SubmitReduction * willSubmit(int setID, int size=-1)
Definition: ReductionMgr.C:365
static ReductionMgr * Object(void)
Definition: ReductionMgr.h:278
bool doVirial
Definition: PmeSolver.h:140
PmeKSpaceCompute * pmeKSpaceCompute
Definition: PmeSolver.h:142
bool doEnergy
Definition: PmeSolver.h:140
PmePencilXYZ::PmePencilXYZ ( CkMigrateMessage *  m)

Definition at line 28 of file PmeSolver.C.

References NAMD_bug().

28  {
29  NAMD_bug("PmePencilXYZ cannot be migrated");
30  //__sdag_init();
31  // setMigratable(false);
32  // fftCompute = NULL;
33  // pmeKSpaceCompute = NULL;
34  // reduction = ReductionMgr::Object()->willSubmit(REDUCTIONS_BASIC);
35 }
void NAMD_bug(const char *err_msg)
Definition: common.C:123
PmePencilXYZ::~PmePencilXYZ ( )
virtual

Definition at line 37 of file PmeSolver.C.

References fftCompute, and pmeKSpaceCompute.

37  {
38  if (fftCompute != NULL) delete fftCompute;
39  if (pmeKSpaceCompute != NULL) delete pmeKSpaceCompute;
40  delete reduction;
41 }
FFTCompute * fftCompute
Definition: PmeSolver.h:141
PmeKSpaceCompute * pmeKSpaceCompute
Definition: PmeSolver.h:142

Member Function Documentation

void PmePencilXYZ::backwardDone ( )
protectedvirtual

Definition at line 67 of file PmeSolver.C.

References NAMD_bug().

67  {
68  NAMD_bug("PmePencilXYZ::backwardDone(), base class method called");
69 }
void NAMD_bug(const char *err_msg)
Definition: common.C:123
void PmePencilXYZ::skip ( void  )

Definition at line 91 of file PmeSolver.C.

References SubmitReduction::submit().

91  {
92  reduction->submit();
93 }
void submit(void)
Definition: ReductionMgr.h:323
void PmePencilXYZ::submitReductions ( )
protected

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

71  {
72  if (pmeKSpaceCompute == NULL)
73  NAMD_bug("PmePencilXYZ::submitReductions, pmeKSpaceCompute not initialized");
74  double virial[9];
75  double energy = pmeKSpaceCompute->getEnergy();
76  pmeKSpaceCompute->getVirial(virial);
77  reduction->item(REDUCTION_ELECT_ENERGY_SLOW) += energy;
78  reduction->item(REDUCTION_VIRIAL_SLOW_XX) += virial[0];
79  reduction->item(REDUCTION_VIRIAL_SLOW_XY) += virial[1];
80  reduction->item(REDUCTION_VIRIAL_SLOW_XZ) += virial[2];
81  reduction->item(REDUCTION_VIRIAL_SLOW_YX) += virial[3];
82  reduction->item(REDUCTION_VIRIAL_SLOW_YY) += virial[4];
83  reduction->item(REDUCTION_VIRIAL_SLOW_YZ) += virial[5];
84  reduction->item(REDUCTION_VIRIAL_SLOW_ZX) += virial[6];
85  reduction->item(REDUCTION_VIRIAL_SLOW_ZY) += virial[7];
86  reduction->item(REDUCTION_VIRIAL_SLOW_ZZ) += virial[8];
88  reduction->submit();
89 }
BigReal & item(int i)
Definition: ReductionMgr.h:312
int numStrayAtoms
Definition: PmeSolver.h:144
void NAMD_bug(const char *err_msg)
Definition: common.C:123
PmeKSpaceCompute * pmeKSpaceCompute
Definition: PmeSolver.h:142
virtual void getVirial(double *virial)=0
void submit(void)
Definition: ReductionMgr.h:323
virtual double getEnergy()=0

Member Data Documentation

bool PmePencilXYZ::doEnergy
protected

Definition at line 140 of file PmeSolver.h.

Referenced by PmePencilXYZ().

bool PmePencilXYZ::doVirial
protected

Definition at line 140 of file PmeSolver.h.

Referenced by PmePencilXYZ().

FFTCompute* PmePencilXYZ::fftCompute
protected

Definition at line 141 of file PmeSolver.h.

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

Lattice PmePencilXYZ::lattice
protected

Definition at line 143 of file PmeSolver.h.

int PmePencilXYZ::numStrayAtoms
protected

Definition at line 144 of file PmeSolver.h.

Referenced by submitReductions().

PmeGrid PmePencilXYZ::pmeGrid
protected

Definition at line 139 of file PmeSolver.h.

PmeKSpaceCompute* PmePencilXYZ::pmeKSpaceCompute
protected

Definition at line 142 of file PmeSolver.h.

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


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