Skip to content

Commit 0996eb1

Browse files
authored
Fix : the tau_th judgement in v_xc_meta (#1532)
1 parent a6864fd commit 0996eb1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/module_xc/xc_functional_vxc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ tuple<double,double,ModuleBase::matrix,ModuleBase::matrix> XC_Functional::v_xc_m
511511
{
512512
for( size_t ir=0; ir!=nrxx; ++ir )
513513
{
514-
if ( rho[ir]<rho_th || sqrt(abs(sigma[ir]))<grho_th || abs(kin_r[ir]<tau_th))
514+
if ( rho[ir]<rho_th || sqrt(abs(sigma[ir]))<grho_th || abs(kin_r[ir])<tau_th)
515515
{
516516
sgn[ir] = 0.0;
517517
}
@@ -521,9 +521,9 @@ tuple<double,double,ModuleBase::matrix,ModuleBase::matrix> XC_Functional::v_xc_m
521521
{
522522
for( size_t ir=0; ir!=nrxx; ++ir )
523523
{
524-
if ( rho[ir*2]<rho_th || sqrt(abs(sigma[ir*3]))<grho_th || abs(kin_r[ir*2]<tau_th))
524+
if ( rho[ir*2]<rho_th || sqrt(abs(sigma[ir*3]))<grho_th || abs(kin_r[ir*2])<tau_th)
525525
sgn[ir*2] = 0.0;
526-
if ( rho[ir*2+1]<rho_th || sqrt(abs(sigma[ir*3+2]))<grho_th || abs(kin_r[ir*2+1]<tau_th))
526+
if ( rho[ir*2+1]<rho_th || sqrt(abs(sigma[ir*3+2]))<grho_th || abs(kin_r[ir*2+1])<tau_th)
527527
sgn[ir*2+1] = 0.0;
528528
}
529529
}
@@ -650,4 +650,4 @@ tuple<double,double,ModuleBase::matrix,ModuleBase::matrix> XC_Functional::v_xc_m
650650

651651
}
652652

653-
#endif //ifdef USE_LIBXC
653+
#endif //ifdef USE_LIBXC

0 commit comments

Comments
 (0)