Adaptive integrator - #5473
Open
srichers wants to merge 4 commits into
Open
Conversation
added 3 commits
August 21, 2026 15:42
…or norm, ability to recall previous error in adaptive integrator
srichers
force-pushed
the
adaptive_integrator
branch
from
August 21, 2026 19:44
ea2db45 to
36f8694
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Added adaptive timestepping functionality to RKIntegrator with a Dormand-Prince butcher tableau
Additional background
I previously tried using adaptive timestepping with SUNDIALS, but it was not compatible with particle data structures. I added logic in the location suggested by code comments to implement adaptive timestepping. This also required a bit more information about the Integrator state to be available. I did not provide a function for computing a normalized error that would treat both relative and absolute tolerances, since the absolute tolerance needs to be normalized to a potentially unitful quantity in a nontrivial way. Rather, I provide a setter function so the user can define the error function. My example error function for the Emu code is at https://github.com/AMReX-Astro/Emu/blob/adaptive_integrator/Source/main.cpp#L306. RKIntegrator should not be affected if the DOPRI tableau is not used.
Checklist
The proposed changes: