Skip to content

Preserve spline roots near cell endpoints with r8 Cardano exponent - #317

Merged
matt-pharr merged 4 commits into
PrincetonUniversity:developfrom
krystophny:fix/spline-cardano-kind-20261015
Oct 16, 2026
Merged

matt-pharr merged 4 commits into
PrincetonUniversity:developfrom
krystophny:fix/spline-cardano-kind-20261015

Conversation

@krystophny

@krystophny krystophny commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

A default-real Cardano exponent can move a bracketed spline root beyond the cell endpoint, so spline_roots drops it before Newton refinement. Preserve r8 precision in the exponent.

Fixes #316.

Adds a native regression with an independent Hermite-bisection oracle, root count/position/residual checks, and three amplitude scales. The reproducer fails on upstream master 2938fac9; the fix passes there and on develop 3e194677 through make -C install check-spline-root-endpoint. The physical spline is unchanged. A fresh native PENTRC replay reproduces the old failure and completes repaired FGAR/TGAR/PGAR with finite NetCDF output; registered energy controls pass unchanged. Torque convergence remains separate.

Chris&AI

krystophny and others added 4 commits October 15, 2026 21:13
Preserve bracketed roots near cell endpoints and test against an independent Hermite bisection oracle. Chris&AI
We are not changing the testing setup right before releasing the final minor version of the fortran code (v1.0).
Removed comments regarding cube-root exponent precision.

@matt-pharr matt-pharr left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice simple one-line change. In reality we should probably have every decimal number represented as _r8 across the code... I did a pass last year at getting most of the ones that were important but clearly there are some remaining.

PS I really wish Claude would stop naming things after people that don't need names. Just saying r4 vs r8 exponent would have told the average reader a lot more :^)

@matt-pharr
matt-pharr merged commit 3c0b8f3 into PrincetonUniversity:develop Oct 16, 2026
6 checks passed
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.

spline_roots can discard bracketed roots near cell endpoints

2 participants