Describe the Code Quality Issue
Description
source_hsolver pervasively depends on source_hamilt, primarily via the
hamilt::Hamilt base class (source_hamilt/hamilt.h). This is the most fundamental
coupling and needs an architectural decision, not a mechanical fix.
Locations (22 usages: 16 production, 6 test)
source_hamilt/hamilt.h — included by most diago_* and hsolver_* headers
(diago_bpcg.h, diago_cusolver.h, diago_cusolvermp.h, diago_elpa.h,
diago_elpa_native.h, diago_iter_assist.h, diago_lapack.h, diago_pexsi.h,
diago_scalapack.h, hsolver_lcao.h, hsolver_lcaopw.h, hsolver_pw.{h,cpp},
parallel_k2d.h)
source_hamilt/matrixblock.h — diago_scalapack.cpp, parallel_k2d.h
source_hamilt/module_xc/exx_info.h — hsolver_lcaopw.cpp
Notes
hamilt::Hamilt is the core input interface to the solvers, so removing this
dependency requires a design choice: e.g. relocate the abstract Hamiltonian interface
into an allowed lower-level module, extract a minimal interface source_hsolver can
depend on, or explicitly whitelist source_hamilt as an accepted exception.
Acceptance criteria
- A decision is recorded on how
source_hsolver obtains its Hamiltonian abstraction.
- Either the
source_hamilt dependency is removed, or it is documented as an approved exception.
Additional Context
No response
Task list for Issue attackers (only for developers)
Describe the Code Quality Issue
Description
source_hsolverpervasively depends onsource_hamilt, primarily via thehamilt::Hamiltbase class (source_hamilt/hamilt.h). This is the most fundamentalcoupling and needs an architectural decision, not a mechanical fix.
Locations (22 usages: 16 production, 6 test)
source_hamilt/hamilt.h— included by mostdiago_*andhsolver_*headers(
diago_bpcg.h,diago_cusolver.h,diago_cusolvermp.h,diago_elpa.h,diago_elpa_native.h,diago_iter_assist.h,diago_lapack.h,diago_pexsi.h,diago_scalapack.h,hsolver_lcao.h,hsolver_lcaopw.h,hsolver_pw.{h,cpp},parallel_k2d.h)source_hamilt/matrixblock.h—diago_scalapack.cpp,parallel_k2d.hsource_hamilt/module_xc/exx_info.h—hsolver_lcaopw.cppNotes
hamilt::Hamiltis the core input interface to the solvers, so removing thisdependency requires a design choice: e.g. relocate the abstract Hamiltonian interface
into an allowed lower-level module, extract a minimal interface
source_hsolvercandepend on, or explicitly whitelist
source_hamiltas an accepted exception.Acceptance criteria
source_hsolverobtains its Hamiltonian abstraction.source_hamiltdependency is removed, or it is documented as an approved exception.Additional Context
No response
Task list for Issue attackers (only for developers)