OpenAtom  Version1.5a
CP_State_ParticlePlane.h
1 #include "debug_flags.h"
2 #include "charm++.h" /// @note: Needed for ckcomplex.h ?
3 #include "ckcomplex.h"
4 #include "gParticlePlane.decl.h"
5 #include "uber/Uber.h"
6 struct EnergyStruct; /// @warning: Forward declarations of structs seem to choke the ci parser. It doesnt recognize the keyword struct.
7 #include "paircalc/ckPairCalculator.h"
8 #include "cpaimd.decl.h"
9 
10 #ifndef CP_STATE_PARTICLE_PLANE_H
11 #define CP_STATE_PARTICLE_PLANE_H
12 
13 
15 {
16  public:
17  int iteration;
18 };
19 
20 
21 
22 
24 {
25  public:
26  int foo;
27 };
28 
29 
30 
31 
33 {
34  public:
35  int size;
36  int senderIndex;
37  int step;
38  complex *data;
39 };
40 
41 
42 
43 
45 {
46  public:
47  int size;
48  int offset;
49  int iterNL;
50  complex *data;
51 };
52 
53 
54 
55 /** @addtogroup Particle
56  @{
57 */
58 
60 {
61  friend class GSpaceDriver;
62  friend class CP_State_GSpacePlane;
63  public:
64  CP_State_ParticlePlane(CkMigrateMessage *m) {}
65  CP_State_ParticlePlane(int ,int ,int ,int ,int ,int ,int ,int ,int ,int ,int ,int ,int ,int ,int, UberCollection );
67  void pup(PUP::er &);
68  /// InitKVectors creates local k vectors for this chare and mallocs some memory.
69  void initKVectors();
70  void startNLEes(int);
71  void lPrioStartNLEes(NLDummyMsg *m);
72  /// @entry GSpaceDriver calls this to trigger the launch of the computeZ()s to compute the Z matrix.
73  void launchComputeZs();
74  /// @entry
75  void computeZ(PPDummyMsg *m);
76  void setEnlCookie(EnlCookieMsg *m);
77  void ResumeFromSync();
78  void reduceZ(int, int, complex *,complex *,complex *,complex *);
79  void getForces(int, int, complex *);
80 
81  void createNLEesFFTdata();
82  void FFTNLEesFwd();
83  void sendToEesRPP();
84  void recvFromEesRPP(GSPPIFFTMsg *msg);
85  void FFTNLEesBck();
86  void computeNLEesForces();
87  void registrationDone(CkReductionMsg *msg);
88  void printEnl(CkReductionMsg *msg);
89  int istate_ind;
90  int ibead_ind,kpoint_ind, itemper_ind;
91  int myChareG;
92  int iteration;
93  int iterNL;
94  int numNLiter;
95  int ees_nonlocal;
96  int ngridaNL;
97  int ngridbNL;
98  int ngridcNL;
99  int gSpaceNumPoints;
100  int numLines;
101  int numFullNL;
102  int natm_nl;
103  int natm_nl_grp_max;
104  int numSfGrps;
105  int nstates;
106  int nchareG;
107  int Gstates_per_pe;
108  int countNLIFFT;
109  int sendDone;
110  int registrationFlag;
111  private:
112  const UberCollection thisInstance;
113  int calcReductionPlaneNum(int);
114  complex *myForces, *gspace, *projPsiG;
115  complex *zmatrixSum, *zmatrix;
116  double *dyp_re,*dyp_im;
117  double enl;
118  double enl_total;
119  double totalEnergy;
120  int *haveSFAtmGrp;
121  int *count;
122  int doneEnl;
123  int doneForces;
124  int zsize, energy_count;
125  int sizeX, sizeY, sizeZ, gSpacePlanesPerChare;
126  int reductionPlaneNum;
127  complex *zmatrix_fx,*zmatrix_fy,*zmatrix_fz;
128  complex *zmatrixSum_fx,*zmatrixSum_fy,*zmatrixSum_fz;
129  CkSectionInfo enlCookie;
130  CProxySection_CP_State_ParticlePlane particlePlaneENLProxy;
131  CProxy_CP_State_RealParticlePlane realPP_proxy;
132  #ifdef _CP_GS_DEBUG_COMPARE_VKS_
133  complex *savedprojpsiBf;
134  complex *savedprojpsiBfsend;
135  complex *savedprojpsiGBf;
136  #endif
137 };
138 /*@}*/
139 
140 #endif // CP_STATE_PARTICLE_PLANE_H
void pup(PUP::er &)
pup for migration /////////////////////////////////////////////////////////////////////////// ///////...
holds the UberIndex and the offset for proxies
Definition: Uber.h:68
2D chare array [nchareG][nstates] Handles flow of control within an instance, always same dimensional...
Definition: GSpaceDriver.h:34
void FFTNLEesFwd()
FFT projPsi(gx,gy,gz) -> projPsi(gx,gy,z) ///////////////////////////////////////////////////////////...
void createNLEesFFTdata()
In gspace, create the projector, projPsi ////////////////////////////////////////////////////////////...
void computeZ(PPDummyMsg *m)
Entry Method.
void initKVectors()
InitKVectors creates local k vectors for this chare and mallocs some memory.
void reduceZ(int, int, complex *, complex *, complex *, complex *)
ReduceZ reduces Zmat over gspace for a particular state for N^3 method //////////////////////////////...
int istate_ind
My state index.
void computeNLEesForces()
Compute the Psi forces : If not done, start a new iteration /////////////////////////////////////////...
2D chare array [nchareG][nstates] Handles the electronic structure in Fourier space (referred to as G...
void FFTNLEesBck()
Complete the FFT : projPsif(gx,gy,z) -> projPsif(gx,gy,gz) //////////////////////////////////////////...
int calcReductionPlaneNum(int)
Spread the reduction plane numbers around to minimize map collisions for the N^3 method.
void ResumeFromSync()
Resume from Sync which is a general routine /////////////////////////////////////////////////////////...
void recvFromEesRPP(GSPPIFFTMsg *msg)
Receive the projector back modified to generate psi forces A message cannot come back until I have se...
void getForces(int, int, complex *)
Compute psi forces for the N^3 method ///////////////////////////////////////////////////////////////...
void startNLEes(int)
= The entry point to the Euler Exponential Spline non-local method.
void registrationDone(CkReductionMsg *msg)
= Make sure everyone is registered on the 1st time step
Useful debugging flags.
void setEnlCookie(EnlCookieMsg *m)
Section reduction cookie N^3 method /////////////////////////////////////////////////////////////////...
void sendToEesRPP()
send projPsi(gx,gy,z) to Rspace chare where FFT is completed ////////////////////////////////////////...
void lPrioStartNLEes(NLDummyMsg *m)
= The entry point to the Euler Exponential Spline non-local method.
void launchComputeZs()
Entry Method. GSpaceDriver calls this to trigger the launch of the computeZ()s to compute the Z matri...
~CP_State_ParticlePlane()
The destructor : Carefully about what it malloced and what is not ///////////////////////////////////...