forked from abacusmodeling/abacus-develop
-
Notifications
You must be signed in to change notification settings - Fork 249
Refactor charge density module (Useful Information for Refactoring a Module) #7972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 84 commits
Commits
Show all changes
111 commits
Select commit
Hold shift + click to select a range
83eb5d0
module_charge: normalize indentation and brace single-statement contr…
aa9e515
module_charge: aggregate Charge_Mixing params into MixingConfig
589e65f
module_charge: deduplicate twobeta_mix lambdas and replace raw new wi…
8246456
module_charge: move residual/inner-product globals into MixingConfig
ecf5084
module_charge: own Charge's _space_* storage with std::vector (Step 5a)
25bd441
module_charge: route chgmixing_ks through its inp parameter
1e9411c
module_charge: split Charge::init_rho into per-stage private methods
c4a8ed2
module_charge: extract Charge density math into charge_math free func…
e074dd0
module_charge: register charge_math.o in the hand-written Makefile build
aab8b0e
Merge branch 'develop' into 20260916
mohanchen 7b346dc
module_charge: extract Charge::atomic_rho into charge_atomic free fun…
0c7109d
module_charge: forbid Charge copies and guard tau.cube write
871f8f2
module_base: tolerate null grid buffer when a rank owns no grid points
1d3beac
module_charge: extract Charge::set_rho_core into charge_math free fun…
49b0a65
module_charge: vectorize Charge_Extra history arrays and forbid copies
e0480f3
Rename charge_math to chg_tools and unify namespace module_charge
5154f98
module_charge: refactor Symmetry_rho class to free functions
dfbf99d
module_charge: extract MixingConfig header and drop unused inner_prod…
619029d
module_gint: move gint_prec_ctrl from module_charge
2ac0017
module_charge: extract mixing inner products into chg_drho free funct…
61c2529
module_charge: hide cal_drho/cal_dkin in an anonymous namespace
dfe1dac
module_gint: fix include path in test_gint_prec_ctrl after relocation
6d127d5
module_charge: extract Kerker screen kernels into chg_precond free fu…
e4e6fc9
module_charge: fix Makefile.Objects after mix_precond -> chg_precond …
9a96847
module_charge: drop Charge_Mixing::get_drho/get_dkin wrappers
c89aba3
module_charge: rename chgmixing.h/cpp to chg_routine.h/cpp
ae65748
module_charge: rename mixing_config.h to chg_mix_cfg.h
c531ea4
module_charge: convert Charge MPI helpers into chg_parallel free func…
b976259
Rename charge_atomic files to chg_atomic
2f49955
module_charge: extract USPP double-grid split/merge into chg_uspp fre…
4650306
module_charge: rewrite MixDivCombTest for the new split_dgrid/merge_d…
2670f86
module_charge: drop legacy divide_data/combine_data/clean_data members
e4f111f
module_charge: rename charge_extra files to chg_extra and move class …
570dd49
module_charge: extract DMR mixing into chg_dmr free functions
86b4f54
module_charge: remove Charge_Mixing DMR wrappers, call chg_dmr directly
6d174ff
module_charge: decouple chg_dmr kernel from HContainer, mix raw buffers
d9685d4
module_charge: refactor charge_mixing_rho free functions and cleanup
36da8fd
module_charge: split member functions into charge_mixing.cpp, free fu…
426c572
module_charge: rename charge_{init,mixing_rho} to chg_{init,tau}, wid…
1663581
module_charge: rename charge_mixing.{h,cpp} to chg_mix.{h,cpp}, test …
3540a2b
module_charge: remove duplicate doc block comments (Phase 1a)
da75e2e
module_charge: replace auto with explicit std::function types (Phase 1b)
9038abd
module_charge: wrap lines over 120 chars (Phase 1c)
a770ca7
module_charge: remove default parameter from Charge::init_rho (Phase 1d)
0dc34cf
module_charge: replace raw new/delete with std::vector and unique_ptr…
962b0b3
module_charge: replace raw new/delete in Charge with vector-backed st…
03e3e5e
module_charge: replace std::make_unique with C++11-compatible unique_…
fd38f2c
module_charge: fix duplicate doc block in charge.cpp init_final_scf
73eee04
module_charge: aggregate chgmixing_ks parameters into ScfMixingCtx st…
b8cb59d
module_charge: aggregate read_rho_file/read_kin_file parameters into …
b96b143
module_charge: aggregate non_linear_core_correction parameters into N…
48866d9
module_charge: split chg_mix.cpp into init and rho mixing files (Phas…
23f12da
module_charge: split chg_drho.cpp and decompose inner product functio…
872f6d1
refactor(module_charge): split atomic_rho and remove ZEROS in charge …
2411e80
Refactor: remove redundant Charge& overload of cal_rhog_symm_soc
0b8dfbe
module_charge: fix stale TITLE/timer labels and drop unused xc_functi…
7a00138
module_charge: remove redundant #ifdef __MPI guards around parallel w…
a669eea
module_charge: decouple chg_routine from spin_constrain singleton
c9ba84b
module_charge: remove PARAM dependencies via explicit configuration s…
2d3592a
Merge branch 'develop' into 20260916
mohanchen 4dcbd1c
module_charge: restore #ifdef __MPI guards around parallel wrapper calls
65252c4
Remove dead PAW compensation charge members
6a67c09
Refactor: remove unused Charge::prenspin member
f489a13
Refactor: move Charge::cal_rho2ne/check_rho to module_charge free fun…
34b441e
Refactor: remove redundant Charge::omega_ pointer
07ebcc1
Remove dead Charge::init_final_scf and allocate_rho_final_scf
1e492e5
Refactor: pass rhopw explicitly to chg_init/chg_routine/chg_extra/chg…
58c7fe4
Comments: add TODOs for LCAO+USPP double-grid follow-ups
a1fc87f
Refactor: replace sticky Charge::cal_elf flag with explicit symm_kin …
87b818f
Refactor: resolve mixing_tau at config assembly, drop XC dependency f…
ee70805
Fix: restore complete types in chg_drho_inner.cpp after include removal
dbf9d50
Refactor: derive tau symmetrization/reduction from kin_r buffer exist…
ecf8418
Refactor: remove module_xc dependency from module_charge (meta_gga st…
25f51c5
Fix: allow null rho buffers on ranks with empty real-space grid parti…
1528e79
Refactor: move rhog_io into module_charge as chg_rhog_io
15f7026
Refactor: create module_charge/test with the rhog io unit test
3b66374
Refactor: move charge and charge-extra unit tests into module_charge/…
eeb2740
Refactor: move mix, parallel and tools unit tests into module_charge/…
ff766ac
Refactor: rename module_charge test dir to unittests and wire CI for it
ce50549
Fix: pass ucell.omega to Charge::sum_rho/renormalize_rho to fix NPT s…
140be65
Fix: add omega arg to remaining dm2rho call sites
46a9665
Fix: restore HamiltHSMatrix hs declaration in cal_mw_from_lambda
cc3a0af
Merge branch 'develop' into 20260916
mohanchen 0088c1d
Merge branch 'develop' into 20260916
Critsium-xy 431f9a3
Fix: close_kerker_gg0 actually disables Kerker; drop dead mixing_gg0 …
03b47a7
Fix: relax over-strict null-buffer asserts for empty grid partitions
01000c6
Fix: relax over-strict null-buffer assert in ParaRgridWorld::reduce_a…
7ba427c
Fix: allow nnr == 0 in DMR mixing for empty MPI partitions
4e3966e
Fix: split reciprocal rho copy from real-space |m| rescale in mix_rho…
22391b3
Refactor: remove unused Charge_Mixing::conserve_setting
4424915
Refactor: drop dead Charge_Mixing::tpiba2 member
b01a330
Refactor: route Charge_Mixing getters through cfg_
f2e4685
Refactor: init_mixing constructs Mixing from cfg_ not legacy mirrors
ce98bd5
Refactor: mix_rho_recip/mix_rho_real read mixing_beta from cfg_
60a7586
Refactor: set_mixing stops mirroring cfg_ into legacy members
6c0c079
Refactor: drop legacy Charge_Mixing mirror members; cfg_ is single so…
52593de
Refactor: drop NSDMI from MixingConfig to force explicit construction
c14afdd
Refactor: aggregate-init MixingConfig in esolver_ks with pragma guard
ca5a30f
Refactor: aggregate-init MixingConfig in test_chg_mix with pragma guard
dd2d478
Merge branch '20260916' of github.com:mohanchen/abacus-mc into 20260916
dfaefdf
Fix: fail-fast guards in Charge_Mixing and update chg_mix tests
8cbc558
test(module_charge): add unit tests for chg_uspp and chg_dmr
68e820f
test(module_charge): add unit tests for chg_precond, chg_drho, chg_dr…
f10bd03
test(module_charge): add unit tests for chg_symm, chg_symm_detail, ch…
35bf4fe
test(module_charge): add chg_tau/chg_routine/chg_init tests; drop spu…
5b9f83a
test(module_charge): fix broken includes in unit tests
a04584f
test(module_charge): fix link/build issues; temporarily disable routi…
b2fca4e
fix bug
6e8708e
format tool_quit
2530392
remove a test due to WARNING_QUIT funcitno
ce9271d
delete the support file charge-density.dat because unittests never ne…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.