Skip to content

Adaptive integrator - #5473

Open
srichers wants to merge 4 commits into
AMReX-Codes:developmentfrom
srichers:adaptive_integrator
Open

Adaptive integrator#5473
srichers wants to merge 4 commits into
AMReX-Codes:developmentfrom
srichers:adaptive_integrator

Conversation

@srichers

@srichers srichers commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

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:

  • fix a bug or incorrect behavior in AMReX
  • add new capabilities to AMReX
  • changes answers in the test suite to more than roundoff level
  • are likely to significantly affect the results of downstream AMReX users
  • include documentation in the code and/or rst files, if appropriate

@srichers
srichers force-pushed the adaptive_integrator branch from ea2db45 to 36f8694 Compare August 21, 2026 19:44
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