Repository navigation
Conversation
|
@ABACUS-PR-BOT could you review the PR? |
ABACUS-PR-BOT
left a comment
There was a problem hiding this comment.
Static review of 4193ee4: I found no correctness issue in the snapshot and warning-stream changes, including the OF-TDDFT callers. Two non-blocking follow-ups are below. Whitespace and trusted governance checks completed without errors; no builds or runtime tests were run, and CI diagnostics were unavailable.
| #define ESOLVER_OF_H | ||
|
|
||
| #include <string> | ||
| #include <ostream> |
There was a problem hiding this comment.
Non-blocking: Please use <iosfwd> here, since this header only declares std::ostream& parameters and does not need the complete stream definition. The output operations are implemented in the .cpp files. This can be handled in a follow-up.
| ESolver_FP::before_all_runners(ucell, inp); | ||
|
|
||
| // Snapshot the global settings needed by OFDFT at the solver boundary. | ||
| this->of_runtime_config_.global_readin_dir = PARAM.globalv.global_readin_dir; |
There was a problem hiding this comment.
Non-blocking: Could you add a focused regression test for the captured settings and an injected std::ostringstream warning sink? MODULE_PW_OfDFT only compiles KEDF code, and the calculation cases do not distinguish the supplied sink from GlobalV::ofs_warning or a retained snapshot from later global reads. The existing integration coverage is useful; this additional coverage can follow after merge.
|
This PR may not be the best solution, I will close it. |
Summary
Reduce
ESolver_OF's direct dependence on global runtime state while preserving the existing initialization and numerical behavior.PARAM.globalvsettings used by OFDFT intoOFDFTRuntimeConfigat the solver initialization boundary, then use that configuration for charge initialization, output paths, force, and stress calculations.Validation
cmake --build build --target abacus_basic_para -j2— passed.ctest --test-dir build -R '^MODULE_PW_OfDFT$' --output-on-failure— passed (1/1).ctest --test-dir build -R '^07_OFDFT$' --output-on-failure— 169 of 173 cases passed. Four cases require optional build support unavailable in this configuration:04_OF_KE_CPN5and06_OF_KE_MPNrequireENABLE_MLALGO;22_OF_LibxcPBEand26_OF_MD_LibxcPBErequire LibXC support.git diff --check— passed.