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 ComputePmeUtil {
00025 
00026 public:
00027 
00028   ComputePmeUtil() {};
00029   ~ComputePmeUtil() {}
00030   static void select(void);
00031 
00032   static int numGrids;
00033   static Bool alchOn;
00034   static Bool alchFepOn;
00035   static Bool alchThermIntOn;
00036   static Bool alchDecouple;
00037   static BigReal alchElecLambdaStart;
00038   static Bool lesOn;
00039   static int lesFactor;
00040   static Bool pairOn; // alias for pairInteractionOn
00041   static Bool selfOn; // alias for pairInteractionSelf
00042 
00043 };
00044 
00045 
00046 class ComputePme : public Compute, public ComputePmeUtil {
00047 public:
00048   ComputePme(ComputeID c, PatchID pid);
00049   virtual ~ComputePme();
00050   void initialize();
00051   void atomUpdate();
00052   int noWork();
00053   void doWork();
00054   void doQMWork() ;
00055   void ungridForces();
00056   void setMgr(ComputePmeMgr *mgr) { myMgr = mgr; }
00057 
00058   friend class ComputePmeMgr;
00059  private:
00060 #ifdef NAMD_CUDA
00061   int cuda_atoms_offset;
00062   float *f_data_host;  // force buffers for CUDA
00063   float *f_data_dev;
00064 #endif
00065 
00066   PatchID patchID;
00067   Patch *patch;
00068   Box<Patch,CompAtom> *positionBox;
00069   Box<Patch,CompAtom> *avgPositionBox;
00070   Box<Patch,Results> *forceBox;
00071 
00072   PmeGrid myGrid;
00073   int numGridsMax; // Only used for deallocating arrays
00074   int offload;
00075   
00076   Bool qmForcesOn;
00077   
00078   PmeRealSpace *myRealSpace[PME_MAX_EVALS];
00079   int numLocalAtoms;
00080   PmeParticle *localData;
00081   ResizeArray<PmeParticle> localData_alloc;
00082   unsigned char *localPartition;
00083   ResizeArray<unsigned char> localPartition_alloc;
00084   ResizeArray<Vector> localResults_alloc;
00085   int numGridAtoms[PME_MAX_EVALS];
00086   PmeParticle *localGridData[PME_MAX_EVALS];
00087   ComputePmeMgr *myMgr;
00088 
00089   int atomsChanged;
00090 
00091   // Local array constructed at each time step with QM charges for 
00092   Real *qmLocalCharges ;
00093   // Local array with indices of QM atoms
00094   int *qmLoclIndx ;
00095   int numLocalQMAtoms;
00096   
00097 };
00098 
00099 ResizeArray<ComputePme*>& getComputes(ComputePmeMgr *mgr) ;
00100 
00101 #endif
00102 

Generated on Sat Feb 24 01:17:13 2018 for NAMD by  doxygen 1.4.7