Skip to content

Commit b454fa1

Browse files
committed
fix compile
1 parent f48d076 commit b454fa1

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

source/module_psi/psi_initializer_atomic_random.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void psi_initializer_atomic_random<T>::init_psig(T* psig, const int& ik)
2828
{
2929
for (int ibasis = 0; ibasis < nbasis; ibasis++)
3030
{
31-
psig[iband * nbasis + ibasis] *= (1.0 + Real(rm) * psi_random(iband, ibasis));
31+
psig[iband * nbasis + ibasis] *= (T(1.0) + Real(rm) * psi_random(iband, ibasis));
3232
}
3333
}
3434
}

source/module_psi/psi_initializer_nao_random.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ void psi_initializer_nao_random<T>::init_psig(T* psig, const int& ik)
2323
const int nbasis = this->pw_wfc_->npwk_max * npol;
2424
psi::Psi<T> psi_random(1, this->nbands_start_, nbasis, nullptr);
2525
psi_random.fix_k(0);
26-
this->random_t(psi_random.get_pointer(), 0, this->nbands_start_, ik);
26+
this->random_t(psi_random.get_pointer(), 0, this->nbands_start_, ik, 0);
2727
for (int iband = 0; iband < this->nbands_start_; iband++)
2828
{
2929
for (int ibasis = 0; ibasis < nbasis; ibasis++)
3030
{
31-
psig[iband * nbasis + ibasis] *= ((Real)(1 + rm)) * psi_random(iband, ibasis);
31+
psig[iband * nbasis + ibasis] *= (T(1.0) + Real(rm) * psi_random(iband, ibasis));
3232
}
3333
}
3434
}

0 commit comments

Comments
 (0)