Skip to content

Pass libneo's equilibrium-quality override through the config namelist - #826

Open
krystophny wants to merge 2 commits into
mainfrom
feat/allow-poor-equilibrium
Open

krystophny wants to merge 2 commits into
mainfrom
feat/allow-poor-equilibrium

Conversation

@krystophny

Copy link
Copy Markdown
Member

libneo refuses to build Boozer coordinates from a VMEC file that fails its quality check, and its config has an override, but SIMPLE calls get_boozer_coordinates() without a quality argument, so the override cannot be reached:

sfl: inconsistent equilibrium wout.nc at s = 0.9025 (rho 0.950, ns 99): eps_fb (median over rho) = 7.84E-03 > tol 1.00E-03
Override: allow_poor_equilibrium = .true. with a reason (logged and written to the output).

Two &config keys, allow_poor_equilibrium and poor_equilibrium_reason, now fill sfl_quality_config_t and are passed in both Boozer calls of init_field_can (src/field_can.f90). The reason is required; libneo logs it with the overridden status. Defaults keep the old behaviour. examples/simple_full.in and DOC/coordinates-and-fields.md list the keys.

Validation: on b6754f5 with this change (Pitagora), the Proxima 5C vacuum VMEC (eps_fb 7.8e-3), the ARIES-CS N3ARE file of Landreman, Buller and Drevlak 2022 (eps_lam 1.8e-3) and a reactor-scaled W7-X (d_fam 3.2e-5) now run 200,000-marker fast-classifier volume maps in Boozer coordinates. Each log shows sfl: OVERRIDE (reason). Trapped-marker loss within 0.15 s near s = 0.2 matches direct tracing in canonical coordinates to 2–4 percentage points for 5C and ARIES-CS. Without the keys the same inputs stop as before.

Risk tier

  • T2: local numerical logic

Golden-record impact

  • unchanged

Chris&AI

@krystophny krystophny added tier/T2 local numerical logic size/S review size up to 100 changed lines labels Nov 26, 2026
@krystophny
krystophny added this pull request to the merge queue Nov 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 26, 2026
@krystophny
krystophny added this pull request to the merge queue Nov 26, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to invalid changes in the merge commit Nov 26, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S review size up to 100 changed lines tier/T2 local numerical logic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant