Skip to content

Commit c31d38b

Browse files
logan-ncclaude
andcommitted
FFS - DOCS - Fold the Phase 0 verdict into the summary and the issue comment
Section 14 overturns two things the summary and the posted comment still asserted: that ~80% of the step growth was unexplained, and that a good share of the near-axis steps might be legitimate resolution of real structure. Clean geometry gives flat scaling on the same packed grid, so those steps are noise-chasing, and the 11-20% figure was a limit of the partial repair rather than of fixing the source. Updates the posted comment in place with the five-ladder table. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 1d809fa commit c31d38b

2 files changed

Lines changed: 44 additions & 21 deletions

File tree

handoff/issue376/ISSUE_COMMENT.md

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -231,21 +231,37 @@ The step count barely moves:
231231
| mpsi=512 | 3977 | 3551 | **−11%** |
232232
| mpsi=1024 | 7638 | 6081 | **−20%** |
233233

234-
**So knot-scale roughness is a contributing cause worth 11–20%, not the dominant one.** The share
235-
grows with mpsi, as an ε/Δψ effect should, but ~80% of the growth is still unexplained.
234+
**So this partial repair is worth 11–20%** — it caps the ψ-derivatives of data that is still
235+
noisy, rather than removing the noise. The next section measures what removing it is worth.
236236

237237
Two candidate origins of ε are also ruled out, so this is not ODE error control: the `etol` sweep
238238
above, and the hard-coded `abstol=1e-8` at `DirectEquilibrium.jl:294` (only `reltol` is
239239
configurable, and `u0` starts at zeros with its components *becoming* ν/offset/r², so it should
240240
bind where `reltol` cannot) — tightening it to 1e-14 gives 3977 → 4071 at mpsi=512 and
241241
7638 → 7474 at mpsi=1024. Null.
242242

243-
**Where the rest may live.** After the repair, near-axis K still has |f''|/|f| = 2.1e7 — a
244-
curvature scale of ~2e-4 in ψ, comparable to the local knot spacing there (median Δψ = 1.7e-4 at
245-
mpsi=1024). Near the axis the log grid packs to roughly the scale of genuine structure, so a good
246-
share of those steps may be legitimate resolution rather than noise-chasing. The uniform-grid
247-
probe in §3 is consistent: un-packing the axis cut near-axis steps 1891 → 559 but left et[1] at
248-
0.993, i.e. visibly under-resolved.
243+
**Where the rest lives — measured.** Partial repairs recover little because they never remove ε
244+
itself. Five ladders varying input, fill site and grid one at a time show what removing it is
245+
worth:
246+
247+
| case | input | construction | geometry ε across the ladder | step ratios |
248+
|---|---|---|---|---|
249+
| DIII-D `efit` | EFIT g-file | field-line trace | flat 1.8e-6 → 1.3e-6 | 1.72 / 1.92 |
250+
| DIII-D `efit_by_inversion` | EFIT + contours | inversion | **rising** 1.3e-6 → 5.6e-6 | 1.76 / 1.96 |
251+
| Solovev `sol` | **analytic** | field-line trace | **flat 0.19**, r1 = −0.65 | 1.72 / 1.83 |
252+
| LAR `tj_analytic` | analytic | inversion | converging 1.2e-7 → 5.2e-9 | **1.14 / 1.10** |
253+
| LAR + DIII-D packed grid | analytic | inversion | converging 5.9e-7 → 2.9e-8 | **1.10 / 1.15** |
254+
255+
**Clean geometry ⟺ flat step count**, across two constructions, two inputs and two grids. Where the
256+
surface data converges, quadrupling the knots costs ~25% more steps; where it sits on a floor, 3.3×.
257+
258+
Two results worth highlighting. Solovev is *analytic* — perfectly smooth input — yet the standard
259+
field-line construction hands the metric `nu` node data that is flat at **19% relative** with
260+
r1 = −0.65, i.e. pure white noise. Each surface is traced independently, splined on that surface's
261+
own solver-chosen abscissae and resampled to the common θ grid, so the remap error is uncorrelated
262+
between neighbours; that is where ε is manufactured, and it explains why neither `etol` nor
263+
`abstol` touches it. And giving the clean LAR case the DIII-D axis-packed grid keeps it flat, so
264+
**grid packing is not the driver** — those near-axis steps are noise-chasing, not physics.
249265

