Remove GlobalC::exx_info in module_ri#7631
Open
mohanchen wants to merge 11 commits into
Open
Conversation
added 10 commits
July 13, 2026 22:11
…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.
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.
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.
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.
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.
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.
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.
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.
…ludes 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove GlobalC::exx_info in module_ri