Skip to content

Commit

Permalink
expand the for-loop
Browse files Browse the repository at this point in the history
  • Loading branch information
maki49 committed Dec 3, 2024
1 parent f4e5635 commit db170d4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions source/module_lr/potentials/xc_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,20 @@ void LR::KernelXC::f_xc_libxc(const int& nspin, const double& omega, const doubl
#ifdef _OPENMP
#pragma omp parallel for schedule(static, 4096)
#endif
for (size_t i = 0; i < nrxx; ++i) { this->v2rhosigma_2drho_[i] = gradrho[0][i] * v2rs[i] * 2.; }
for (size_t i = 0; i < nrxx; ++i)
{
this->v2rhosigma_2drho_[i] = gradrho[0][i] * v2rs[i] * 2.;
}

// 2. $4f^{\sigma\sigma}*\nabla\rho$
this->v2sigma2_4drho_.resize(nrxx);
#ifdef _OPENMP
#pragma omp parallel for schedule(static, 4096)
#endif
for (size_t i = 0; i < nrxx; ++i) { this->v2sigma2_4drho_[i] = gradrho[0][i] * v2s2[i] * 4.; }
for (size_t i = 0; i < nrxx; ++i)
{
this->v2sigma2_4drho_[i] = gradrho[0][i] * v2s2[i] * 4.;
}
}
else
{
Expand Down

0 comments on commit db170d4

Please sign in to comment.