Skip to content

Commit f8b6db2

Browse files
committed
Pgrid contains nxyz
1 parent 1fb385c commit f8b6db2

File tree

18 files changed

+30
-129
lines changed

18 files changed

+30
-129
lines changed

source/module_elecstate/module_charge/charge_init.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,6 @@ void Charge::init_rho(elecstate::efermi& eferm_iout,
5858
GlobalV::ofs_running,
5959
ssc.str(),
6060
this->rho[is],
61-
this->rhopw->nx,
62-
this->rhopw->ny,
63-
this->rhopw->nz,
6461
GlobalC::ucell.nat))
6562
{
6663
GlobalV::ofs_running << " Read in the charge density: " << ssc.str() << std::endl;
@@ -111,9 +108,6 @@ void Charge::init_rho(elecstate::efermi& eferm_iout,
111108
GlobalV::ofs_running,
112109
ssc.str(),
113110
this->kin_r[is],
114-
this->rhopw->nx,
115-
this->rhopw->ny,
116-
this->rhopw->nz,
117111
GlobalC::ucell.nat))
118112
{
119113
GlobalV::ofs_running << " Read in the kinetic energy density: " << ssc.str() << std::endl;

source/module_esolver/esolver_fp.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,6 @@ void ESolver_FP::after_scf(const int istep)
161161
PARAM.inp.nspin,
162162
istep,
163163
fn,
164-
this->pw_rhod->nx,
165-
this->pw_rhod->ny,
166-
this->pw_rhod->nz,
167164
this->pelec->eferm.get_efval(is),
168165
&(GlobalC::ucell),
169166
PARAM.inp.out_chg[1],
@@ -177,9 +174,6 @@ void ESolver_FP::after_scf(const int istep)
177174
PARAM.inp.nspin,
178175
istep,
179176
fn,
180-
this->pw_rhod->nx,
181-
this->pw_rhod->ny,
182-
this->pw_rhod->nz,
183177
this->pelec->eferm.get_efval(is),
184178
&(GlobalC::ucell));
185179
}
@@ -217,9 +211,6 @@ void ESolver_FP::after_scf(const int istep)
217211
PARAM.inp.nspin,
218212
istep,
219213
fn,
220-
this->pw_rhod->nx,
221-
this->pw_rhod->ny,
222-
this->pw_rhod->nz,
223214
0.0, // efermi
224215
&(GlobalC::ucell),
225216
3, // precision

source/module_esolver/esolver_ks_lcao.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,9 +1035,6 @@ void ESolver_KS_LCAO<TK, TR>::iter_finish(int& iter)
10351035
PARAM.inp.nspin,
10361036
0,
10371037
fn,
1038-
this->pw_rhod->nx,
1039-
this->pw_rhod->ny,
1040-
this->pw_rhod->nz,
10411038
this->pelec->eferm.get_efval(is),
10421039
&(GlobalC::ucell),
10431040
3,
@@ -1051,9 +1048,6 @@ void ESolver_KS_LCAO<TK, TR>::iter_finish(int& iter)
10511048
PARAM.inp.nspin,
10521049
0,
10531050
fn,
1054-
this->pw_rhod->nx,
1055-
this->pw_rhod->ny,
1056-
this->pw_rhod->nz,
10571051
this->pelec->eferm.get_efval(is),
10581052
&(GlobalC::ucell));
10591053
}

source/module_esolver/esolver_ks_pw.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,6 @@ void ESolver_KS_PW<T, Device>::before_scf(const int istep)
245245
PARAM.inp.nspin,
246246
istep,
247247
ss.str(),
248-
this->pw_rhod->nx,
249-
this->pw_rhod->ny,
250-
this->pw_rhod->nz,
251248
this->pelec->eferm.ef,
252249
&(GlobalC::ucell));
253250
}
@@ -266,9 +263,6 @@ void ESolver_KS_PW<T, Device>::before_scf(const int istep)
266263
PARAM.inp.nspin,
267264
istep,
268265
ss.str(),
269-
this->pw_rhod->nx,
270-
this->pw_rhod->ny,
271-
this->pw_rhod->nz,
272266
0.0, // efermi
273267
&(GlobalC::ucell),
274268
11, // precsion
@@ -474,9 +468,6 @@ void ESolver_KS_PW<T, Device>::iter_finish(int& iter)
474468
PARAM.inp.nspin,
475469
0,
476470
fn,
477-
this->pw_rhod->nx,
478-
this->pw_rhod->ny,
479-
this->pw_rhod->nz,
480471
this->pelec->eferm.get_efval(is),
481472
&(GlobalC::ucell),
482473
3,
@@ -490,9 +481,6 @@ void ESolver_KS_PW<T, Device>::iter_finish(int& iter)
490481
PARAM.inp.nspin,
491482
0,
492483
fn,
493-
this->pw_rhod->nx,
494-
this->pw_rhod->ny,
495-
this->pw_rhod->nz,
496484
this->pelec->eferm.get_efval(is),
497485
&(GlobalC::ucell));
498486
}

