Skip to content

Commit 4785da0

Browse files
committed
remove omp2
1 parent 32ee682 commit 4785da0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

source/module_psi/psi_initializer.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,9 @@ void psi_initializer<T>::random_t(T* psi, const int iw_start, const int iw_end,
8080
for (int ig = 0; ig < ng; ig++)
8181
{
8282
// get the correct value of "rr" and "arg" by indexing map "getigl2isz"
83-
const double rr = tmprr[this->pw_wfc_->getigl2isz(ik, ig)];
84-
const double arg = ModuleBase::TWO_PI * tmparg[this->pw_wfc_->getigl2isz(ik, ig)];
83+
const int isz = this->pw_wfc_->getigl2isz(ik, ig);
84+
const double rr = tmprr[isz];
85+
const double arg = ModuleBase::TWO_PI * tmparg[isz];
8586
// initialize the wavefunction value with rr * exp(i*arg)
8687
psi_slice[ig] = this->template cast_to_T<T>(std::complex<double>(rr * cos(arg), rr * sin(arg)));
8788
}
@@ -114,9 +115,6 @@ void psi_initializer<T>::random_t(T* psi, const int iw_start, const int iw_end,
114115
}
115116
if (npol == 2)
116117
{
117-
#ifdef _OPENMP
118-
#pragma omp parallel for schedule(static, 4096 / sizeof(T))
119-
#endif
120118
for (int ig = npwk_max; ig < npwk_max + ng; ig++)
121119
{
122120
const double rr = std::rand() / double(RAND_MAX);

0 commit comments

Comments
 (0)