Skip to content

Reduce repeated onsite projector setup and cover mixed orbital meshes - #8239

Draft
lanshuyue wants to merge 2 commits into
deepmodeling:developfrom
lanshuyue:codex/onsite-projector-mesh-regression
Draft

lanshuyue wants to merge 2 commits into
deepmodeling:developfrom
lanshuyue:codex/onsite-projector-mesh-regression

Conversation

@lanshuyue

Copy link
Copy Markdown
Collaborator

Reminder

  • I have read AGENTS.md and docs/developers_guide/agent_governance.md.
  • I have linked an issue or explained why this PR does not need one.
  • I have added adequate unit tests and/or case tests, or explained why not.
  • I have listed the exact verification commands run and their results.
  • I have described user-visible behavior changes, including INPUT parameter changes.
  • I have explained core-module impact for ESolver, HSolver, ElecState, Hamilt, Operator, Psi, or other source/ changes.
  • I have requested any needed governance exception below.

Linked Issue

No issue: the mixed-mesh bounds fix and orbital_dir argument use are already on develop. This PR keeps only a small follow-up and its regression coverage.

Unit Tests and/or Case Tests for my changes

  • Commands run: cmake --build /tmp/abacus-onsite-build --target abacus_pw_ser -j 8; ctest --test-dir /tmp/abacus-onsite-build -R '^17_DS_DFTU_onsite_mesh$' --output-on-failure; git diff upstream/develop...HEAD --check; python3 tools/03_code_analysis/agent_governance_check.py --staged; python3 tools/03_code_analysis/code_quality_score.py --format json source/source_pw/module_proj/onsite_proj_init.cpp.
  • Result summary: build passed; targeted CTest passed (1/1). Diff check passed. Governance checker reported only its documentation-sync warning, addressed below. Quality score is 91/100, unchanged from current develop.
  • Checks not run, with reason: full integration suite and GPU build were not run; this change does not alter projector mathematics or GPU-specific code.

What's changed?

  • Generate each atom type's radial grid once and pass the parsed radial vector directly to smoothgen, avoiding repeated grid work and copies for multiple projectors.
  • Include the orbital filename when onsite_radius exceeds that file's radial grid.
  • Add a focused CTest using the existing O-first/Fe-second case (701- and 601-point meshes) to check a valid radius and rejection of an excessive radius.

Governance Notes

  • INPUT/docs changes: no INPUT syntax or valid-input numerical behavior changes. The invalid-radius diagnostic now names the orbital file; a separate documentation update is unnecessary for this narrow diagnostic improvement.
  • Core module impact: limited to PW onsite projector initialization; no interface or solver changes.
  • Exceptions requested: none.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant