vmec_jax.vmec_constraints¶
VMEC constraint pipeline pieces (alias / gcon) for parity work.
VMEC uses a “constraint force” to maintain polar regularity and enforce internal relationships near the magnetic axis. In the VMEC2000 fixed-boundary pipeline:
totzsps produces real-space constraint-like arrays rcon, zcon
funct3d forms a scalar field
ztemp = (rcon - rcon0)*ru0 + (zcon - zcon0)*zu0
alias computes gcon from ztemp via a de-aliased spectral operator
forces uses gcon to add constraint force kernels and to form the arcon/azcon arrays passed to tomnsps.
This module ports the core of VMEC’s alias.f needed for parity diagnostics.
Notes
The overall constraint strength depends on tcon(js), which VMEC computes in bcovar.f from preconditioner-related quantities. For parity work we provide a tcon_from_tcon0_heuristic that matches VMEC’s scaling structure but does not yet reproduce the full bcovar computation.
Functions
|
Compute VMEC's gcon field from ztemp (alias.f). |
|
Compute VMEC's faccon(m) array (fixaray.f). |
|
Compute VMEC precondn diagonal outputs axd(:,1) for R/Z-like calls. |
|
Compute VMEC-like tcon(js) using the diagonal precondn pieces from bcovar.f. |
|
Compute tcon(js) from cached precondn diagonal outputs and current ru0/zu0 norms. |
|
Compute tcon(js) from a VMEC-style axisymmetric preconditioner diagonal. |
|
Heuristic tcon(js) profile (placeholder for VMEC's bcovar-derived tcon). |
Classes
|