Skip to content

Commit c55e20d

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent bfdfc92 commit c55e20d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

source/module_hsolver/diago_iter_assist.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ void DiagoIterAssist<T, Device>::diagH_subspace_init(hamilt::Hamilt<T, Device>*
213213
{
214214
// psi_temp is one band psi, psi is all bands psi, the range always is 1 for the only band in psi_temp
215215
syncmem_complex_op()(ctx, ctx, ppsi, psi + i * psi_nc, psi_nc);
216-
psi::Range band_by_band_range(1, 0, 0, 0);
216+
psi::Range band_by_band_range(true, 0, 0, 0);
217217
hpsi_info hpsi_in(&psi_temp, band_by_band_range, hpsi);
218218

219219
// H|Psi> to get hpsi for target band
@@ -258,7 +258,7 @@ void DiagoIterAssist<T, Device>::diagH_subspace_init(hamilt::Hamilt<T, Device>*
258258

259259
T* hpsi = temp;
260260
// do hPsi for all bands
261-
psi::Range all_bands_range(1, 0, 0, nstart - 1);
261+
psi::Range all_bands_range(true, 0, 0, nstart - 1);
262262
hpsi_info hpsi_in(&psi_temp, all_bands_range, hpsi);
263263
pHamilt->ops->hPsi(hpsi_in);
264264

@@ -588,8 +588,9 @@ bool DiagoIterAssist<T, Device>::test_exit_cond(const int& ntry, const int& notc
588588
//================================================================
589589

590590
bool scf = true;
591-
if (PARAM.inp.calculation == "nscf")
591+
if (PARAM.inp.calculation == "nscf") {
592592
scf = false;
593+
}
593594

594595
// If ntry <=5, try to do it better, if ntry > 5, exit.
595596
const bool f1 = (ntry <= 5);

0 commit comments

Comments
 (0)