Skip to content

fix(ode): corrector equation using update instead of y-y_predict - #3285

Open
bcaddy wants to merge 1 commit into
kokkos:developfrom
bcaddy:dev-y-ypredict
Open

fix(ode): corrector equation using update instead of y-y_predict#3285
bcaddy wants to merge 1 commit into
kokkos:developfrom
bcaddy:dev-y-ypredict

Conversation

@bcaddy

@bcaddy bcaddy commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

The correction d = y - y_predict must be the full distance between the Newton iterate and the predictor, so it is recomputed from y on every evaluation. It cannot be read from the Newton solver's update vector: that only holds the last Newton step, not the accumulated correction, which would change the root of the residual to 0 = psi - c * f(t+dt, y).

Also includes a regression test for this bug

Assisted-by: Claude:fable-5

The correction d = y - y_predict must be the full distance between
the Newton iterate and the predictor, so it is recomputed from y
on every evaluation. It cannot be read from the Newton solver's
update vector: that only holds the last Newton step, not the
accumulated correction, which would change the root of the
residual to 0 = psi - c * f(t+dt, y).

Also includes a regression test for this bug

Assisted-by: Claude:fable-5
Signed-off-by: Robert Caddy <rcaddy@princeton.edu>
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