Skip to content

Commit 9381f8c

Browse files
Refactor
1 parent 2188e72 commit 9381f8c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

source/source_esolver/esolver_ks_pw.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,13 +589,17 @@ void ESolver_KS_PW<T, Device>::iter_finish(UnitCell& ucell, const int istep, int
589589
auto start = std::chrono::high_resolution_clock::now();
590590
exx_helper.set_firstiter(false);
591591
exx_helper.op_exx->first_iter = false;
592+
double dexx = 0.0;
592593
if (PARAM.inp.exx_thr_type == "energy")
593594
{
594-
double dexx = exx_helper.cal_exx_energy(this->kspw_psi);
595+
dexx = exx_helper.cal_exx_energy(this->kspw_psi);
596+
}
595597
exx_helper.set_psi(this->kspw_psi);
598+
if (PARAM.inp.exx_thr_type == "energy")
599+
{
596600
dexx -= exx_helper.cal_exx_energy(this->kspw_psi);
597601
conv_esolver = std::abs(dexx) < PARAM.inp.exx_ene_thr || exx_helper.exx_after_converge(iter);
598-
std::cout << "dexx = " << dexx << std::endl;
602+
// std::cout << "dexx = " << dexx << std::endl;
599603
}
600604
else if (PARAM.inp.exx_thr_type == "density")
601605
{

0 commit comments

Comments
 (0)