You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* replace C++17 code with C++11 code
* Phase 2: Change reference to value copy and add member variables for exx_info removal
Change Exx_LRI and RPA_LRI's info_ri from const reference to value copy to eliminate lifetime dependencies on GlobalC::exx_info. Add abfs_Lmax_ member to Exx_LRI, hybrid_step_ member to Exx_LRI_interface, and p_info_ri pointer to LRI_CV for subsequent phases. All changes are backward-compatible.
* Phase 3: Switch abfs_Lmax write from global to member with dual-write
Change abfs_Lmax writing in Exx_LRI::init() and init_spencer() to write to member variable abfs_Lmax_ first, then sync to GlobalC::exx_info (dual-write) for backward compatibility.
* Phase 4: Set info_ri pointer for LRI_CV and fix exx_rotate_abfs read
Call cv.set_info_ri(&this->info) after cv.set_orbitals() in both Exx_LRI::init() and init_spencer(). Change LRI_CV::Cs_inv_thr reads to dual-read (pointer first, global fallback). Fix exx_rotate_abfs to read rotate_abfs from member reference instead of GlobalC.
* Phase 5: Replace info_ri reads from GlobalC to member access
Change 5 shrink_abfs_pca_thr reads in RPA_LRI and 2 exx_symmetry_realspace reads in Exx_LRI_interface from GlobalC::exx_info.info_ri to this->info or this->exx_ptr->info.
* Phase 6: Eliminate abfs_Lmax global dependency in ewald_Vq
Add abfs_Lmax parameter to Ewald_Vq::init(), store as member, and use in init_ions(). Pass abfs_Lmax_ from Exx_LRI to Ewald_Vq. Update RPA_LRI to read from exx_cut_coulomb->abfs_Lmax(). Remove dual-write to GlobalC for abfs_Lmax.
* Phase 7: Replace ccp_rmesh_times global tampering with local copy
Replace 3 places in RPA_LRI that tamper with GlobalC::exx_info.info_ri.ccp_rmesh_times: use local Exx_Info_RI copy instead. This eliminates the dangerous 'save-modify-use-restore' pattern.
* Phase 8: Cache info_global in Exx_LRI_Interface constructor
Add Exx_Info_Global as constructor parameter and store as member. Replace all 18 GlobalC::exx_info.info_global reads with this->info_global. Change hybrid_step write from global to member variable.
* Phase 9: Remove info_global writes and sync_from_global in RPA_LRI
Remove 3 lines that write ccp_type/hybrid_alpha to GlobalC and call sync_from_global(). This->info already has correct coulomb_param from construction. Also replace shrink_LU_inv_thr read with this->info.
* Phase 10: Final cleanup - remove GlobalC::exx_info references and includes
Delete global static object exx_lri_rpa in RPA_LRI.h. Update exx_rotate_abfs.h comment. Clean up includes in LRI_CV.hpp, exx_lip.hpp, and Exx_LRI_interface.hpp. Remove GlobalC::exx_info fallback in LRI_CV. After this phase, GlobalC::exx_info is no longer used in module_ri.
* update the code
* Fix: HSE energy deviation caused by stale info_global cache in Exx_LRI_Interface
* fix bug because hybrid_step_ 在构造函数中没有从 info_global.hybrid_step 初始
* fix bug: abfs_Lmax degrades to 0 in the RPA + symmetry path. it is not a expected behavior
---------
Co-authored-by: abacus_fixer <mohanchen@pku.eud.cn>
@@ -241,10 +240,10 @@ void Exx_LRI_Interface<T, Tdata>::exx_hamilt2rho(elecstate::ElecState& elec, con
241
240
{ std::cout << "WARNING: Cannot read Eexx from disk, the energy of the 1st loop will be wrong, sbut it does not influence the subsequent loops." << std::endl; }
0 commit comments