250266
So the premise "same smooth function, just sampled more finely" is false of the data in a real and
251267
measurable way — but only partly responsible. The practical consequence is in the recommendations:
@@ -265,12 +281,13 @@ the largest lever is not making the coefficients smoother, it is not placing the
265281
3. **Switch the ForceFreeStates integrator to Vern7** — measured in §5, ~20–26% off the EL phase,
266282
with better Δ' than Vern9 at the same tolerance. Gated on explaining the tolerance-independent
267283
2.5e-4 Δ' offset first; then its own branch and a regression-harness run.
268-
4. **Make the surface-to-surface θ parametrization consistent.** Each surface is currently traced
269-
independently and splined on its *own* solver-chosen SFL-angle nodes before being resampled to
270-
the common θ grid (`DirectEquilibrium.jl:500-525`), so the remap error is uncorrelated between
271-
neighbours — which is why neither `reltol` nor `abstol` touches it. Sampling every surface at
272-
the common abscissae (dense output plus a root-solve per node) would make that error smooth in
273-
ψ instead of white.
284+
4. **Make the surface-to-surface θ parametrization consistent — this is the main lever.** Each
285+
surface is currently traced independently and splined on its *own* solver-chosen SFL-angle
286+
nodes before being resampled to the common θ grid (`DirectEquilibrium.jl:500-525`), so the
287+
remap error is uncorrelated between neighbours. Sampling every surface at the common abscissae
288+
(dense output plus a root-solve per node) would make that error smooth in ψ instead of white.
289+
The ladders above bound the prize: clean geometry gives ~1.1× step growth per mpsi doubling
290+
instead of ~1.9×.
274291

275292
I tried the tidier-looking alternative first — deriving the ψ-derivatives from metric
276293
identities — and **measured it: it is worth ~2%, not 20%.** ∇ψ = (e_θ × e_ζ)/J needs only

handoff/issue376/RESULTS.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,17 @@ independently-traced surface geometry (ν, offset, r²) through the ψ-derivativ
2020
g11/g12/g31. The spline interpolates it exactly, contributing ~ε/Δ² to the integrand's second
2121
derivative. So the integrand is genuinely *not* the same function at every mpsi.
2222

23-
**But this is not the dominant term.** §11 repairs the amplification directly and cleans C/E/H by
24-
20–100× (every r1 flips positive), yet recovers only **11% of the steps at mpsi=512 and 20% at
25-
mpsi=1024**. The share grows with mpsi, as an ε/Δψ effect should, but ~80% of the step growth is
26-
still unexplained — and there is evidence (§11) that a good part of it is legitimate resolution of
27-
real near-axis structure, whose curvature scale is comparable to the local knot spacing there.
23+
**Partial repairs recover little; fixing the source is what matters.** §11 caps the ψ-derivatives
24+
of the already-noisy data and §13 corrects one component of e_ψ — the first buys 11–20% of the
25+
steps, the second ~2%. Neither removes ε itself.
26+
27+
**§14 shows what removing ε is worth.** Across five ladders varying input, fill site and grid one
28+
at a time, **clean geometry ⟺ flat step count**: where the surface data converges, quadrupling the
29+
knots costs ~25% more steps; where it sits on a floor, 3.3×. An analytic Solovev equilibrium comes
30+
out of the standard construction with `nu` node data flat at 19% relative and r1 = −0.65 — pure
31+
white noise from a perfectly smooth input. And a clean case given the DIII-D axis-packed grid stays
32+
flat (1.10×, 1.15× per doubling), so grid packing is not the driver and those near-axis steps are
33+
noise-chasing rather than physics.
2834

2935
## 1. FastInterpolations microbenchmark (`microbench_mpsi.jl`)
3036

@@ -79,8 +85,8 @@ dψ/knotΔ p25/med/p75 = 0.06/0.12/0.21 **at every mpsi**. If steps were toleran
7985
dψ would be mpsi-independent; instead it halves when knot spacing halves (~6.5 accepted steps
8086
per knot interval). Two mechanisms were proposed here originally — C² knot discontinuities of the
8187
cubic spline, and node-noise amplification on fine grids. §8–§10 confirm the second exists and
82-
trace it to its source; **§11 then shows it accounts for only 11–20% of the step growth**, so
83-
neither proposed mechanism is the dominant term and the majority is still unexplained.
88+
trace it to its source; §11 and §13 show that *partial* repairs recover only 11–20% and ~2%
89+
respectively; **§14 shows that removing the noise at its source flattens the scaling entirely.**
8490

8591
## 5. Discriminators (mpsi=512)
8692

0 commit comments

Comments
 (0)