Skip to content

add fallback to finite diff Jacobian#2008

Merged
zingale merged 6 commits into
AMReX-Astro:developmentfrom
BenWibking:jac-fallback
May 31, 2026
Merged

add fallback to finite diff Jacobian#2008
zingale merged 6 commits into
AMReX-Astro:developmentfrom
BenWibking:jac-fallback

Conversation

@BenWibking
Copy link
Copy Markdown
Collaborator

@BenWibking BenWibking commented May 30, 2026

In the Rosenbrock integrator, add a fall back to the FD Jacobian if the analytic Jacobian produces a NaN or Inf value.

Fixes #2007.

@BenWibking BenWibking marked this pull request as ready for review May 30, 2026 02:44
@BenWibking BenWibking requested a review from zingale May 30, 2026 02:50
@BenWibking
Copy link
Copy Markdown
Collaborator Author

@zingale Fixed to use isnan/isinf.

@zingale
Copy link
Copy Markdown
Member

zingale commented May 30, 2026

Shouldn't it use amrex::Gpu::isnan()

@BenWibking
Copy link
Copy Markdown
Collaborator Author

Shouldn't it use amrex::Gpu::isnan()

Why? We use std::isnan in my places in device kernels in our code. I haven't seen any problems.

@zingale
Copy link
Copy Markdown
Member

zingale commented May 30, 2026

it looks like it only matters with SYCL

@zingale
Copy link
Copy Markdown
Member

zingale commented May 30, 2026

can you fix the tabs?

@BenWibking
Copy link
Copy Markdown
Collaborator Author

@zingale tabs fixed.

@zingale zingale merged commit 6abd221 into AMReX-Astro:development May 31, 2026
33 of 34 checks passed
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