vmec_jax.free_boundary_adjointΒΆ
Adjoint scaffolding for free-boundary vacuum solves.
Phase 1 intentionally keeps this module small and explicit. It validates the linear-solve differentiation contract that the production NESTOR replacement will need: solve the primal system in the forward pass and use transpose solves in the backward pass rather than differentiating through an iterative solver.
Functions
|
Solve |
|
Solve a dense mode-space vacuum system and reconstruct a grid potential. |
|
Solve a small nonlinear residual with an implicit-root adjoint. |
|
Return |
|
Solve a dense toy vacuum linear system with an implicit adjoint. |
|
Assemble and solve the dense JAX VMEC/NESTOR mode operator. |
|
Return stacked array-valued update controls for accepted trace replay. |
|
Return branch metadata for a fixed accepted free-boundary trace. |
|
Return stacked JAX-visible controls for fixed accepted trace replay. |
|
Return a scalar stacked-controller replay objective with custom VJP. |
|
Return a scalar of accepted-controller replay with a custom VJP seam. |
|
Return several accepted-controller replay scalars with one custom VJP. |
|
Validate stacked accepted-controller replay gradients by central FD. |
|
Replay fixed production traces through a JAX-visible accept controller. |
|
Validate accepted-trace replay coil gradients by central FD. |
|
Return a branch-control fingerprint for accepted free-boundary traces. |
|
Compare two accepted-trace fingerprints. |
|
Return a strict-JSON-safe accepted-trace fingerprint delta summary. |
|
Return stacked preconditioner/mode payloads for accepted replay. |
|
Return JSON-safe preconditioner-policy segment diagnostics. |
|
Return consecutive static-preconditioner-policy segments. |
|
Return profiling metadata for the fixed accepted-branch replay graph. |
|
Replay fixed accepted free-boundary traces with differentiable coils. |
|
Return stacked scalar/update controls consumed by accepted trace replay. |
|
Return stacked state/constraint controls for direct accepted replay. |
|
Return JSON-safe diagnostics for stacked step-policy segments. |
|
Return consecutive static step-policy segments for stacked replay. |
|
Report whether complete-loop FD is compatible with stacked replay AD. |
|
Replay the accepted-boundary direct-coil normal-field RMS in JAX. |
|
Replay direct-coil |
|
Replay accepted-boundary direct-coil |
|
Build static NESTOR replay data for an accepted boundary geometry. |
|
Build shape/static NESTOR replay data for accepted-boundary replay. |
|
Run a direct-coil free-boundary solve and return accepted traces. |
|
Return a scalar fixed-trace objective with an explicit custom VJP seam. |
|
Validate projected-mode fixed-point coil gradients by central FD. |
|
Solve a small direct-coil free-boundary fixed-point validation loop. |
|
Return a scalar objective for the projected-mode fixed-point helper. |
|
Return a production-forward branch-local scalar value and gradient. |
|
Return production-forward branch-local values and a scalar Jacobian. |
|
Return same-branch complete-solve finite-difference diagnostics. |
|
Compare a branch-local scalar custom VJP with complete-solve FD. |
|
Batch same-branch custom-VJP reports for several replay scalars. |
|
Return a reviewer-facing same-branch physical-scalar promotion gate. |
|
Return the branch gate for promoting a fixed-trace replay derivative. |
|
Return diagnostics for fixed accepted-trace free-boundary replay. |
|
Synthesize accepted free-boundary geometry through JAX. |
|
Build the VMEC/NESTOR mode matrix from Green-function mode samples. |
|
Project a VMEC/NESTOR grid source into mode-space RHS coefficients. |
|
JAX version of the VMEC boundary-field projection scaffold. |
|
JAX replay of VMEC vacuum channels from NESTOR mode coefficients. |
|
JAX VMEC/NESTOR analytic singular-source terms from |
|
JAX VMEC/NESTOR nonsingular Green-function source/matrix assembly. |
|
JAX version of VMEC/NESTOR source symmetrization. |