@@ -28,8 +28,7 @@ namespace hsolver
2828
2929#ifdef USE_PAW
3030template <typename T, typename Device>
31- void HSolverPW<T, Device>::paw_func_in_kloop(const UnitCell& ucell,
32- const int ik)
31+ void HSolverPW<T, Device>::paw_func_in_kloop(const int ik)
3332{
3433 if (this ->use_paw )
3534 {
@@ -69,7 +68,7 @@ void HSolverPW<T, Device>::paw_func_in_kloop(const UnitCell& ucell,
6968 this ->wfc_basis ->get_ig2iy (ik).data (),
7069 this ->wfc_basis ->get_ig2iz (ik).data (),
7170 (const double **)kpg,
72- ucell.tpiba ,
71+ GlobalC:: ucell.tpiba ,
7372 (const double **)gcar);
7473
7574 std::vector<double >().swap (kpt);
@@ -97,7 +96,7 @@ void HSolverPW<T, Device>::call_paw_cell_set_currentk(const int ik)
9796}
9897
9998template <typename T, typename Device>
100- void HSolverPW<T, Device>::paw_func_after_kloop(const UnitCell& ucell, psi::Psi<T, Device>& psi, elecstate::ElecState* pes)
99+ void HSolverPW<T, Device>::paw_func_after_kloop(psi::Psi<T, Device>& psi, elecstate::ElecState* pes)
101100{
102101 if (this ->use_paw )
103102 {
@@ -145,7 +144,7 @@ void HSolverPW<T, Device>::paw_func_after_kloop(const UnitCell& ucell, psi::Psi<
145144 this ->wfc_basis ->get_ig2iy (ik).data (),
146145 this ->wfc_basis ->get_ig2iz (ik).data (),
147146 (const double **)kpg,
148- ucell.tpiba ,
147+ GlobalC:: ucell.tpiba ,
149148 (const double **)gcar);
150149
151150 std::vector<double >().swap (kpt);
@@ -178,7 +177,7 @@ void HSolverPW<T, Device>::paw_func_after_kloop(const UnitCell& ucell, psi::Psi<
178177 {
179178 GlobalC::paw_cell.get_rhoijp (rhoijp, rhoijselect, nrhoijsel);
180179
181- for (int iat = 0 ; iat < ucell.nat ; iat++)
180+ for (int iat = 0 ; iat < GlobalC:: ucell.nat ; iat++)
182181 {
183182 GlobalC::paw_cell.set_rhoij (iat,
184183 nrhoijsel[iat],
@@ -190,7 +189,7 @@ void HSolverPW<T, Device>::paw_func_after_kloop(const UnitCell& ucell, psi::Psi<
190189#else
191190 GlobalC::paw_cell.get_rhoijp (rhoijp, rhoijselect, nrhoijsel);
192191
193- for (int iat = 0 ; iat < ucell.nat ; iat++)
192+ for (int iat = 0 ; iat < GlobalC:: ucell.nat ; iat++)
194193 {
195194 GlobalC::paw_cell.set_rhoij (iat,
196195 nrhoijsel[iat],
@@ -253,7 +252,6 @@ template <typename T, typename Device>
253252void HSolverPW<T, Device>::solve(hamilt::Hamilt<T, Device>* pHamilt,
254253 psi::Psi<T, Device>& psi,
255254 elecstate::ElecState* pes,
256- const UnitCell& ucell,
257255 double * out_eigenvalues,
258256 const int rank_in_pool_in,
259257 const int nproc_in_pool_in,
@@ -284,7 +282,7 @@ void HSolverPW<T, Device>::solve(hamilt::Hamilt<T, Device>* pHamilt,
284282 pHamilt->updateHk (ik);
285283
286284#ifdef USE_PAW
287- this ->paw_func_in_kloop (ucell, ik);
285+ this ->paw_func_in_kloop (ik);
288286#endif
289287
290288 // / update psi pointer for each k point
@@ -343,7 +341,7 @@ void HSolverPW<T, Device>::solve(hamilt::Hamilt<T, Device>* pHamilt,
343341 reinterpret_cast <elecstate::ElecStatePW<T, Device>*>(pes)->psiToRho (psi);
344342
345343#ifdef USE_PAW
346- this ->paw_func_after_kloop (ucell, psi, pes);
344+ this ->paw_func_after_kloop (psi, pes);
347345#endif
348346
349347 ModuleBase::timer::tick (" HSolverPW" , " solve" );
0 commit comments