vmec_jax.boundary

Boundary coefficient handling.

VMEC input files specify boundary Fourier coefficients in arrays:

  • rbc(n,m), rbs(n,m)

  • zbc(n,m), zbs(n,m)

where the boundary is expanded in helical harmonics

R(θ,ζ) = Σ_{m,n} [ rbc(n,m) cos(mθ - nζ) + rbs(n,m) sin(mθ - nζ) ] Z(θ,ζ) = Σ_{m,n} [ zbc(n,m) cos(mθ - nζ) + zbs(n,m) sin(mθ - nζ) ]

This module provides helpers to map the sparse namelist assignments to dense coefficient vectors aligned with a ModeTable.

Functions

boundary_apply_vmec_m1_constraint(boundary, ...)

Apply VMEC's internal m=1 boundary constraint and return helical coeffs.

boundary_aspect_ratio(boundary, basis)

Compute aspect ratio from boundary coefficients using a precomputed basis.

boundary_aspect_ratio_from_static(boundary, ...)

Compute aspect ratio from boundary coefficients using a VMEC static config.

boundary_from_indata(indata, modes, *[, ...])

Build dense boundary coefficient vectors aligned with modes.

boundary_from_input_convention(boundary, ...)

Convert raw input-convention boundary coefficients to solver convention.

boundary_input_from_indata(indata, modes)

Build dense boundary coefficients in the raw input convention.

boundary_undo_vmec_m1_constraint(boundary, ...)

Undo VMEC's internal m=1 boundary constraint and return helical coeffs.

Classes

BoundaryCoeffs(R_cos, R_sin, Z_cos, Z_sin)

BoundaryInternalCoeffs(rbcc, rbss, rbcs, ...)

VMEC internal boundary coefficients (cos/sin of u and v).