OptPme.h

Go to the documentation of this file.
00001 
00007 #ifndef OPT_PME_H
00008 #define OPT_PME_H
00009 
00010 #include "ComputeHomePatches.h"
00011 #include "PmeBase.h"
00012 #include "NamdTypes.h"
00013 #include "SimParameters.h"
00014 
00015 class OptPmeRealSpace;
00016 //class ComputeMgr;
00017 class SubmitReduction;
00018 class OptPmeGridMsg;
00019 class OptPmeMgr;
00020 
00021 #include "OptPmeMgr.decl.h"
00022 #include "OptPmeRealSpace.h"
00023 
00024 struct PencilElement{
00025   bool     isActive;
00026   int      xmin, xmax;  
00027   int      ymin, ymax;  
00028   int      zmin, zmax;
00029   int      ib, jb;
00030   double   * data;
00031 };
00032 
00033 struct PatchGridElem {
00034   int              xstart, xlen;
00035   int              ystart, ylen;
00036   int              zstart, zlen;  
00037   int              patchID;
00038   float          * data;
00039 };
00040 
00041 #define SUBCOMPUTE_NPAR  4
00042 
00043 //Message to split the PME computation
00044 class OptPmeSubComputeMsg : public CMessage_OptPmeSubComputeMsg {
00045  public:
00046   int     start;
00047   int     end;
00048   int     src_pe; //src node rank
00049   int     dest;   //dst node rank
00050   void  * compute;
00051 };
00052 
00053 class OptPmeCompute : public ComputeHomePatches {
00054 public:
00055   OptPmeCompute(ComputeID c);
00056   virtual ~OptPmeCompute();
00057   void doWork();
00058   void doWorkOnPeer();
00059   void sendPencils();
00060   void copyPencils(OptPmeGridMsg *);
00061   void ungridForces_init();
00062   void ungridForces_compute(int istart, int iend);
00063   void ungridForces_finalize();
00064   void setMgr(OptPmeMgr *mgr) { myMgr = mgr; }
00065 
00066   int getNumLocalAtoms () { return numLocalAtoms; }
00067 
00068   double  *zline_storage;   //Make it private later
00069   float   *sp_zstorage;
00070  private:
00071   PmeGrid myGrid;
00072   int qsize, fsize;
00073   //normalized patch corrdinates
00074   int xstart, xlen, ystart, ylen, zstart, zlen;
00075   int alchFepOn, alchThermIntOn, lesOn, pairOn;
00076   
00077   double **q_arr;
00078   int nzlines;
00079   PmeReduction evir;
00080   SubmitReduction *reduction;
00081   int strayChargeErrors;
00082   int numLocalAtoms;
00083   PmeParticle  * localData;
00084   unsigned char * localPartition;
00085   OptPmeRealSpace * myRealSpace;
00086   OptPmeMgr * myMgr;
00087 
00088   ResizeArray <PencilElement>   pencilVec;
00089 
00090   Vector    * localResults;
00091   
00092   bool _initialized;
00093   void initializeOptPmeCompute();
00094   void resetPatchCoordinates (const Lattice &lattice);
00095 };
00096 
00097 
00098 #endif
00099 

Generated on Sun Nov 19 01:17:14 2017 for NAMD by  doxygen 1.4.7