Describe the Code Quality Issue
Description
source_hsolver includes concrete plane-wave Hamiltonian implementations from
source_pw, violating the target dependency boundary.
Locations
Production code (2 files):
hsolver_lcaopw.cpp → source_pw/module_pwdft/hamilt_pw.h, source_pw/module_pwdft/hamilt_lcaopw.h
hsolver_pw_sdft.h → source_pw/module_stodft/hamilt_sdft_pw.h, source_pw/module_stodft/sto_iter.h
Test code (bulk of usages): test/diago_*_test.cpp, test/diago_mock.h,
test/hsolver_supplementary_mock.h reference structure_factor.h, hamilt_pw.h,
op_pw.h, sto_wf.h.
Notes
The solver should operate against the abstract Hamiltonian interface rather than
concrete PW implementations. Tests likely need mocks/fixtures to avoid pulling in
source_pw, or should be moved to the owning module.
Acceptance criteria
- No
#include "source_pw/..." remains in source_hsolver production code.
- Test dependencies on
source_pw are removed or replaced with mocks.
Additional Context
No response
Task list for Issue attackers (only for developers)
Describe the Code Quality Issue
Description
source_hsolverincludes concrete plane-wave Hamiltonian implementations fromsource_pw, violating the target dependency boundary.Locations
Production code (2 files):
hsolver_lcaopw.cpp→source_pw/module_pwdft/hamilt_pw.h,source_pw/module_pwdft/hamilt_lcaopw.hhsolver_pw_sdft.h→source_pw/module_stodft/hamilt_sdft_pw.h,source_pw/module_stodft/sto_iter.hTest code (bulk of usages):
test/diago_*_test.cpp,test/diago_mock.h,test/hsolver_supplementary_mock.hreferencestructure_factor.h,hamilt_pw.h,op_pw.h,sto_wf.h.Notes
The solver should operate against the abstract Hamiltonian interface rather than
concrete PW implementations. Tests likely need mocks/fixtures to avoid pulling in
source_pw, or should be moved to the owning module.Acceptance criteria
#include "source_pw/..."remains insource_hsolverproduction code.source_pware removed or replaced with mocks.Additional Context
No response
Task list for Issue attackers (only for developers)