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
Extend the booz_xform -> Boozer chartmap -> SIMPLE test so the generated file is checked through the production libneo coordinate object, not only through raw Python interpolation, field values, and an ensemble orbit result.
Those checks can all pass while chartmap_coordinate_system_t%from_cyl fails an exact point generated by the same coordinate object's forward map. The failure was reproduced on SIMPLE ba581b6fac127cc5e99415f6658952a5bfffa24c with libneo e451e0a42f5228d85b0479de40aa35db8b48239d, using a 256 x 384 x 320 endpoint-excluded Boozer chartmap. It occurs with one map object and is unchanged by load_boozer_from_chartmap, so the converter output needs an explicit runtime coordinate-contract test even after the libneo solver is fixed.
Implementation scope
Primary files:
test/tests/test_booz_xform_chartmap.py;
a small Fortran probe under test/tests/ linked to simple, or an existing roundtrip executable extended to load the converted file;
test/tests/CMakeLists.txt.
Use the public QA reactor-scale equilibrium already downloaded by test_booz_xform_chartmap.py. Generate the chartmap with tools/booz_xform_to_boozer_chartmap.py, construct both the production Boozer field and the libneo chartmap coordinate object, and evaluate deterministic points in one field period.
Required checks
Raw file versus runtime forward map
Evaluate x, y, and z from the NetCDF grid with an independent interpolator.
Evaluate the same (rho, theta_B, zeta_B) through make_chartmap_coordinate_system.
Check positions in centimetres at grid nodes and off-grid points, including the angular seams.
Runtime inverse contract
For each runtime forward position, call from_cart or from_cyl.
Require success, the original radial label, periodic-angle equivalence, and a scale-aware Cartesian residual.
Include toroidal inputs shifted by several field periods.
Construction-order independence
Repeat representative forward and inverse points before and after load_boozer_from_chartmap.
Require identical coordinate results. This guards against a future shared-state regression without asserting that the current failure has that cause.
Start-coordinate validation
Convert a small VMEC start set to chartmap coordinates.
Require unchanged speed and pitch, correct rho=sqrt(s), successful forward geometry, and a bounded physical-position residual.
Treat a nonzero inverse status or a radial-label mismatch as a failed conversion, not as a usable point.
Positive and negative cases
Positive: interior points from rho=0.1 through 0.95, including rho=0.5, roundtrip successfully.
Positive: both an endpoint-excluded converter file and SIMPLE's internal export satisfy the same runtime contract.
Negative: a fixture with a wrong radial convention, transposed geometry dimensions, or invalid periodic extent is rejected before tracing.
Negative: an outside-volume target returns an explicit failure and is never normalized into the interior ensemble.
Verification
fo test test_booz_xform_chartmap
fo test test_boozer_chartmap_roundtrip
fo
Goal
Extend the
booz_xform -> Boozer chartmap -> SIMPLEtest so the generated file is checked through the production libneo coordinate object, not only through raw Python interpolation, field values, and an ensemble orbit result.This is the downstream regression for itpplasma/libneo#395.
Why this is needed
test/tests/test_booz_xform_chartmap.pyalready checks:Bmod;Those checks can all pass while
chartmap_coordinate_system_t%from_cylfails an exact point generated by the same coordinate object's forward map. The failure was reproduced on SIMPLEba581b6fac127cc5e99415f6658952a5bfffa24cwith libneoe451e0a42f5228d85b0479de40aa35db8b48239d, using a256 x 384 x 320endpoint-excluded Boozer chartmap. It occurs with one map object and is unchanged byload_boozer_from_chartmap, so the converter output needs an explicit runtime coordinate-contract test even after the libneo solver is fixed.Implementation scope
Primary files:
test/tests/test_booz_xform_chartmap.py;test/tests/linked tosimple, or an existing roundtrip executable extended to load the converted file;test/tests/CMakeLists.txt.Use the public QA reactor-scale equilibrium already downloaded by
test_booz_xform_chartmap.py. Generate the chartmap withtools/booz_xform_to_boozer_chartmap.py, construct both the production Boozer field and the libneo chartmap coordinate object, and evaluate deterministic points in one field period.Required checks
Raw file versus runtime forward map
x,y, andzfrom the NetCDF grid with an independent interpolator.(rho, theta_B, zeta_B)throughmake_chartmap_coordinate_system.Runtime inverse contract
from_cartorfrom_cyl.Construction-order independence
load_boozer_from_chartmap.Start-coordinate validation
rho=sqrt(s), successful forward geometry, and a bounded physical-position residual.Positive and negative cases
rho=0.1through0.95, includingrho=0.5, roundtrip successfully.Verification
Non-goals and dependency
256 x 384 x 320grid when sufficient memory is available.