Skip to content

Commit

Permalink
Fix : the tau_th judgement in v_xc_meta (#1532)
Browse files Browse the repository at this point in the history
  • Loading branch information
wenfei-li authored Nov 18, 2022
1 parent a6864fd commit 0996eb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/module_xc/xc_functional_vxc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ tuple<double,double,ModuleBase::matrix,ModuleBase::matrix> XC_Functional::v_xc_m
{
for( size_t ir=0; ir!=nrxx; ++ir )
{
if ( rho[ir]<rho_th || sqrt(abs(sigma[ir]))<grho_th || abs(kin_r[ir]<tau_th))
if ( rho[ir]<rho_th || sqrt(abs(sigma[ir]))<grho_th || abs(kin_r[ir])<tau_th)
{
sgn[ir] = 0.0;
}
Expand All @@ -521,9 +521,9 @@ tuple<double,double,ModuleBase::matrix,ModuleBase::matrix> XC_Functional::v_xc_m
{
for( size_t ir=0; ir!=nrxx; ++ir )
{
if ( rho[ir*2]<rho_th || sqrt(abs(sigma[ir*3]))<grho_th || abs(kin_r[ir*2]<tau_th))
if ( rho[ir*2]<rho_th || sqrt(abs(sigma[ir*3]))<grho_th || abs(kin_r[ir*2])<tau_th)
sgn[ir*2] = 0.0;
if ( rho[ir*2+1]<rho_th || sqrt(abs(sigma[ir*3+2]))<grho_th || abs(kin_r[ir*2+1]<tau_th))
if ( rho[ir*2+1]<rho_th || sqrt(abs(sigma[ir*3+2]))<grho_th || abs(kin_r[ir*2+1])<tau_th)
sgn[ir*2+1] = 0.0;
}
}
Expand Down Expand Up @@ -650,4 +650,4 @@ tuple<double,double,ModuleBase::matrix,ModuleBase::matrix> XC_Functional::v_xc_m

}

#endif //ifdef USE_LIBXC
#endif //ifdef USE_LIBXC

0 comments on commit 0996eb1

Please sign in to comment.