ComputePme.h

Go to the documentation of this file.
00001 
00007 #ifndef COMPUTEPME_H
00008 #define COMPUTEPME_H
00009 
00010 #include "Compute.h"
00011 #include "PmeBase.h"
00012 #include "NamdTypes.h"
00013 #include "PatchTypes.h"
00014 #include "Box.h"
00015 #include "OwnerBox.h"
00016 
00017 class PmeRealSpace;
00018 class ComputeMgr;
00019 class SubmitReduction;
00020 class PmeGridMsg;
00021 class ComputePmeMgr;
00022 class Patch;
00023 
00024 class ComputePme : public Compute {
00025 public:
00026   ComputePme(ComputeID c, PatchID pid);
00027   virtual ~ComputePme();
00028   void initialize();
00029   void atomUpdate();
00030   int noWork();
00031   void doWork();
00032   void doQMWork() ;
00033   void ungridForces();
00034   void setMgr(ComputePmeMgr *mgr) { myMgr = mgr; }
00035 
00036   friend class ComputePmeMgr;
00037  private:
00038 #ifdef NAMD_CUDA
00039   int cuda_atoms_offset;
00040   float *f_data_host;  // force buffers for CUDA
00041   float *f_data_dev;
00042 #endif
00043 
00044   PatchID patchID;
00045   Patch *patch;
00046   Box<Patch,CompAtom> *positionBox;
00047   Box<Patch,CompAtom> *avgPositionBox;
00048   Box<Patch,Results> *forceBox;
00049 
00050   PmeGrid myGrid;
00051   int alchOn, alchFepOn, alchThermIntOn, lesOn, lesFactor, pairOn, selfOn, numGrids;
00052   int alchDecouple;
00053   int offload;
00054   BigReal alchElecLambdaStart;
00055   
00056   Bool qmForcesOn;
00057   
00058   PmeRealSpace *myRealSpace[PME_MAX_EVALS];
00059   int numLocalAtoms;
00060   PmeParticle *localData;
00061   ResizeArray<PmeParticle> localData_alloc;
00062   unsigned char *localPartition;
00063   ResizeArray<unsigned char> localPartition_alloc;
00064   ResizeArray<Vector> localResults_alloc;
00065   int numGridAtoms[PME_MAX_EVALS];
00066   PmeParticle *localGridData[PME_MAX_EVALS];
00067   ComputePmeMgr *myMgr;
00068 
00069   int atomsChanged;
00070 
00071   // Local array constructed at each time step with QM charges for 
00072   Real *qmLocalCharges ;
00073   // Local array with indices of QM atoms
00074   int *qmLoclIndx ;
00075   int numLocalQMAtoms;
00076   
00077 };
00078 
00079 ResizeArray<ComputePme*>& getComputes(ComputePmeMgr *mgr) ;
00080 
00081 #endif
00082 

Generated on Wed Nov 22 01:17:14 2017 for NAMD by  doxygen 1.4.7