Elliptic API

Spectral Fourier–Helmholtz elliptic solve.

Solves a separable elliptic problem of Helmholtz type on a periodic z axis and a bounded x axis by Fourier-transforming in z (turning the periodic Laplacian into a per-mode -k_z^2 multiplier) and solving the remaining tridiagonal system in x for every Fourier mode at once. This is the lap phi = rhs inversion used by reduced drift-plane / vorticity models, where the operator is d/dx(g11 d/dx) + g33 d^2/dz^2 with metric weights g11(x), g33(x).

All routines are pure JAX (jit/grad/vmap transparent). Build the operator once for a fixed geometry with build_fourier_helmholtz_operator() and reuse it across right-hand sides with solve_fourier_helmholtz().

class solvax.elliptic.FourierHelmholtzOperator(lower_diagonals, diagonals, upper_diagonals, rhs_scale, nz, zlength)

Per-mode complex tridiagonal factors of the Fourier–Helmholtz operator.

Parameters:
solvax.elliptic.build_fourier_helmholtz_operator(*, dx, dz, g11, g33, rhs_scale, nz)

Assemble the per-mode tridiagonal operator for a fixed (g11, g33) geometry.

dx, g11, g33, rhs_scale are length-nx arrays along the bounded x axis; dz sets the periodic z spacing and nz its length. The x boundaries use a reflected (homogeneous-Neumann-like) closure consistent with the reduced drift-plane potential solve.

Parameters:
Return type:

FourierHelmholtzOperator

solvax.elliptic.solve_fourier_helmholtz(rhs, *, operator, method='thomas')

Solve operator @ solution = rhs for a real (nx, nz) right-hand side.

Each Fourier mode is a complex tridiagonal system in the bounded x axis; all modes are solved in one call via solvax.tridiagonal.tridiagonal_solve() with the x axis leading and the mode index batched. method selects the tridiagonal backend and defaults to "thomas" (pure lax.scan), which is complex-safe on every supported JAX version; pass "auto"/"lax" to use the fused kernel where the JAX build supports complex tridiagonal solves.

Parameters:
Return type:

Array