Skip to content

Commit fadbcac

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent edfefb9 commit fadbcac

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

source/module_hamilt_general/module_xc/xc_functional_libxc_vxc.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,12 @@ std::tuple<double,double,ModuleBase::matrix> XC_Functional_Libxc::v_xc_libxc( /
112112

113113
// added by jghan, 2024-10-10
114114
double factor = 1.0;
115-
if( scaling_factor == nullptr ) ;
116-
else
115+
if( scaling_factor == nullptr ) { ;
116+
} else
117117
{
118118
auto pair_factor = scaling_factor->find(func.info->number);
119-
if( pair_factor != scaling_factor->end() ) factor = pair_factor->second;
119+
if( pair_factor != scaling_factor->end() ) { factor = pair_factor->second;
120+
}
120121
}
121122

122123
// time factor is added by jghan, 2024-10-10
@@ -251,10 +252,12 @@ std::tuple<double,double,ModuleBase::matrix,ModuleBase::matrix> XC_Functional_Li
251252
#endif
252253
for( int ir=0; ir<nrxx; ++ir )
253254
{
254-
if ( rho[ir*2]<rho_th || sqrt(std::abs(sigma[ir*3]))<grho_th || std::abs(kin_r[ir*2])<tau_th)
255+
if ( rho[ir*2]<rho_th || sqrt(std::abs(sigma[ir*3]))<grho_th || std::abs(kin_r[ir*2])<tau_th) {
255256
sgn[ir*2] = 0.0;
256-
if ( rho[ir*2+1]<rho_th || sqrt(std::abs(sigma[ir*3+2]))<grho_th || std::abs(kin_r[ir*2+1])<tau_th)
257+
}
258+
if ( rho[ir*2+1]<rho_th || sqrt(std::abs(sigma[ir*3+2]))<grho_th || std::abs(kin_r[ir*2+1])<tau_th) {
257259
sgn[ir*2+1] = 0.0;
260+
}
258261
}
259262
}
260263

0 commit comments

Comments
 (0)