Skip to content

Commit 19533b8

Browse files
committed
fix bug
1 parent 2e8cbdc commit 19533b8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/module_hsolver/hsolver_pw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ void HSolverPW<T, Device>::solve(hamilt::Hamilt<T, Device>* pHamilt,
279279
// prepare for the precondition of diagonalization
280280
std::vector<Real> precondition(psi.get_nbasis(), 0.0);
281281
std::vector<Real> eigenvalues(this->wfc_basis->nks * psi.get_nbands(), 0.0);
282-
ethr_band.resize(psi.get_nbands(), DiagoIterAssist<T, Device>::PW_DIAG_THR);
282+
ethr_band.resize(psi.get_nbands(), this->diag_thr);
283283

284284
/// Loop over k points for solve Hamiltonian to charge density
285285
for (int ik = 0; ik < this->wfc_basis->nks; ++ik)

source/module_hsolver/hsolver_pw_sdft.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void HSolverPW_SDFT<T, Device>::solve(const UnitCell& ucell,
3232
// prepare for the precondition of diagonalization
3333
std::vector<double> precondition(psi.get_nbasis(), 0.0);
3434

35-
this->ethr_band.resize(psi.get_nbands(), DiagoIterAssist<T, Device>::PW_DIAG_THR);
35+
this->ethr_band.resize(psi.get_nbands(), this->diag_thr);
3636

3737
// report if the specified diagonalization method is not supported
3838
const std::initializer_list<std::string> _methods = {"cg", "dav", "dav_subspace", "bpcg"};

0 commit comments

Comments
 (0)