Commit afff611
abacus_fixer
Refactor ESolver_LR: remove redundant input member, use base class inp_
Problem:
ESolver_LR maintained a redundant 'const Input_para& input;' member
bound in the constructor, while the base class ESolver already provides
'const Input_para* inp_' bound during before_all_runners(). This
duplication existed as a workaround for a bug: in the 'ks-lr' branch of
before_all_runners, inp_ was never assigned (only the temporary
ks_solver.inp_ was set), so ESolver_LR could not rely on inp_ and
instead used its own reference member.
Changes:
1. esolver_lr_lcao_tddft.cpp:
- Add 'this->inp_ = &inp;' at the beginning of before_all_runners()
to ensure inp_ is bound in both 'ks-lr' and 'lr' branches.
- Remove 'input(inp)' from the constructor initializer list.
- Replace all 'input.xxx' and 'this->input.xxx' with 'this->inp_->xxx'.
- Remove GlobalC::exx_info from constructor initializer list (already
removed upstream; init_exx_info handles full initialization from inp).
- Fix uninitialized 'inp' variable in setup_2center_table() (was 'inp.'
but the function has no 'inp' parameter; changed to 'input.' and then
to 'this->inp_->').
2. esolver_lr_lcao_tddft.h:
- Remove the redundant 'const Input_para& input;' member declaration.
3. esolver_lr_lcao_bse.cpp:
- Replace all 'this->input.xxx' with 'this->inp_->xxx'.
- Replace 'GlobalC::exx_info.info_ri' with 'this->exx_info.info_ri'
(use inherited member instead of removed global).
Verification:
- Built successfully with 'make -j 20' in build_max_para_test/.
- Not committed until now per user request.1 parent 35067e5 commit afff611
3 files changed
Lines changed: 162 additions & 162 deletions
File tree
- source/source_esolver
0 commit comments