Skip to content

Refactor: Redundant Input_para Handling in ESolver Class #6348

Closed
@sunliang98

Description

@sunliang98

Describe the Code Quality Issue

Currently, in the ESolver classes:

1. Inconsistent Input_para Usage

The function before_all_runners(UnitCell& ucell, const Input_para& inp) takes inp as an input parameter. However, other member functions (including before_all_runners itself) frequently access PARAM.inp. As a result, should we keep the inp parameter in before_all_runners since PARAM.inp is already widely used?

2. Redundant Member Variables

Some member variables (e.g., ESolver_KS::scf_thr, ESolver_OF::of_kinetic_) are simply assigned from PARAM.inp. Given that PARAM.inp is globally accessible, is it necessary to maintain these duplicate variables in ESolver classes?

Metadata

Metadata

Assignees

Labels

QuestionsRaise your quesiton! We will answer it.RefactorRefactor ABACUS codes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions