Skip to content

Commit be7ba1a

Browse files
authored
Fix: fix bug caused by out_hs2_interval (#2005)
* Fix: fix bug caused by out_hs2_interval * Fix: fix bug due to out_hs2_interval
1 parent 1cab52c commit be7ba1a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

source/module_esolver/esolver_ks_lcao.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -997,23 +997,23 @@ void ESolver_KS_LCAO::afterscf(const int istep)
997997
#endif
998998
if (hsolver::HSolverLCAO::out_mat_hsR)
999999
{
1000-
if( !(GlobalV::CALCULATION=="md" && (istep%hsolver::HSolverLCAO::out_hsR_interval!=0)) )
1000+
if( GlobalV::CALCULATION != "md" || (istep % hsolver::HSolverLCAO::out_hsR_interval == 0))
10011001
{
10021002
ModuleIO::output_HS_R(istep, this->pelec->pot->get_effective_v(), this->UHM); // LiuXh add 2019-07-15
10031003
} // LiuXh add 2019-07-15
10041004
}
10051005

10061006
if (hsolver::HSolverLCAO::out_mat_t)
10071007
{
1008-
if( !(GlobalV::CALCULATION=="md" && (istep%hsolver::HSolverLCAO::out_hsR_interval!=0)) )
1008+
if( GlobalV::CALCULATION != "md" || (istep % hsolver::HSolverLCAO::out_hsR_interval == 0))
10091009
{
10101010
ModuleIO::output_T_R(istep, this->UHM); // LiuXh add 2019-07-15
10111011
} // LiuXh add 2019-07-15
10121012
}
10131013

10141014
if (hsolver::HSolverLCAO::out_mat_dh)
10151015
{
1016-
if( !(GlobalV::CALCULATION=="md" && (istep%hsolver::HSolverLCAO::out_hsR_interval!=0)) )
1016+
if( GlobalV::CALCULATION != "md" || (istep % hsolver::HSolverLCAO::out_hsR_interval == 0))
10171017
{
10181018
ModuleIO::output_dH_R(istep, this->pelec->pot->get_effective_v(), this->UHM); // LiuXh add 2019-07-15
10191019
} // LiuXh add 2019-07-15

source/module_esolver/esolver_ks_lcao_tddft.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,23 +417,23 @@ void ESolver_KS_LCAO_TDDFT::afterscf(const int istep)
417417

418418
if (hsolver::HSolverLCAO::out_mat_hsR)
419419
{
420-
if (!(GlobalV::CALCULATION == "md" && (istep % hsolver::HSolverLCAO::out_hsR_interval != 0)))
420+
if( GlobalV::CALCULATION != "md" || (istep % hsolver::HSolverLCAO::out_hsR_interval == 0))
421421
{
422422
ModuleIO::output_HS_R(istep, this->pelec->pot->get_effective_v(), this->UHM); // LiuXh add 2019-07-15
423423
}
424424
}
425425

426426
if (hsolver::HSolverLCAO::out_mat_t)
427427
{
428-
if (!(GlobalV::CALCULATION == "md" && (istep % hsolver::HSolverLCAO::out_hsR_interval != 0)))
428+
if( GlobalV::CALCULATION != "md" || (istep % hsolver::HSolverLCAO::out_hsR_interval == 0))
429429
{
430430
ModuleIO::output_T_R(istep, this->UHM); // LiuXh add 2019-07-15
431431
}
432432
}
433433

434434
if (hsolver::HSolverLCAO::out_mat_dh)
435435
{
436-
if (!(GlobalV::CALCULATION == "md" && (istep % hsolver::HSolverLCAO::out_hsR_interval != 0)))
436+
if( GlobalV::CALCULATION != "md" || (istep % hsolver::HSolverLCAO::out_hsR_interval == 0))
437437
{
438438
ModuleIO::output_dH_R(istep, this->pelec->pot->get_effective_v(), this->UHM); // LiuXh add 2019-07-15
439439
}

0 commit comments

Comments
 (0)