vmec_jax.external_fields.mgrid_jaxΒΆ

Differentiable JAX interpolation for VMEC mgrid fields.

This backend is a compatibility layer for VMEC2000-style mgrid data. It is not intended to replace direct coil fields for single-stage optimization, but it provides differentiable tests with respect to field values, external-current weights, and evaluation coordinates away from grid-cell boundaries.

Functions

interpolate_mgrid_bfield_jax(br, bphi, bz, ...)

Trilinearly interpolate mgrid cylindrical field components.

sample_mgrid_field_cylindrical(params, R, Z, phi)

Sample an MGridFieldParams instance at cylindrical coordinates.