-
Notifications
You must be signed in to change notification settings - Fork 113
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
fix type instability when iterating over callbacks in simple integrators #1684
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess for consistency one should also change
Trixi.jl/src/time_integration/methods_2N.jl
Lines 122 to 127 in c2f0095
for cb in callback.continuous_callbacks | |
error("unsupported") | |
end | |
for cb in callback.discrete_callbacks | |
cb.initialize(cb, integrator.u, integrator.t, integrator) | |
end |
and
Trixi.jl/src/time_integration/methods_3Sstar.jl
Lines 192 to 197 in c2f0095
for cb in callback.continuous_callbacks | |
error("unsupported") | |
end | |
for cb in callback.discrete_callbacks | |
cb.initialize(cb, integrator.u, integrator.t, integrator) | |
end |
as well as
Trixi.jl/src/time_integration/methods_SSP.jl
Lines 127 to 132 in c2f0095
for cb in callback.continuous_callbacks | |
error("unsupported") | |
end | |
for cb in callback.discrete_callbacks | |
cb.initialize(cb, integrator.u, integrator.t, integrator) | |
end |
and most importantly
Trixi.jl/src/time_integration/methods_SSP.jl
Lines 187 to 190 in c2f0095
for cb in callbacks.discrete_callbacks | |
if cb.condition(integrator.u, integrator.t, integrator) | |
cb.affect!(integrator) | |
end |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1684 +/- ##
==========================================
+ Coverage 82.63% 86.35% +3.71%
==========================================
Files 425 425
Lines 34376 34366 -10
==========================================
+ Hits 28406 29674 +1268
+ Misses 5970 4692 -1278
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Good catch 👍 I adapted these parts as well. |
Co-authored-by: Daniel Doehring <[email protected]>
Thanks! It's annoying that we sometimes use plural and sometimes singular... |
Fixes #1679