You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/module_pw/fft.cpp
+13-3Lines changed: 13 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ FFT::~FFT()
36
36
#endif
37
37
}
38
38
39
-
void FFT:: initfft(int nx_in, int bigny_in, int nz_in, int ns_in, int nplane_in, int nproc_in, bool gamma_only_in, bool mpifft_in)
39
+
void FFT:: initfft(int nx_in, int bigny_in, int nz_in, intlix_in, int rix_in, intns_in, int nplane_in, int nproc_in, bool gamma_only_in, bool mpifft_in)
40
40
{
41
41
this->gamma_only = gamma_only_in;
42
42
this->nx = nx_in;
@@ -45,6 +45,8 @@ void FFT:: initfft(int nx_in, int bigny_in, int nz_in, int ns_in, int nplane_in,
Copy file name to clipboardExpand all lines: source/module_pw/pw_basis.h
+6-7Lines changed: 6 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ class PW_Basis
58
58
int *nst_per;// nst on each core
59
59
// on all proc.
60
60
int *ig2isz; // map ig to (is, iz).
61
-
int *istot2ixy; //istot2ixy[is]: ix + iy * nx of is^th stick among all sticks.
61
+
int *istot2bigixy; //istot2bigixy[is]: iy + ix * bigny of is^th stick among all sticks.
62
62
int *ixy2istot; // ixy2istot[ix + iy * nx]: is of stick on (ix, iy) among all sticks.
63
63
int *is2ixy; // is2ixy[is]: ix + iy * bignx of is^th stick among sticks on current proc.
64
64
int *ixy2ip; // ixy2ip[ix + iy * nx]: ip of proc which contains stick on (ix, iy).
@@ -144,14 +144,12 @@ class PW_Basis
144
144
int* st_length, // the stick on (x, y) consists of st_length[x*ny+y] planewaves.
145
145
int* npw_per // number of planewaves on each core.
146
146
);
147
-
voidget_istot2ixy(
147
+
voidget_istot2bigixy(
148
148
int* st_i, // x or x + nx (if x < 0) of stick.
149
149
int* st_j // y or y + ny (if y < 0) of stick.
150
150
);
151
151
// for distributeg_method2
152
-
voiddivide_sticks2(
153
-
int* nst_per // number of sticks on each core.
154
-
);
152
+
voiddivide_sticks2();
155
153
voidcreate_maps(
156
154
int* st_length2D, // the number of planewaves that belong to the stick located on (x, y), stored in 2d x-y plane.
157
155
int* npw_per // number of planewaves on each core.
@@ -186,6 +184,7 @@ class PW_Basis
186
184
// FFT dimensions for wave functions.
187
185
int nx, ny, nz, nxyz, nxy;
188
186
int bigny, bignxyz, bignxy; // Gamma_only: ny = int(bigny/2)-1 , others: ny = bigny
187
+
int lix,rix;// lix: the left edge of the pw ball; rix: the right edge of the pw ball
189
188
int maxgrids; // max between nz * ns and bignxy * nplane
190
189
FFT ft;
191
190
@@ -196,8 +195,8 @@ class PW_Basis
196
195
197
196
voidgatherp_scatters(std::complex<double> *in, std::complex<double> *out); //gather planes and scatter sticks of all processors
198
197
voidgathers_scatterp(std::complex<double> *in, std::complex<double> *out); //gather sticks of and scatter planes of all processors
199
-
voidgathers_scatterp2(std::complex<double> *in, std::complex<double> *out); //gather sticks of and scatter planes of all processors
200
-
voidgatherp_scatters2(std::complex<double> *in, std::complex<double> *out); //gather sticks of and scatter planes of all processors
198
+
//void gathers_scatterp2(std::complex<double> *in, std::complex<double> *out); //gather sticks of and scatter planes of all processors
199
+
//void gatherp_scatters2(std::complex<double> *in, std::complex<double> *out); //gather sticks of and scatter planes of all processors
201
200
voidgatherp_scatters_gamma(std::complex<double> *in, std::complex<double> *out); //gather planes and scatter sticks of all processors, used when gamma_only
202
201
voidgathers_scatterp_gamma(std::complex<double> *in, std::complex<double> *out); //gather sticks of and scatter planes of all processors, used when gamma only
0 commit comments