OpenAtom  Version1.5a
fftCacheSlab.h
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////=
2 ///////////////////////////////////////////////////////////////////////////////c
3 ///////////////////////////////////////////////////////////////////////////////=
4 /** \file fftCacheSlab.h
5  * Add type declarations for simulationConstants class (readonly vars)
6  * and once class for each type of object we currently have
7  *(GStateXYslab, RealStateXZslab, RealRhoSlab, GRhoSlab, etc.)
8  */
9 ///////////////////////////////////////////////////////////////////////////////=
10 #include "utility/util.h"
11 #include "uber/Uber.h"
12 
13 #ifndef _fftcacheslab_h_
14 #define _fftcacheslab_h_
15 
16 #include "RunDescriptor.h"
17 
18 #ifdef _CP_USE_BLAS_GATHER_
19 include "src_mathlib/mathlib.h"
20 #endif
21 
22 ///////////////////////////////////////////////////////////////////////////////=
23 ///////////////////////////////////////////////////////////////////////////////c
24 ///////////////////////////////////////////////////////////////////////////////=
25 class GStateSlab {
26 ///////////////////////////////////////////////////////////////////////////////=
27 /// data
28 public:
29 
30  void pup(PUP::er &);
31  int cp_min_opt;
32  size2d planeSize;
33  int numNonZeroPlanes;
34  int numRuns, numLines; // numLines=numRun/2=number of lines in collection
35  int numPoints; // number of non-zero pts in the collection
36  int numFull; // expanded data : nfftz*numLines
37  int numFullNL; // expanded data : nfftz*numLines
38  int ees_nonlocal;
39  bool fftReqd; // flags to indicate whether this data set of pencils
40  int mysizeX; // size of the ffT in X dimension
41  int S_grainSize; // PC decomposition
42  int xdim, ydim, zdim; // FFT sizes
43  int ngridaNL,ngridbNL,ngridcNL; // FFT sizes for non-local
44  int iplane_ind; // collection index
45  int istate_ind; // state index of this collection
46  int ihave_kx0; // plane zero is in the collection (stored consecutively)
47  int ihave_g000;
48  int ind_g000;
49  int kx0_strt; // starting pt
50  int kx0_end; // ending pt
51  int nkx0,nkx0_uni,nkx0_red; // split kx=0 into unique and redundant parts
52  int nkx0_zero; // ncoef_true=numPoints-nkx0_red
53 
54  double eke_ret; // kinetic energy
55  double fictEke_ret; // fictitious kinetic energy
56  double ekeNhc_ret; // NHC energies
57  double potNHC_ret;
58  double degfree; // Degrees of freedom (ncoef_true+num_nhc-1)
59  double degfreeNHC; // Degrees of freedom (num_nhc-1)*len_nhc
60 
61  complex *packedPlaneData; // Non-zero data pts [numPoints]
62  complex *packedPlaneDataTemp2;
63  complex *packedPlaneDataTemp;
64  complex *packedPlaneDataScr;
65  complex *packedForceData;
66  complex *packedVelData;
67  complex *packedRedPsi;
68  complex *packedRedPsiV;
69  int len_nhc_cp;
70  int num_nhc_cp;
71  int nck_nhc_cp;
72  int *istrNHC;
73  int *iendNHC;
74  double kTCP;
75  double tauNHCCP;
76  double ***xNHC;
77  double ***xNHCP;
78  double ***vNHC;
79  double ***fNHC;
80  double *degFreeSplt;
81  double *mNHC;
82  double *v0NHC,*a2NHC,*a4NHC;
83 
84 ///////////////////////////////////////////////////////////////////////////////=
85 /// Constuctor, Destructor and utilities
86 
87  GStateSlab() {packedPlaneData=NULL; packedPlaneDataTemp=NULL;
88  packedForceData=NULL; packedPlaneDataScr=NULL;
89  packedVelData=NULL;}
90  ~GStateSlab();
91 
92  void initNHC(int _len_nhc_cp, int _num_nhc_cp, int _nck_nhc_cp){
93  nck_nhc_cp = _nck_nhc_cp;
94  num_nhc_cp = _num_nhc_cp;
95  len_nhc_cp = _len_nhc_cp;
96  xNHC = new double **[nck_nhc_cp];
97  xNHCP = new double **[nck_nhc_cp];
98  vNHC = new double **[nck_nhc_cp];
99  fNHC = new double **[nck_nhc_cp];
100  for(int k = 0;k<nck_nhc_cp;k++){
101  xNHC[k] = new double *[num_nhc_cp];
102  xNHCP[k] = new double *[num_nhc_cp];
103  vNHC[k] = new double *[num_nhc_cp];
104  fNHC[k] = new double *[num_nhc_cp];
105  for(int i=0;i<num_nhc_cp;i++){
106  xNHC[k][i] = new double[len_nhc_cp];
107  xNHCP[k][i] = new double[len_nhc_cp];
108  vNHC[k][i] = new double[len_nhc_cp];
109  fNHC[k][i] = new double[len_nhc_cp];
110  }//endfor
111  }//endfor
112  degFreeSplt = new double[nck_nhc_cp];
113  istrNHC = new int [nck_nhc_cp];
114  iendNHC = new int [nck_nhc_cp];
115  mNHC = new double[len_nhc_cp];
116  v0NHC = new double[num_nhc_cp];
117  a2NHC = new double[num_nhc_cp];
118  a4NHC = new double[num_nhc_cp];
119  for(int k=0;k<nck_nhc_cp;k++){
120  for(int i=0;i<num_nhc_cp;i++){
121  for(int j=0;j<len_nhc_cp;j++){
122  xNHC[k][i][j] = 0.0;
123  xNHCP[k][i][j] = 0.0;
124  vNHC[k][i][j] = 0.0;
125  fNHC[k][i][j] = 0.0;
126  }}}//endfor
127  }//end routine
128 
129  void destroyNHC(){
130  for(int k=0;k<nck_nhc_cp;k++){
131  for(int i=0;i<num_nhc_cp;i++){
132  delete []xNHC[k][i];
133  delete []xNHCP[k][i];
134  delete []vNHC[k][i];
135  delete []fNHC[k][i];
136  }//endfor
137  delete []xNHC[k];
138  delete []xNHCP[k];
139  delete []vNHC[k];
140  delete []fNHC[k];
141  }//endfor
142  delete []xNHC;
143  delete []xNHCP;
144  delete []vNHC;
145  delete []fNHC;
146  delete []degFreeSplt;
147  delete []istrNHC;
148  delete []iendNHC;
149  delete []mNHC;
150  delete []v0NHC;
151  delete []a2NHC;
152  delete []a4NHC;
153  }//end routine
154 
155  void setKRange(int , int *, int *, int *);
156  void addForces(complex *,const int *);
157 
158 //-----------------------------------------------------------------------------
159  };
160 ///////////////////////////////////////////////////////////////////////////////=
161 
162 
163 ///////////////////////////////////////////////////////////////////////////////=
164 ///////////////////////////////////////////////////////////////////////////////c
165 ///////////////////////////////////////////////////////////////////////////////=
167 public:
168  complex *planeArr;
169  double *planeArrR; //planeArr cast to double
170  int ngrid_a;
171  int ngrid_b;
172  int thisState;
173  int thisPlane;
174  int numPlanesToExpect;
175  int nsize;
176  int rsize;
177  int size;
178  double e_gga;
179  RealStateSlab() {}
180  ~RealStateSlab();
181  void zeroOutPlanes();
182  void allocate();
183  void destroy();
184  void pup(PUP::er &);
185 
186 //-----------------------------------------------------------------------------
187  };
188 ///////////////////////////////////////////////////////////////////////////////=
189 
190 
191 
192 ///////////////////////////////////////////////////////////////////////////////=
193 ///////////////////////////////////////////////////////////////////////////////c
194 ///////////////////////////////////////////////////////////////////////////////=
195 class RhoRealSlab {
196 public:
197  int size; //plane size
198  int trueSize;
199  int sizeX, sizeY, sizeZ; //fft size
200  int rhoRsubplanes;
201  int csizeInt;
202  int rsizeInt;
203  double exc_ret, muxc_ret, exc_gga_ret; //energy
204 
205  double *Vks; // we have to keep him around
206  double *density; // we have to keep him around
207  double *rhoIRX,*rhoIRY,*rhoIRZ; //needed to receive stuff as it comes in
208  double *VksHart; //needed to receive stuff as it comes in
209  double *rhoIRXint;
210  double *rhoIRYint;
211  double *rhoIRZint;
212  double *VksHartint;
213 
214  // complex pointers to the same memory as the corresponding double array
215  complex *VksC;
216  complex *densityC;
217  complex *rhoIRXC,*rhoIRYC,*rhoIRZC;
218  complex *VksHartC;
219  complex *rhoIRXCint;
220  complex *rhoIRYCint;
221  complex *rhoIRZCint;
222  complex *VksHartCint;
223 
224  RhoRealSlab() {
225  sizeX=sizeY=sizeZ=size=trueSize=0;
226  exc_ret=muxc_ret=exc_gga_ret=0.0;
227  Vks = NULL;
228  VksC = NULL;
229  density = NULL;
230  densityC = NULL;
231  rhoIRX = NULL;
232  rhoIRXC = NULL;
233  rhoIRY = NULL;
234  rhoIRYC = NULL;
235  rhoIRZ = NULL;
236  rhoIRZC = NULL;
237  Vks = NULL;
238  VksHartC = NULL;
239  }
240  ~RhoRealSlab();
241 
242  void uPackScaleGrow(double *,double *,double ); // dest bigger src : cp+scale
243  void uPackScaleShrink(double *,double *,double ); // dest smaller src : cp+scale
244  void uPackShrink(double *,double *); // dest smaller src : cp only
245  void uPackScale(double *, double *,double ); // dest size= src : scale
246  void scale(double *,double ); // dest = src : scale
247 
248  void pup(PUP::er &);
249 
250 //-----------------------------------------------------------------------------
251  };
252 ///////////////////////////////////////////////////////////////////////////////=
253 
254 
255 ///////////////////////////////////////////////////////////////////////////////=
256 ///////////////////////////////////////////////////////////////////////////////c
257 ///////////////////////////////////////////////////////////////////////////////=
258 class RhoGSlab {
259  public:
260  /* Stuff that is currently in CP_Rho_GSpacePlane's private variables */
261  int sizeX, sizeY, sizeZ;
262  int runsToBeSent;
263  int numRuns;
264  int numLines;
265  int numFull;
266  int numPoints;
267  int nPacked;
268  int iperd;
269  RunDescriptor *runs;
270 
271  complex *Rho; // Is big enough to be expanded!
272  complex *divRhoX; // Is big enough to be expanded!
273  complex *divRhoY; // Is big enough to be expanded!
274  complex *divRhoZ; // Is big enough to be expanded!
275  complex *packedRho;
276  complex *packedVks;
277  complex *Vks; // Is big enough to be expanded!
278  double *perdCorr;
279 
280  int *k_x, *k_y, *k_z;
281 
282  /* return values from rhoGSubroutine in subroutine.C */
283  double ehart_ret, eext_ret, ewd_ret;
284 
285  /* used in the subroutine doRhoGSubroutine */
286  int size;
287  int xdim, ydim, zdim;
288 
289  RhoGSlab() { //initialization paranoia
290  sizeX= sizeY= sizeZ=runsToBeSent= numRuns= numLines=numFull=0;
291  numPoints= nPacked=size=xdim=ydim= zdim=0;
292  iperd = 3;
293 
294  k_x = NULL;
295  k_y = NULL;
296  k_z = NULL;
297  perdCorr = NULL;
298 
299  Rho = NULL;
300  divRhoX = NULL;
301  divRhoY = NULL;
302  divRhoZ = NULL;
303  packedRho= NULL;
304  packedVks= NULL;
305  Vks = NULL;
306  runs = NULL;
307  }//end constructor
308 
309  ~RhoGSlab();
310 
311  void setKVectors(int *n);
312  void divRhoGdot(double *,double ,complex *);
313  void createWhiteByrd(double *, double );
314  void pup(PUP::er &p);
315 
316 //-----------------------------------------------------------------------------
317  };
318 ///////////////////////////////////////////////////////////////////////////////=
319 
320 ///////////////////////////////////////////////////////////////////////////////=
321 ///////////////////////////////////////////////////////////////////////////////c
322 ///////////////////////////////////////////////////////////////////////////////=
323 /// Holder classes for the plans : Allows many fft libaries to be used
324 ///////////////////////////////////////////////////////////////////////////////=
325 typedef struct essl_work {
326  int num;
327  double *work1, *work2;
328 } ESSL_WORK;
329 
330 typedef struct fftplanholder {
331  int nchare;
332  int nsplit;
333  int option; // 0= fftw, 1=essl
334  int nfft; // essl stuff
335  int ostride; // essl stuff
336  int odist; // essl stuff
337  int isign; // essl stuff
338  int nwork1, nwork2; // essl stuff
339  double scale; // essl stuff
340  int nval,nmax; // essl stuff
341  int *mapp; // essl stuff
342  ESSL_WORK *essl_work; // essl stuff
343  double *work1, *work2; // essl stuff
344  fftw_plan fftwPlan; // fftw stuff
345 } FFTplanHolder;
346 
347 typedef struct rfftplanholder {
348  int nchare;
349  int nsplit;
350  int option; // 0= fftw, 1=essl
351  int nfft; // essl stuff
352  int ostride; // essl stuff
353  int odist; // essl stuff
354  int isign; // essl stuff
355  int nwork1, nwork2; // essl stuff
356  double scale; // essl stuff
357  int nval,nmax; // essl stuff
358  int *mapp; // essl stuff
359  ESSL_WORK *essl_work; // essl stuff
360  double *work1, *work2; // essl stuff
361  rfftwnd_plan rfftwPlan; // fftw stuff
363 ///////////////////////////////////////////////////////////////////////////////=
364 
365 
366 ///////////////////////////////////////////////////////////////////////////////=
367 ///////////////////////////////////////////////////////////////////////////////c
368 ///////////////////////////////////////////////////////////////////////////////=
369 class FFTcache: public Group {
370  public:
371  //-----------------------------------------------------------
372  // FFT-Sizes and Ees method Options
373  int ngrida;
374  int ngridb;
375  int ngridc;
376  int ngridaEext;
377  int ngridbEext;
378  int ngridcEext;
379  int ngridaNL;
380  int ngridbNL;
381  int ngridcNL;
382  int ees_eext_on;
383  int ees_NL_on;
384  int nchareGState;
385  int nchareRState;
386  int nchareGNL;
387  int nchareRNL;
388  int nchareGRho;
389  int nchareRRho;
390  int nchareRRhoTot;
391  int nchareGEext;
392  int nchareREext;
393  int nchareREextTot;
394  int nsplitR;
395  int nsplitG;
396  int rhoRsubPlanes;
397 
398  int cacheMemFlag;
399  char cacheMemName[1000];
400  static CmiNodeLock fftw_plan_lock;
401  //-----------------------------------------------------------
402  // Generic plane temporaries used everywhere possible to avoid CmiMemcpys
403  complex *tmpData;
404  double *tmpDataR;
405 
406  //-----------------------------------------------------------
407  // Da Plans : Use the holder class to allow other fft libs
408  // All plans are double pack plans
409 
410  RFFTplanHolder fwdXPlanState, bwdXPlanState; // state
411  FFTplanHolder fwdXPlanStateK, bwdXPlanStateK; // state for kpoints
412  FFTplanHolder fwdYPlanState, bwdYPlanState;
413  FFTplanHolder fwdYPlanStateLower, bwdYPlanStateLower; // state for kpoints
414  FFTplanHolder fwdZPlanState, bwdZPlanState;
415 
416  RFFTplanHolder fwdXPlanRho, bwdXPlanRho; // density
417  FFTplanHolder fwdYPlanRho, bwdYPlanRho;
418  FFTplanHolder fwdYPlanRhoS, bwdYPlanRhoS; // special subplane plan
419  FFTplanHolder fwdZPlanRho, bwdZPlanRho;
420 
421  FFTplanHolder fwdZPlanRhoHart;
422 
423  RFFTplanHolder fwdXPlanNL, bwdXPlanNL; // ees NL
424  FFTplanHolder fwdXPlanNLK, bwdXPlanNLK; // ees NL for kpoints
425  FFTplanHolder fwdYPlanNL, bwdYPlanNL;
426  FFTplanHolder fwdYPlanNLLower, bwdYPlanNLLower; // for kpoints
427  FFTplanHolder fwdZPlanNL, bwdZPlanNL;
428 
429 
430  RFFTplanHolder fwdXPlanEext, bwdXPlanEext; // ees Eext
431  FFTplanHolder fwdYPlanEext, bwdYPlanEext;
432  FFTplanHolder fwdYPlanEextS, bwdYPlanEextS; // special subplane plan
433  FFTplanHolder fwdZPlanEext, bwdZPlanEext;
434  const UberCollection thisInstance;
435 
436  //-----------------------------------------------------------
437  // The constructor
438  FFTcache( int _ngrida, int _ngridb, int _ngridc,
439  int _ngridaEext, int _ngridbEext, int _ngridcEext,
440  int _ees_eext_on, int _ngridaNL, int _ngridbNL, int _ngridcNL,
441  int _ees_NL_on, int _nlines_max, int _nlines_max_rho,
442  int _nchareGState, int _nchareRState,
443  int _nchareGNL, int _nchareRNL,
444  int _nchareGRho, int _nchareRRho, int _nchareRRhoTot,
445  int _nchareGEext, int _nchareREext, int _nchareREextTot,
446  int *numGState, int *numRXState, int *numRYState,int *numRYStateLower,
447  int *numGNL, int *numRXNL, int *numRYNL,int *numRYNLLower,
448  int *numGRho, int *numRXRho, int *numRYRho ,
449  int *numGEext, int *numRXEext, int *numRYEext ,
450  int _fftopt, int _nsplitR, int _nsplitG,
451  int _rhoRsubPlanes, UberCollection _thisInstance);
452  //-----------------------------------------------------------
453  // cache control
454  void getCacheMem(const char *name){
455  if(cacheMemFlag==1){
456  CkPrintf("%s stealing from %s\n",cacheMemName,name);
457  CkExit();
458  }//endif
459  cacheMemFlag = 1;
460  strcpy(cacheMemName,name);
461  }//end routine
462  void freeCacheMem(const char *name){
463  if(cacheMemFlag==0){
464  CkPrintf("Bad cache memory free from %s\n",name);
465  CkExit();
466  }//endif
467  cacheMemFlag = 0;
468  }//end routine
469 
470  //-----------------------------------------------------------
471  // Generic G-space expanders and contractors
472  void expandGSpace(complex* data, complex *packedData,
473  RunDescriptor *runs, int numRuns, int numFull,
474  int numPoints, int nfftz);
475  void packGSpace(complex* data, complex *packedPlaneData,
476  RunDescriptor *runs, int numRuns, int numFull,
477  int numPoints, int nfftz);
478 
479  //-----------------------------------------------------------
480  // Density FFTs
481  void doHartFFTGtoR_Gchare(complex *,complex *,int , int ,int , int ,
482  RunDescriptor *, int ,int);
483  void doRhoFFTRtoG_Gchare(complex *,complex *,int ,int ,int ,int ,RunDescriptor *,
484  int ,int ,int);
485  void doRhoFFTGtoR_Gchare(complex *,complex *,int ,int ,int ,int ,RunDescriptor *,
486  int ,int ,int);
487  void doRhoFFTRtoG_Rchare(complex *,double *,int , int ,int ,int);
488  void doRhoFFTGtoR_Rchare(complex *,double *,int , int ,int ,int);
489 
490  void doRhoFFTRxToGx_Rchare(complex *,double *,int , int ,int ,int);
491  void doRhoFFTRyToGy_Rchare(complex *,double *,int , int ,int ,int);
492  void doRhoFFTGxToRx_Rchare(complex *,double *,int , int ,int ,int);
493  void doRhoFFTGyToRy_Rchare(complex *,double *,int , int ,int ,int);
494 
495  //-----------------------------------------------------------
496  // State FFTs
497  void doStpFFTRtoG_Gchare(complex *,complex *,int, int ,int ,int, RunDescriptor *,int,int);
498  void doStpFFTGtoR_Gchare(complex *,complex *,int, int ,int ,int, RunDescriptor *,int,int);
499  void doStpFFTGtoR_Rchare(complex *,double *,int , int ,int ,int);
500  void doStpFFTRtoG_Rchare(complex *,double *,int , int ,int ,int);
501 
502  //-----------------------------------------------------------
503  // non-local fft
504  void doNlFFTRtoG_Gchare(complex *,complex *,int, int ,int ,int, RunDescriptor *,int,int);
505  void doNlFFTGtoR_Gchare(complex *,complex *,int, int ,int ,int, RunDescriptor *,int,int);
506  void doNlFFTRtoG_Rchare(complex *,double *,int ,int ,int ,int);
507  void doNlFFTGtoR_Rchare(complex *,double *,int ,int ,int ,int);
508 
509  //-----------------------------------------------------------
510  // eext fft
511  void doEextFFTRtoG_Gchare(complex *,int, int ,int ,int, RunDescriptor *,int,int);
512  void doEextFFTGtoR_Gchare(complex *,complex *,int, int ,int ,int, RunDescriptor *,int,int);
513 
514  void doEextFFTRtoG_Rchare(complex *,double *,int ,int ,int ,int);
515  void doEextFFTGtoR_Rchare(complex *,double *,int ,int ,int ,int);
516 
517  void doEextFFTRxToGx_Rchare(complex *,double *,int ,int ,int ,int);
518  void doEextFFTRyToGy_Rchare(complex *,double *,int ,int ,int ,int);
519  void doEextFFTGxToRx_Rchare(complex *,double *,int ,int ,int ,int);
520  void doEextFFTGyToRy_Rchare(complex *,double *,int ,int ,int ,int);
521 
522 //-----------------------------------------------------------------------------
523  };
524 ///////////////////////////////////////////////////////////////////////////////=
525 
526 
527 ///////////////////////////////////////////////////////////////////////////////=
528 ///////////////////////////////////////////////////////////////////////////////c
529 ///////////////////////////////////////////////////////////////////////////////=
530 class GSlabInfo {
531  public:
532  CkIndex2D index;
533  int numPoints;
534  int numPlanes;
535  GSlabInfo() {}
536  GSlabInfo(const GSlabInfo& info) {
537  index.x = info.index.x; index.y = info.index.y;
538  numPoints = info.numPoints;
539  numPlanes = info.numPlanes;
540  }
541  GSlabInfo(CkIndex2D idx, int _numPoints, int _numPlanes){
542  index.x = idx.x; index.y = idx.x;
543  numPoints = _numPoints;
544  numPlanes = _numPlanes;
545  }
546 };
547 ///////////////////////////////////////////////////////////////////////////////=
548 
549 
550 ///////////////////////////////////////////////////////////////////////////////=
551 ///////////////////////////////////////////////////////////////////////////////c
552 ///////////////////////////////////////////////////////////////////////////////=
553 /// slab initialization helpers
554 
555 void initGStateSlab(GStateSlab *gs, int sizeX, int sizeY, int sizeZ, int gSpaceUnits,
556  int realSpaceUnits, int s_grain,int iplane_ind,int istate_ind,
557  int len_nhc_cp, int num_nhc_cp,int nck_nhc_cp);
558 void initRealStateSlab(RealStateSlab *rs, int ngrid_a, int ngrid_b, int ngrid_c,
559  int gSpaceUnits, int realSpaceUnits, int stateIndex, int thisPlane);
560 void initRhoRealSlab(RhoRealSlab *rho_rs, int xdim, int ydim, int zdim,
561  int xdimA, int ydimA, int myIndexX,int myIndexY,
562  int rhoRsubplanes);
563 
564 ///////////////////////////////////////////////////////////////////////////////=
565 /// Eric's really cool BG/L progress callers
566 
567 void fft_split(FFTplanHolder *fftplanholder, int howmany,
568  fftw_complex *in, int istride, int idist,
569  fftw_complex *out, int ostride, int odist, int split, int index);
570 
572  fftw_complex *in, int istride, int idist,
573  fftw_real *out, int ostride, int odist, int split, int index);
574 
576  fftw_real *in, int istride, int idist,
577  fftw_complex *out, int ostride, int odist, int split, int index);
578 
579 void initFFTholder ( FFTplanHolder *,int *,int *,int *,double *,int *,int *,int *,int *,
580  int ,int *,int *);
581 void initRCFFTholder(RFFTplanHolder *,int *,int *,int *,double *,int *,int *,int *,int *,
582  int ,int *,int *);
583 void initCRFFTholder(RFFTplanHolder *,int *,int *,int *,double *,int *,int *,int *,int *,
584  int ,int *,int *);
585 void make_essl_work_map(int ,int *,int *,int *,int *,int *, int *,int);
586 
587 ///////////////////////////////////////////////////////////////////////////////=
588 #endif
void doNlFFTRtoG_Rchare(complex *, double *, int, int, int, int)
non-local : Rchare : data(x,y,z) -> data(gx,gy,z) : backward ////////////////////////////////////////...
Definition: fftCache.C:696
void pup(PUP::er &)
= data
Definition: stateSlab.C:115
void rfftwnd_complex_to_real_split(RFFTplanHolder *rfftplanholder, int howmany, fftw_complex *in, int istride, int idist, fftw_real *out, int ostride, int odist, int split, int index)
split up an fft call into multiple invocations with cmiprogress calls between them.
Definition: fftCache.C:1736
holds the UberIndex and the offset for proxies
Definition: Uber.h:68
== Size or location in a regular 2D array
Definition: util.h:59
void doStpFFTGtoR_Gchare(complex *, complex *, int, int, int, int, RunDescriptor *, int, int)
StatePlane : Gchare : data(gx,gy,gz) -> data(gx,gy,z) : forward /////////////////////////////////////...
Definition: fftCache.C:1169
void doEextFFTGxToRx_Rchare(complex *, double *, int, int, int, int)
Eext : Rchare : data(gx,gy,z) -> data(x,y,z) : forward //////////////////////////////////////////////...
Definition: fftCache.C:1075
void doStpFFTRtoG_Rchare(complex *, double *, int, int, int, int)
////////////////////////////////////////////////////////////////////////////= ///////////////////////...
Definition: fftCache.C:1288
void doStpFFTRtoG_Gchare(complex *, complex *, int, int, int, int, RunDescriptor *, int, int)
StatePlane : Gchare : data(gx,gy,z) -> data(gx,gy,gz) : backward ////////////////////////////////////...
Definition: fftCache.C:1135
void initGStateSlab(GStateSlab *gs, int sizeX, int sizeY, int sizeZ, int gSpaceUnits, int realSpaceUnits, int s_grain, int iplane_ind, int istate_ind, int len_nhc_cp, int num_nhc_cp, int nck_nhc_cp)
= slab initialization helpers
Definition: stateSlab.C:35
GStateSlab()
= Constuctor, Destructor and utilities
Definition: fftCacheSlab.h:87
void doStpFFTGtoR_Rchare(complex *, double *, int, int, int, int)
Definition: fftCache.C:1203
void doEextFFTGtoR_Gchare(complex *, complex *, int, int, int, int, RunDescriptor *, int, int)
Eext : Gchare : data(gx,gy,gz) -> data(gx,gy,z) : forward ///////////////////////////////////////////...
Definition: fftCache.C:890
void setKRange(int, int *, int *, int *)
Definition: stateSlab.C:287
void doRhoFFTGtoR_Rchare(complex *, double *, int, int, int, int)
Definition: fftCache.C:1541
void rfftwnd_real_to_complex_split(RFFTplanHolder *rfftplanholder, int howmany, fftw_real *in, int istride, int idist, fftw_complex *out, int ostride, int odist, int split, int index)
split up an fft call into multiple invocations with cmiprogress calls between them.
Definition: fftCache.C:1827
= Holder classes for the plans : Allows many fft libaries to be used
Definition: fftCacheSlab.h:325
void doEextFFTGtoR_Rchare(complex *, double *, int, int, int, int)
Eext : Rchare : data(gx,gy,z) -> data(x,y,z) : forward //////////////////////////////////////////////...
Definition: fftCache.C:1028
void doRhoFFTRxToGx_Rchare(complex *, double *, int, int, int, int)
Definition: fftCache.C:1482
void setKVectors(int *n)
Definition: rhoSlab.C:371
void doEextFFTRtoG_Rchare(complex *, double *, int, int, int, int)
Eext : Rchare : data(x,y,z) -> data(gx,gy,z) : Backward /////////////////////////////////////////////...
Definition: fftCache.C:923
void expandGSpace(complex *data, complex *packedData, RunDescriptor *runs, int numRuns, int numFull, int numPoints, int nfftz)
packed g-space of size numPoints is expanded to numFull =numRuns/2*nfftz ////////////////////////////...
Definition: fftCache.C:496
void doNlFFTRtoG_Gchare(complex *, complex *, int, int, int, int, RunDescriptor *, int, int)
non-local : Gchare : data(gx,gy,z) -> data(gx,gy,gz) : backward /////////////////////////////////////...
Definition: fftCache.C:598
void doRhoFFTGyToRy_Rchare(complex *, double *, int, int, int, int)
Definition: fftCache.C:1586
void createWhiteByrd(double *, double)
= packed g-space of size numPoints is expanded to numFull =numRuns/2*nfftz
Definition: rhoSlab.C:315
void doEextFFTRtoG_Gchare(complex *, int, int, int, int, RunDescriptor *, int, int)
Eext : Gchare : data(gx,gy,z) -> data(gx,gy,gz) : backward //////////////////////////////////////////...
Definition: fftCache.C:855
void doNlFFTGtoR_Rchare(complex *, double *, int, int, int, int)
non-local : Rchare : data(gx,gy,z) -> data(x,y,z) : Forward /////////////////////////////////////////...
Definition: fftCache.C:771
struct essl_work ESSL_WORK
= Holder classes for the plans : Allows many fft libaries to be used
FFTcache(int _ngrida, int _ngridb, int _ngridc, int _ngridaEext, int _ngridbEext, int _ngridcEext, int _ees_eext_on, int _ngridaNL, int _ngridbNL, int _ngridcNL, int _ees_NL_on, int _nlines_max, int _nlines_max_rho, int _nchareGState, int _nchareRState, int _nchareGNL, int _nchareRNL, int _nchareGRho, int _nchareRRho, int _nchareRRhoTot, int _nchareGEext, int _nchareREext, int _nchareREextTot, int *numGState, int *numRXState, int *numRYState, int *numRYStateLower, int *numGNL, int *numRXNL, int *numRYNL, int *numRYNLLower, int *numGRho, int *numRXRho, int *numRYRho, int *numGEext, int *numRXEext, int *numRYEext, int _fftopt, int _nsplitR, int _nsplitG, int _rhoRsubPlanes, UberCollection _thisInstance)
= FFTcache - sets up a fftcache on each processor
Definition: fftCache.C:39
void packGSpace(complex *data, complex *packedPlaneData, RunDescriptor *runs, int numRuns, int numFull, int numPoints, int nfftz)
packed g-space of size numPoints is expanded to numFull =numRuns/2*nfftz ////////////////////////////...
Definition: fftCache.C:553
== Index logic for lines of constant x,y in gspace.
Definition: RunDescriptor.h:22
void fft_split(FFTplanHolder *fftplanholder, int howmany, fftw_complex *in, int istride, int idist, fftw_complex *out, int ostride, int odist, int split, int index)
= Eric's really cool BG/L progress callers
Definition: fftCache.C:1645
void divRhoGdot(double *, double, complex *)
= packed g-space of size numPoints is expanded to numFull =numRuns/2*nfftz
Definition: rhoSlab.C:258
void doRhoFFTRtoG_Gchare(complex *, complex *, int, int, int, int, RunDescriptor *, int, int, int)
Rho Plane : Gchare : data(gx,gy,z) -> data(gx,gy,gz) : backward /////////////////////////////////////...
Definition: fftCache.C:1401
void doRhoFFTGtoR_Gchare(complex *, complex *, int, int, int, int, RunDescriptor *, int, int, int)
rho Gchare : data(gx,gy,gz) -> data(gx,gy,z) : forward //////////////////////////////////////////////...
Definition: fftCache.C:1365
void doEextFFTRxToGx_Rchare(complex *, double *, int, int, int, int)
Eext : Rchare : data(x,y,z) -> data(gx,gy,z) : Backward /////////////////////////////////////////////...
Definition: fftCache.C:969
void doEextFFTGyToRy_Rchare(complex *, double *, int, int, int, int)
Eext : Rchare : data(gx,gy,z) -> data(x,y,z) : forward //////////////////////////////////////////////...
Definition: fftCache.C:1106
void initRealStateSlab(RealStateSlab *rs, int ngrid_a, int ngrid_b, int ngrid_c, int gSpaceUnits, int realSpaceUnits, int stateIndex, int thisPlane)
Definition: stateSlab.C:392
void doRhoFFTGxToRx_Rchare(complex *, double *, int, int, int, int)
Definition: fftCache.C:1611
void doRhoFFTRtoG_Rchare(complex *, double *, int, int, int, int)
Definition: fftCache.C:1437
void doNlFFTGtoR_Gchare(complex *, complex *, int, int, int, int, RunDescriptor *, int, int)
non-local : Gchare : data(gx,gy,gz) -> data(gx,gy,z) : forward //////////////////////////////////////...
Definition: fftCache.C:632
void doEextFFTRyToGy_Rchare(complex *, double *, int, int, int, int)
Eext : Rchare : data(x,y,z) -> data(gx,gy,z) : Backward /////////////////////////////////////////////...
Definition: fftCache.C:1001
void doHartFFTGtoR_Gchare(complex *, complex *, int, int, int, int, RunDescriptor *, int, int)
Hartree : Gchare : data(gx,gy,gz) -> data(gx,gy,z) : forward ////////////////////////////////////////...
Definition: fftCache.C:664
void doRhoFFTRyToGy_Rchare(complex *, double *, int, int, int, int)
Definition: fftCache.C:1514