Skip to content

Commit 151d87e

Browse files
committed
fix error introduced by esolver_ks's psi, which should be esolver_ks_pw's new psi (stp.psi)
1 parent 6833fe1 commit 151d87e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/source_esolver/esolver_sdft_pw.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ void ESolver_SDFT_PW<T, Device>::hamilt2rho_single(UnitCell& ucell, int istep, i
177177
hsolver_pw_sdft_obj.solve(ucell,
178178
this->p_hamilt,
179179
this->stp.psi_t[0],
180-
this->psi[0],
180+
this->stp.psi_cpu[0],
181181
this->pelec,
182182
this->pw_wfc,
183183
this->stowf,
@@ -279,7 +279,7 @@ void ESolver_SDFT_PW<T, Device>::after_all_runners(UnitCell& ucell)
279279
this->pw_wfc,
280280
&this->kv,
281281
this->pelec,
282-
reinterpret_cast<psi::Psi<std::complex<double>>*>(this->psi),
282+
reinterpret_cast<psi::Psi<std::complex<double>>*>(this->stp.psi_cpu),
283283
reinterpret_cast<hamilt::Hamilt<std::complex<double>>*>(this->p_hamilt),
284284
this->stoche,
285285
reinterpret_cast<Stochastic_WF<std::complex<double>, base_device::DEVICE_CPU>*>(&stowf));

0 commit comments

Comments
 (0)