You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix tstop overshoot error with StaticArrays using next_step_tstop flag
Addresses issue #2752 where StaticArrays trigger "stepped past tstops" errors
due to tiny floating-point precision differences in tstop distance calculations.
Changes:
- Add next_step_tstop flag and tstop_target field to ODEIntegrator
- Modify modify_dt_for_tstops! to detect when dt is reduced for tstops
- Add handle_tstop_step! function for exact tstop handling
- Modify main stepping loop to use flag-based tstop stepping
- Skip perform_step! for extremely small dt (< eps(t)) and snap directly
- Guarantee exact tstop landing to eliminate floating-point errors
This eliminates the precision-dependent overshoot that occurs when
StaticArrays and regular Arrays produce slightly different arithmetic
results in the tstop distance calculations due to compiler optimizations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments