Skip to content

Commit 45e5165

Browse files
committed
fix pchg with c^* c^T
1 parent acf177d commit 45e5165

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

source/source_estate/module_dm/cal_dm_psi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ void psiMulPsiMpi(const psi::Psi<std::complex<double>>& psi1,
192192
const int* desc_psi,
193193
const int* desc_dm)
194194
{
195-
ModuleBase::timer::start("psiMulPsiMpi", "pdgemm");
195+
ModuleBase::timer::start("psiMulPsiMpi", "pzgemm");
196196
const std::complex<double> one_complex = {1.0, 0.0}, zero_complex = {0.0, 0.0};
197197
const int one_int = 1;
198198
const char N_char = 'N', T_char = 'T';
@@ -217,7 +217,7 @@ void psiMulPsiMpi(const psi::Psi<std::complex<double>>& psi1,
217217
one_int,
218218
one_int,
219219
desc_dm);
220-
ModuleBase::timer::end("psiMulPsiMpi", "pdgemm");
220+
ModuleBase::timer::end("psiMulPsiMpi", "pzgemm");
221221
}
222222

223223
#endif

source/source_io/module_chgpot/get_pchg_lcao.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,11 @@ void Get_pchg_lcao::idmatrix(const int& ib,
436436
this->psi_k->get_nbasis(),
437437
true);
438438
wg_wfc.set_all_psi(this->psi_k->get_pointer(), wg_wfc.size());
439+
std::complex<double>* wg_wfc_ptr = wg_wfc.get_pointer();
440+
for (int i = 0; i < wg_wfc.size(); ++i)
441+
{
442+
wg_wfc_ptr[i] = std::conj(wg_wfc_ptr[i]);
443+
}
439444

440445
for (int ir = 0; ir < wg_wfc.get_nbands(); ++ir)
441446
{

0 commit comments

Comments
 (0)