trixi-framework / Trixi.jl

Trixi.jl: Adaptive high-order numerical simulations of conservation laws in Julia
https://trixi-framework.github.io/Trixi.jl
MIT License
505 stars 98 forks source link

Clean up callback conditions #1960

Closed efaulhaber closed 1 month ago

efaulhaber commented 1 month ago

As discussed with @ranocha, the condition integrator.stats.naccept == 0 && integrator.iter > 0 is an historical remnant that has just been copied around without really thinking about it.

The callbacks are only triggered for accepted steps, so this condition is never true. The callback will only be initially triggered once with naccept == iter == 0 and then always with iter >= naccept > 0.

github-actions[bot] commented 1 month ago

Review checklist

This 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 :heart: by the Trixi.jl community.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.53%. Comparing base (5359525) to head (7d64acc). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1960 +/- ## ========================================== - Coverage 96.11% 89.53% -6.58% ========================================== Files 460 460 Lines 36926 36915 -11 ========================================== - Hits 35490 33049 -2441 - Misses 1436 3866 +2430 ``` | [Flag](https://app.codecov.io/gh/trixi-framework/Trixi.jl/pull/1960/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/trixi-framework/Trixi.jl/pull/1960/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework) | `89.53% <100.00%> (-6.58%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=trixi-framework#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.