Skip to content

Commit f73db98

Browse files
authored
Fix: SOC calculation in PW code would caused nan (#1212)
1 parent 85341c3 commit f73db98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/module_hsolver/hsolver_pw.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ void HSolverPW::hamiltSolvePsiK(hamilt::Hamilt* hm, psi::Psi<std::complex<double
158158

159159
void HSolverPW::update_precondition(std::vector<double> &h_diag, const int ik, const int npw)
160160
{
161-
h_diag.resize(h_diag.size(), 1.0);
161+
h_diag.assign(h_diag.size(), 1.0);
162162
int precondition_type = 2;
163163
const double tpiba2 = this->wfc_basis->tpiba2;
164164

0 commit comments

Comments
 (0)