Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple stage value prediction for implicit RK #260

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cpethrick
Copy link
Collaborator

The JFNK solver for diagonally-implicit Runge-Kutta used to use the previous stage value as the initial guess for nonlinear iterations:
$u^(i)_0$ = $u^{(i-1)}$ where superscripts in parentheses indicate stage values.

I modified the implicit solver to use a better stage value prediction:
$u^(i)_0 = c_i \Delta t \ RHS(u^n)$
That is, I store the slope at the previous time step and use linear extrapolation to the "stage time", $c_i \Delta t$.

The same test took 14h to run before making this change and 11h after adding the better stage value prediction. For the cost of adding a residual evaluation and storing the slope $RHS(u^n)$, the JFNK solver needs to perform fewer iterations.

I propose making this a hard-coded change because it is unlikely to ever degrade performance, and only impacts a very small part of the code. If I add better stage value prediction in the future, I will code this more carefully. Section 2.18 of the Kennedy & Carpenter review on DIRK methods describes this SVP alongside many other more complex ones.

Draft while I clean up the changes...

@cpethrick cpethrick marked this pull request as draft June 21, 2024 15:07
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.

None yet

1 participant