Skip to content

Make tracing solver controls configurable - #48

Draft
rogeriojorge wants to merge 1 commit into
mainfrom
agent/configure-tracing-solver-controls
Draft

Make tracing solver controls configurable#48
rogeriojorge wants to merge 1 commit into
mainfrom
agent/configure-tracing-solver-controls

Conversation

@rogeriojorge

Copy link
Copy Markdown
Member

What changed

  • Add max_steps and progress_meter controls to Tracing.
  • Replace the effectively unbounded 10_000_000_000 Diffrax limit with a configurable default of 1_000_000 steps.
  • Apply that limit consistently to all eight Diffrax solve branches, including guiding-center, collision, field-line, and full-orbit integrations.
  • Use NoProgressMeter by default while allowing callers to pass a Diffrax progress meter explicitly.
  • Honor caller-provided rejected_steps and event condition values.

Scope

This PR contains only generic solver-control and constructor-default changes. It is independent of the VMEC magnetic-axis fix in #47 and does not change any model equations, coordinate handling, or loss classification.

FullOrbit_Boris is not a Diffrax solve and therefore does not use max_steps; its iteration count remains determined by the requested output-time array.

Validation

  • python -m pytest tests/test_dynamics.py -q: 14 passed
  • wout_nfp3_final_scaled.nc, GuidingCenter, 10 particles, tmax=1e-4: completed in 1.68 s with trajectory shape (10, 21, 4) and 0% loss
  • Verified every diffeqsolve call receives self.max_steps

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