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
{{ message }}
Repository navigation
NTV torque psi-quadrature over-refines at rational surfaces, dominating runtime #303
In KineticForces, the outer psi-integration of the NTV torque integrand tpsi(psi)
uses adaptive quadrature. The integrand has near-singular resonant peaks at each
rational surface, and the adaptive quadrature over-refines there with no maxevals
cap, dominating runtime (about 30 min for a single n=1 case vs about 2 min for the
rest of the pipeline). Instrumentation showed ~1375+ tpsi evaluations clustered at
the rational surfaces (q = 2,3,4,5,6).
Proper fix: panel the psi-integral at the rational surfaces (handle the integrable
resonant peaks per-interval) rather than brute-force adaptive refinement; optionally
add a maxevals cap.
Interim mitigation already applied to the DIII-D-like example: relaxed
atol_psi / rtol_psi to 1e-2 (about 4x faster) and removed leftover per-evaluation
debug prints in Torque.jl.
what's the final torque?? reasonable result should be order 1 Nm. So 1e-2 atol is tight but reasonable. I don't remember the old DIII-D example taking 30 min
Activity
EQUIL - IMPROVEMENT - Update DIII-D-like example: edge-matched equili…
KineticForces - CLEANUP - Remove per-evaluation debug prints from NTV…
logan-nc commentedon Jun 24, 2026
what's the final torque?? reasonable result should be order 1 Nm. So 1e-2 atol is tight but reasonable. I don't remember the old DIII-D example taking 30 min
jhalpern30 commentedon Sep 29, 2026
Closing. Fixed in #312 (commit 11bda95), which contained #313 in it which closed this issue.