Skip to content

add saveat to SimpleTauLeaping, fix allocations, improve tests#550

Merged
isaacsas merged 2 commits intoSciML:masterfrom
isaacsas:fix_up_leaping_tests
Feb 14, 2026
Merged

add saveat to SimpleTauLeaping, fix allocations, improve tests#550
isaacsas merged 2 commits intoSciML:masterfrom
isaacsas:fix_up_leaping_tests

Conversation

@isaacsas
Copy link
Copy Markdown
Member

  • Add saveat keyword to SimpleTauLeaping solver, matching SimpleExplicitTauLeaping's interface. When provided, only the requested times are stored instead of every dt step.
  • Replace per-step allocation (du + uprev) with pre-allocated buffer swap (u_new .= du .+ uprev) for zero inner-loop allocations.
  • Fix duplicate initial time bug in SimpleExplicitTauLeaping's save_idx initialization when saveat includes t0.
  • Restore Nsims=1000 in regular_jumps tests with proper memory control: save_positions=(false,false) for SSAStepper, saveat for all solvers, direct sol[i].u[j] indexing instead of interpolation.
  • Add "Saving Controls" testset verifying saveat behavior for SSAStepper, SimpleTauLeaping, and SimpleExplicitTauLeaping.

isaacsas and others added 2 commits February 14, 2026 10:25
- Add `saveat` keyword to SimpleTauLeaping solver, matching
  SimpleExplicitTauLeaping's interface. When provided, only the
  requested times are stored instead of every dt step.
- Replace per-step allocation (du + uprev) with pre-allocated
  buffer swap (u_new .= du .+ uprev) for zero inner-loop allocations.
- Fix duplicate initial time bug in SimpleExplicitTauLeaping's
  save_idx initialization when saveat includes t0.
- Restore Nsims=1000 in regular_jumps tests with proper memory
  control: save_positions=(false,false) for SSAStepper, saveat for
  all solvers, direct sol[i].u[j] indexing instead of interpolation.
- Add "Saving Controls" testset verifying saveat behavior for
  SSAStepper, SimpleTauLeaping, and SimpleExplicitTauLeaping.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
…ct filtering

Follow OrdinaryDiffEq conventions for saveat processing:
- Filter saveat to strictly interior times using binary search
- Resolve save_start/save_end defaults based on endpoint membership
- Sort unordered saveat collections, filter out-of-range times
- Remove fragile isapprox checks for duplicate t0 detection

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@isaacsas isaacsas merged commit bfb8b9b into SciML:master Feb 14, 2026
11 checks passed
@isaacsas isaacsas deleted the fix_up_leaping_tests branch February 14, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant