Skip to content

Commit 07eda90

Browse files
committed
fix sdft bug
1 parent 4dc37b6 commit 07eda90

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

source/module_hsolver/hsolver_pw_sdft.cpp

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,33 +29,11 @@ void HSolverPW_SDFT<T, Device>::solve(const UnitCell& ucell,
2929
const int nbands = psi.get_nbands();
3030
const int nks = psi.get_nk();
3131

32-
//---------------------------------------------------------------------------------------------------------------
33-
//---------------------------------for psi init guess!!!!--------------------------------------------------------
34-
//---------------------------------------------------------------------------------------------------------------
35-
// if (!PARAM.inp.psi_initializer && !this->initialed_psi && this->basis_type == "pw")
36-
// {
37-
// for (int ik = 0; ik < nks; ++ik)
38-
// {
39-
// /// update H(k) for each k point
40-
// pHamilt->updateHk(ik);
41-
42-
// if (nbands > 0 && GlobalV::MY_STOGROUP == 0)
43-
// {
44-
// /// update psi pointer for each k point
45-
// psi.fix_k(ik);
46-
47-
// /// for psi init guess!!!!
48-
// hamilt::diago_PAO_in_pw_k2(this->ctx, ik, psi, this->wfc_basis, this->pwf, pHamilt);
49-
// }
50-
// }
51-
// }
52-
//---------------------------------------------------------------------------------------------------------------
53-
//---------------------------------------------------------------------------------------------------------------
54-
//---------------------------------------------------------------------------------------------------------------
55-
5632
// prepare for the precondition of diagonalization
5733
std::vector<double> precondition(psi.get_nbasis(), 0.0);
5834

35+
this->ethr_band.resize(psi.get_nbands(), DiagoIterAssist<T, Device>::PW_DIAG_THR);
36+
5937
// report if the specified diagonalization method is not supported
6038
const std::initializer_list<std::string> _methods = {"cg", "dav", "dav_subspace", "bpcg"};
6139
if (std::find(std::begin(_methods), std::end(_methods), this->method) == std::end(_methods))

0 commit comments

Comments
 (0)