Skip to content

Fix steady state callback interval handling#1180

Merged
efaulhaber merged 11 commits into
trixi-framework:mainfrom
svchb:codex/fix-steady-state-callback
May 26, 2026
Merged

Fix steady state callback interval handling#1180
efaulhaber merged 11 commits into
trixi-framework:mainfrom
svchb:codex/fix-steady-state-callback

Conversation

@svchb
Copy link
Copy Markdown
Collaborator

@svchb svchb commented May 11, 2026

Summary

  • respect interval before evaluating the steady-state kinetic-energy condition
  • normalize integer tolerances to floating-point values so the callback can be constructed with integer inputs
  • reject non-positive interval_size values

Root Cause

The discrete callback condition called steady_state_condition! directly, so interval was never checked. The constructor also chose the previous kinetic-energy vector element type before converting tolerances to a floating type, which made integer tolerances try to store Inf as an integer.

Validation

  • julia --project=. -e 'using Test, TrixiParticles; include("test/callbacks/steady_state_reached.jl")'

@codecov
Copy link
Copy Markdown

codecov Bot commented May 11, 2026

Codecov Report

❌ Patch coverage is 97.22222% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.04%. Comparing base (8780b50) to head (fd83a59).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
test/callbacks/steady_state_reached.jl 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1180      +/-   ##
==========================================
+ Coverage   90.00%   90.04%   +0.03%     
==========================================
  Files         135      136       +1     
  Lines       10569    10594      +25     
==========================================
+ Hits         9513     9539      +26     
+ Misses       1056     1055       -1     
Flag Coverage Δ
total 90.05% <97.22%> (+0.03%) ⬆️
unit 70.76% <83.33%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@svchb svchb self-assigned this May 12, 2026
@svchb svchb requested a review from efaulhaber May 12, 2026 11:09
@svchb svchb added the bug Something isn't working label May 12, 2026
@svchb svchb marked this pull request as ready for review May 12, 2026 11:09
Comment thread src/callbacks/steady_state_reached.jl Outdated
Comment thread src/callbacks/steady_state_reached.jl Outdated
Comment thread src/callbacks/steady_state_reached.jl Outdated
Co-authored-by: Erik Faulhaber <44124897+efaulhaber@users.noreply.github.com>
@svchb svchb requested a review from efaulhaber May 18, 2026 10:41
Comment thread src/callbacks/steady_state_reached.jl Outdated
Comment thread src/callbacks/steady_state_reached.jl Outdated
Comment thread src/callbacks/steady_state_reached.jl Outdated
Comment thread src/callbacks/steady_state_reached.jl Outdated
Comment thread src/callbacks/steady_state_reached.jl
Comment thread src/callbacks/steady_state_reached.jl Outdated
Comment thread src/callbacks/steady_state_reached.jl Outdated
Comment thread src/callbacks/steady_state_reached.jl Outdated
Comment thread src/callbacks/steady_state_reached.jl Outdated
@svchb svchb requested a review from efaulhaber May 24, 2026 19:33
Comment thread src/callbacks/steady_state_reached.jl Outdated
Co-authored-by: Erik Faulhaber <44124897+efaulhaber@users.noreply.github.com>
@svchb svchb requested a review from efaulhaber May 26, 2026 13:56
@svchb svchb changed the title [codex] Fix steady state callback interval handling Fix steady state callback interval handling May 26, 2026
@efaulhaber efaulhaber enabled auto-merge (squash) May 26, 2026 14:17
@efaulhaber
Copy link
Copy Markdown
Member

/run-gpu-tests

@efaulhaber efaulhaber merged commit 565608e into trixi-framework:main May 26, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants