Skip to content

Commit

Permalink
fix: init exd/exc in begin_all_runners rather than beforescf
Browse files Browse the repository at this point in the history
  • Loading branch information
maki49 committed Jul 13, 2024
1 parent 796c911 commit 4193864
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions source/module_esolver/esolver_ks_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,13 @@ void ESolver_KS_LCAO<TK, TR>::before_all_runners(Input& inp, UnitCell& ucell)
{
this->exx_lri_double = std::make_shared<Exx_LRI<double>>(GlobalC::exx_info.info_ri);
this->exx_lri_double->init(MPI_COMM_WORLD, this->kv);
this->exd = std::make_shared<Exx_LRI_Interface<TK, double>>(exx_lri_double);
}
else
{
this->exx_lri_complex = std::make_shared<Exx_LRI<std::complex<double>>>(GlobalC::exx_info.info_ri);
this->exx_lri_complex->init(MPI_COMM_WORLD, this->kv);
this->exc = std::make_shared<Exx_LRI_Interface<TK, std::complex<double>>>(exx_lri_complex);
}
}
}
Expand Down
2 changes: 0 additions & 2 deletions source/module_esolver/esolver_ks_lcao_elec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,12 +284,10 @@ void ESolver_KS_LCAO<TK, TR>::before_scf(const int istep)
#ifdef __EXX // set xc type before the first cal of xc in pelec->init_scf
if (GlobalC::exx_info.info_ri.real_number)
{
this->exd = std::make_shared<Exx_LRI_Interface<TK, double>>(exx_lri_double);
this->exd->exx_beforescf(this->kv, *this->p_chgmix);
}
else
{
this->exc = std::make_shared<Exx_LRI_Interface<TK, std::complex<double>>>(exx_lri_complex);
this->exc->exx_beforescf(this->kv, *this->p_chgmix);
}
#endif // __EXX
Expand Down

0 comments on commit 4193864

Please sign in to comment.