source/module_esolver/lcao_before_scf.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,6 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(const int istep)
233233
PARAM.inp.nspin,
234234
istep,
235235
ss.str(),
236-
this->pw_rhod->nx,
237-
this->pw_rhod->ny,
238-
this->pw_rhod->nz,
239236
this->pelec->eferm.ef,
240237
&(GlobalC::ucell));
241238
}
@@ -254,9 +251,6 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(const int istep)
254251
PARAM.inp.nspin,
255252
istep,
256253
ss.str(),
257-
this->pw_rhod->nx,
258-
this->pw_rhod->ny,
259-
this->pw_rhod->nz,
260254
0.0, // efermi
261255
&(GlobalC::ucell),
262256
11, // precsion
@@ -303,9 +297,6 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(const int istep)
303297
PARAM.inp.nspin,
304298
istep,
305299
fn,
306-
this->pw_rhod->nx,
307-
this->pw_rhod->ny,
308-
this->pw_rhod->nz,
309300
this->pelec->eferm.get_efval(is),
310301
&(GlobalC::ucell),
311302
3,

source/module_esolver/lcao_nscf.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,6 @@ void ESolver_KS_LCAO<TK, TR>::nscf() {
202202
PARAM.inp.nspin,
203203
0,
204204
fn,
205-
this->pw_rhod->nx,
206-
this->pw_rhod->ny,
207-
this->pw_rhod->nz,
208205
0.0, // efermi
209206
&(GlobalC::ucell),
210207
3, // precision

source/module_esolver/pw_nscf.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@ void ESolver_KS_PW<T, Device>::nscf() {
171171
PARAM.inp.nspin,
172172
0,
173173
fn,
174-
this->pw_rhod->nx,
175-
this->pw_rhod->ny,
176-
this->pw_rhod->nz,
177174
0.0, // efermi
178175
&(GlobalC::ucell),
179176
3, // precision

source/module_hamilt_pw/hamilt_pwdft/parallel_grid.h

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,25 @@ class Parallel_Grid
3232

3333
void reduce_to_fullrho(double* rhotot, const double* constrhoin)const;
3434
#endif
35-
36-
private:
3735

38-
void z_distribution(void);
39-
40-
int *nproc_in_pool = nullptr;
41-
int **numz = nullptr;
42-
int **startz = nullptr;
43-
int **whichpro = nullptr;
44-
45-
int ncx;
46-
int ncy;
47-
int ncz;
48-
int ncxy;
49-
int ncxyz;
36+
int ncx;
37+
int ncy;
38+
int ncz;
39+
int ncxy;
40+
int ncxyz;
5041
int nczp; // number of z-layers (xy-planes) in each processor
51-
int nrxx;
52-
int nbz;
53-
int bz;
42+
int nrxx;
43+
int nbz;
44+
int bz;
45+
46+
private:
47+
48+
void z_distribution(void);
49+
50+
int* nproc_in_pool = nullptr;
51+
int** numz = nullptr;
52+
int** startz = nullptr;
53+
int** whichpro = nullptr;
5454

5555
bool allocate = false;
5656
bool allocate_final_scf = false; //LiuXh add 20180619

source/module_io/cube_io.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ bool read_cube(
1111
const int my_rank,
1212
std::ofstream& ofs_running,
1313
const std::string& fn,
14-
double*const data,
15-
const int nx,
16-
const int ny,
17-
const int nz,
14+
double* const data,
1815
const int nat);
1916

2017
void write_cube(
@@ -24,9 +21,6 @@ void write_cube(
2421
const int nspin,
2522
const int iter,
2623
const std::string& fn,
27-
const int nx,
28-
const int ny,
29-
const int nz,
3024
const double ef,
3125
const UnitCell*const ucell,
3226
const int precision = 11,

source/module_io/get_pchg_lcao.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ void IState_Charge::begin(Gint_Gamma& gg,
136136
nspin,
137137
0,
138138
ssc.str(),
139-
rhopw_nx,
140-
rhopw_ny,
141-
rhopw_nz,
142139
ef_spin,
143140
ucell_in);
144141
}
@@ -265,9 +262,6 @@ void IState_Charge::begin(Gint_k& gk,
265262
nspin,
266263
0,
267264
ssc.str(),
268-
rhopw_nx,
269-
rhopw_ny,
270-
rhopw_nz,
271265
ef_spin,
272266
ucell_in);
273267
}
@@ -327,9 +321,6 @@ void IState_Charge::begin(Gint_k& gk,
327321
nspin,
328322
0,
329323
ssc.str(),
330-
rhopw_nx,
331-
rhopw_ny,
332-
rhopw_nz,
333324
ef_spin,
334325
ucell_in);
335326
}

0 commit comments

Comments
 (0)