diff --git a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.hpp b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.hpp index db8b32a13a..57ed48c7e7 100644 --- a/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.hpp +++ b/source/module_hamilt_lcao/hamilt_lcaodft/LCAO_hamilt.hpp @@ -23,30 +23,35 @@ // Peize Lin add 2022.09.13 template -void LCAO_Hamilt::calculate_HR_exx_sparse( +void LCAO_Hamilt::cal_HR_exx_sparse( const int ¤t_spin, const double &sparse_threshold, const int (&nmp)[3], const std::vector< std::map>, RI::Tensor>>>& Hexxs) { - ModuleBase::TITLE("LCAO_Hamilt","calculate_HR_exx_sparse"); - ModuleBase::timer::tick("LCAO_Hamilt","calculate_HR_exx_sparse"); + ModuleBase::TITLE("LCAO_Hamilt","cal_HR_exx_sparse"); + ModuleBase::timer::tick("LCAO_Hamilt","cal_HR_exx_sparse"); const Tdata frac = GlobalC::exx_info.info_global.hybrid_alpha; std::map> atoms_pos; for(int iat=0; iat,3> latvec = {RI_Util::Vector3_to_array3(GlobalC::ucell.a1), RI_Util::Vector3_to_array3(GlobalC::ucell.a2), RI_Util::Vector3_to_array3(GlobalC::ucell.a3)}; + const std::array Rs_period = {nmp[0], nmp[1], nmp[2]}; RI::Cell_Nearest cell_nearest; cell_nearest.init(atoms_pos, latvec, Rs_period); const std::vector is_list = (GlobalV::NSPIN!=4) ? std::vector{current_spin} : std::vector{0,1,2,3}; + for(const int is : is_list) { int is0_b, is1_b; @@ -102,7 +107,7 @@ void LCAO_Hamilt::calculate_HR_exx_sparse( } } - ModuleBase::timer::tick("LCAO_Hamilt","calculate_HR_exx_sparse"); + ModuleBase::timer::tick("LCAO_Hamilt","cal_HR_exx_sparse"); } #endif