Skip to content

Commit 8fbdead

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent 377b9aa commit 8fbdead

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

source/module_lr/potentials/xc_kernel.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ void LR::KernelXC::f_xc_libxc(const int& nspin, const double& omega, const doubl
115115
#ifdef _OPENMP
116116
#pragma omp parallel for schedule(static, 1024)
117117
#endif
118-
for (int ir = 0; ir < nrxx; ++ir) rhor[ir] = rho[ir * nspin + is];
118+
for (int ir = 0; ir < nrxx; ++ir) { rhor[ir] = rho[ir * nspin + is];
119+
}
119120
gradrho[is].resize(nrxx);
120121
LR_Util::grad(rhor.data(), gradrho[is].data(), rho_basis_, tpiba);
121122
}
@@ -126,8 +127,9 @@ void LR::KernelXC::f_xc_libxc(const int& nspin, const double& omega, const doubl
126127
#ifdef _OPENMP
127128
#pragma omp parallel for schedule(static, 1024)
128129
#endif
129-
for (int ir = 0; ir < nrxx; ++ir)
130+
for (int ir = 0; ir < nrxx; ++ir) {
130131
sigma[ir] = gradrho[0][ir] * gradrho[0][ir];
132+
}
131133
}
132134
else
133135
{
@@ -224,9 +226,9 @@ void LR::KernelXC::f_xc_libxc(const int& nspin, const double& omega, const doubl
224226
+ " unfinished in " + std::string(__FILE__) + " line " + std::to_string(__LINE__));
225227
}
226228
}
227-
if (1 == PARAM.inp.nspin || 2 == PARAM.inp.nspin) return;
229+
if (1 == PARAM.inp.nspin || 2 == PARAM.inp.nspin) { return;
228230
// else if (4 == PARAM.inp.nspin)
229-
else//NSPIN != 1,2,4 is not supported
231+
} else//NSPIN != 1,2,4 is not supported
230232
{
231233
throw std::domain_error("PARAM.inp.nspin =" + std::to_string(PARAM.inp.nspin)
232234
+ " unfinished in " + std::string(__FILE__) + " line " + std::to_string(__LINE__));

0 commit comments

Comments
 (0)