Skip to content

FIX: Fix update points to correctly index by accounting for state variables - #63

Merged
bocklund merged 4 commits into
pycalphad:masterfrom
bocklund:fix-update-points-statevars
Sep 7, 2026
Merged

bocklund merged 4 commits into
pycalphad:masterfrom
bocklund:fix-update-points-statevars

Conversation

@bocklund

@bocklund bocklund commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Prior to the Workspace changes in 0.3.0, _update_points was indexing into eq.Y[vtx, :sum(dof)]. After Workspace changes, we started indexing into the CompositionSet objects as compset.dof[:sum(dof)] without accounting for state variable offsets. This PR fixes that and introduces tests for correctness.

Since the Workspace integration (0.3.0), _update_points sliced
compset.dof[:sum(dof)], but CompositionSet.dof is laid out as
[state variables..., site fractions...], so the leading N/P/T values
were taken as the equilibrium point. After per-sublattice normalization
in local_sample the adaptive points were nowhere near the actual
equilibrium constitution.

Skip the state variables when extracting the equilibrium site fractions
and add regression tests for _update_points.
@bocklund bocklund changed the title FIX: Fix update points statevars FIX: Fix update points to correctly index by accounting for state variables Sep 7, 2026
@bocklund
bocklund merged commit b4eaf90 into pycalphad:master Sep 7, 2026
10 checks passed
@bocklund
bocklund deleted the fix-update-points-statevars branch September 7, 2026 22:04
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