Skip to content

Add Rosenbrock integrator#1994

Open
BenWibking wants to merge 23 commits into
AMReX-Astro:developmentfrom
BenWibking:rosenbrock-2
Open

Add Rosenbrock integrator#1994
BenWibking wants to merge 23 commits into
AMReX-Astro:developmentfrom
BenWibking:rosenbrock-2

Conversation

@BenWibking
Copy link
Copy Markdown
Collaborator

@BenWibking BenWibking commented May 11, 2026

Summary

This adds a new integration/Rosenbrock integrator implementation with runtime-selectable Rosenbrock tableaus and timestep controllers.

Rosenbrock methods:

Timestep controllers:

The integrator supports both Strang and SDC setup paths through separate actual_integrator headers, uses the existing RHS/Jacobian/linear-solve interfaces, and exposes runtime parameters for tableau selection, rejection behavior, and controller tuning.

@BenWibking BenWibking changed the base branch from main to development May 11, 2026 20:15
@BenWibking BenWibking changed the title Rosenbrock 2 Add Rosenbrock-2 method May 11, 2026
@BenWibking
Copy link
Copy Markdown
Collaborator Author

@zingale Here's the draft PR. This does not have all the performance optimizations that I tried.

@BenWibking
Copy link
Copy Markdown
Collaborator Author

BenWibking commented May 11, 2026

This version wins by a few percent on CPU [Mac laptop] over VODE for primordial_chem when building both with Clang (which is much faster than gcc on CPU for these problems).

The performance delta is significantly larger on a Hopper GPU (in favor of Rosenbrock).

@BenWibking BenWibking changed the title Add Rosenbrock-2 method Add Rosenbrock-2S method May 11, 2026
@zingale
Copy link
Copy Markdown
Member

zingale commented May 13, 2026

this gets an FPE if I build and run test_react as:

make INTEGRATOR_DIR=ROS2S DEBUG=TRUE
./main3d.gnu.DEBUG.ex inputs_aprox13  amrex.fpe_trap_invalid=1

@zingale
Copy link
Copy Markdown
Member

zingale commented May 13, 2026

it seems to be that it is generating really negative mass fractions and that's causing the failure, so we probably need more step rejection logic.

@BenWibking BenWibking changed the title Add Rosenbrock-2S method Add Rosenbrock methods May 15, 2026
@BenWibking BenWibking marked this pull request as ready for review May 17, 2026 17:23
@BenWibking BenWibking changed the title Add Rosenbrock methods Add Rosenbrock integrator May 17, 2026
@BenWibking
Copy link
Copy Markdown
Collaborator Author

The docs fail due to this broken link (or Zenodo not accepting connections from the CI?)

(          citing: line    2) broken    https://doi.org/10.5281/zenodo.2620544 - 403 Client Error: Forbidden for url: https://zenodo.org/doi/10.5281/zenodo.2620544

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.

2 participants