-
Notifications
You must be signed in to change notification settings - Fork 112
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
NaN check callback #1854
NaN check callback #1854
Conversation
Review checklistThis checklist is meant to assist creators of PRs (to let them know what reviewers will typically look for) and reviewers (to guide them in a structured review process). Items do not need to be checked explicitly for a PR to be eligible for merging. Purpose and scope
Code quality
Documentation
Testing
Performance
Verification
Created with ❤️ by the Trixi.jl community. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1854 +/- ##
==========================================
- Coverage 96.28% 89.38% -6.90%
==========================================
Files 438 439 +1
Lines 35386 35401 +15
==========================================
- Hits 34071 31643 -2428
- Misses 1315 3758 +2443
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Shall we really use another callback for this? I think it may be better to use the same approach as OrdinaryDiffEq.jl and allow more arguments to Trixi.jl/src/auxiliary/auxiliary.jl Lines 152 to 167 in 4ee60e7
and Lines 115 to 130 in 4ee60e7
|
I briefly looked into this, but I personally find this approach less intuitive than using a callback. |
Having merged #1781 we have return now by default
NaN
if there are negative arguments tosqrt
andlog
. Opposed to the integrators from OrdinaryDiffEq.jl which come with anunstable_check
that is effectively a NaN-check using the built-inany
function the custom integrators in Trixi do not check by default for NaN and thus a simulation continues although it is already corrupted.This PR adds a NaN callback which is recommended to use when using
Trixi.solve
.I am not sure if we want to use
@trixi_timeit timer()
as the cb should be really cheap assuming an effective divide & conquer implementation ofany
.