Skip to content

refactor(deltaspin): encapsulate ScState lambda and Mi - #8112

Merged
mohanchen merged 4 commits into
deepmodeling:developfrom
hujieting:task2-deltaspin-encapsulation
Oct 10, 2026
Merged

mohanchen merged 4 commits into
deepmodeling:developfrom
hujieting:task2-deltaspin-encapsulation

Conversation

@hujieting

Copy link
Copy Markdown
Collaborator

Summary

This PR encapsulates ScState::lambda_ and
ScState::Mi_ as private members, adds mutable
accessors, and updates all affected DeltaSpin call sites.

Motivation

The change improves data encapsulation and makes read-
only and writable access explicit. Read-only call sites
now use the existing const getters, while mutation sites
use the new mutable accessors.

Verification

  • Focused DeltaSpin targets compiled successfully.
  • DeltaSpin unit tests passed: 6/6.
  • git diff --check passed.
  • The staged agent governance check reported no errors.
  • Governance warnings were limited to a migration-neutral
    global dependency count, existing test coverage without
    new test files, and no documentation update for this
    internal refactor.

Behavior

This PR does not modify the DeltaSpin numerical
algorithm, physical calculation logic, formulas, loop
behavior, or numerical parameters.

@hujieting hujieting changed the title refactor(derefactor(deltaspin): encapsulate ScState lambda and Miltaspin): encapsulate ScState::lambda_ and Mi_ as private … refactor(deltaspin): encapsulate ScState lambda and Mi Oct 10, 2026
@hujieting hujieting added the Refactor Refactor ABACUS codes label Oct 10, 2026
@mohanchen mohanchen added The Absolute Zero Reduce the "entropy" of the code to 0 collinear/non-collinear/SOC/delta-spin Issues related to SOC labels Oct 10, 2026
@mohanchen
mohanchen merged commit f834ec6 into deepmodeling:develop Oct 10, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

collinear/non-collinear/SOC/delta-spin Issues related to SOC Refactor Refactor ABACUS codes The Absolute Zero Reduce the "entropy" of the code to 0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants