Skip to content

Make stability analysis more robust - #405

Merged
g-bauer merged 1 commit into
mainfrom
fix-stability-trial-skip
Oct 31, 2026
Merged

g-bauer merged 1 commit into
mainfrom
fix-stability-trial-skip

Conversation

@g-bauer

@g-bauer g-bauer commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

State::stability_analysis:

  • Failed trial phases no longer abort the analysis. A trial whose tpd minimization fails is skipped, or kept if its tpd is already negative, since that proves instability. Errors are returned only if no trial phase could be evaluated.
  • Candidates are sorted by their true tpd, most negative first. tp_flash now initializes from the first two candidates instead of the last two in trial order.
  • Duplicate candidates are removed. Partial densities are compared relative to the total density, so the same phase found from two trials, differing only in trace components, is reported once.
  • Fix NaN tpd for absent components (0 ln 0). This also affected the convergence check in tp_flash.
  • Moved tangent_plane_distance to stability_analysis.rs.

Tests cover failed trials, sorting, duplicates and zero components.

@g-bauer
g-bauer merged commit cbb4787 into main Oct 31, 2026
18 checks passed
@g-bauer
g-bauer deleted the fix-stability-trial-skip branch October 31, 2026 14:11
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.

2 participants