feat: mixed Hermite-Legendre 1D Vlasov-Poisson solver (arXiv:2606.12322)#289
Open
joglekara wants to merge 3 commits into
Open
feat: mixed Hermite-Legendre 1D Vlasov-Poisson solver (arXiv:2606.12322)#289joglekara wants to merge 3 commits into
joglekara wants to merge 3 commits into
Conversation
New ADEPTModule implementing the mixed Hermite-Legendre spectral method of
Issan, Delzanno & Roytershteyn (arXiv:2606.12322) for the 1D-1V electrostatic
Vlasov-Poisson system. The electron distribution is split f = f0 + df: the
near-Maxwellian bulk f0 is expanded in the AW-Hermite basis, while the
strongly non-Maxwellian part df is expanded in the Legendre basis on a bounded
velocity window. The two are coupled one-way (highest Hermite mode -> Legendre)
and through Poisson.
Modeled structurally on BaseVlasov1D and reusing the Lawson-RK4 design of
_hermite_poisson_1d. Both free-streaming operators are symmetric-tridiagonal in
mode index, so each is integrated exactly via a prediagonalized matrix
exponential; the E-field force, the Legendre Dirichlet penalty, and the
Hermite->Legendre coupling are advanced explicitly. Space is spectral (Fourier,
periodic). An explicit integrator is used by choice (the paper's implicit
midpoint has a large memory footprint): mass and momentum are conserved to
machine precision, energy to the time-integrator order (dt-convergent).
- adept/_hermite_legendre_1d/{vector_field,modules,storage}.py + public entry
- registered as solver "hermite-legendre-1d" in _base_ dispatch and adept.__init__
- conservation constraint J_{Nh,0..2}=0 and Lenard-Bernstein artificial collisions
- configs: linear-advection, two-stream, bump-on-tail (paper parameters)
- tests: streaming/J-integral units, linear advection vs analytic, conservation
- docs: solvers/hermite_legendre_1d/config.md + quick links
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…u test
Adds to the mixed Hermite-Legendre solver:
- External longitudinal `ex` driver (ExternalExDriver), mirroring the vlasov1d /
hermite_poisson `ex` driver: a prescribed E added to the velocity-space force
(never enters Poisson), e.g. a resonant EPW kick. Saved as `de` in fields.
- IMEX integrator (grid.integrator: imex). The explicit Lawson-RK4 step blows up
once the E.d_v f Lorentz force gets stiff (operator norm ~Nl^2/width*|E| for the
Legendre block, the dominant term). IMEX keeps streaming/collisions/closure-flux
explicit and advances the Lorentz force with an unconditionally stable frozen-E
Backward-Euler substep (first-order Lie split), mirroring _spectrax1d/imex_E.py.
Two-stream then runs stably at dt=0.02 (vs explicit's 0.002), mass conserved to
~1e-12. Current impl uses a per-x dense solve; structured (bidiagonal/Woodbury)
solve noted as the large-Nx optimization.
- Driven Landau-damping test (test_landau_damping): drives a uniform Maxwellian at
the resonant (k0, w0) and measures E_x(k1) ringing -- frequency matches the
kinetic dispersion to <1%, damping to ~5-9% (finite-Nh Hermite).
- IMEX stability test (test_imex): explicit blows up at dt=0.01, IMEX stays finite
and conserves mass.
- Fix: _hermite_function_values overflowed float64 at Nh>=171 (formed 2^n n!
directly), silently zeroing the J_{Nh,m} coupling -- now a stable normalized
recurrence. Seed the t=0 field diagnostics from the actual Poisson field.
- two-stream.yaml dt 0.01 -> 0.002 (explicit CFL); add two-stream-imex.yaml.
Suite: 16 passed. Two-stream works in both explicit and IMEX; bump-on-tail (the
hardest case: asymmetric domain, weak instability, long time) still blows up near
saturation in both -- needs the implicit-midpoint path (next commit).
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
… preconditioner Adds `grid.integrator: implicit` -- the implicit-midpoint rule y1 = y0 + dt F((y0+y1)/2) solved by Jacobian-free Newton-Krylov, with the Jacobian applied as an EXACT autodiff JVP (jax.linearize) to a matrix-free GMRES (jax.scipy.sparse.linalg.gmres). The Jacobian is never assembled (memory is the state plus a few Krylov vectors), so it is the laptop-feasible method the paper uses, here realized with autodiff. Complex coefficients are carried as real (re,im) pytree leaves so the Krylov inner products are the standard real ones. Implicit midpoint is A-stable (no CFL) and conserves quadratic invariants: on two-stream it conserves mass exactly and energy to the solve tolerance (2nd order in dt), and is stable far past where explicit/IMEX die. Preconditioning (`grid.precondition: true`, default) is essential -- unpreconditioned GMRES stalls on the skew streaming spectrum and Newton then injects energy. The preconditioner M = I - dt/2(L_stream + L_force) is applied as a composition of cheap structured solves: streaming is block-diagonal in k and tridiagonal in mode (per-k tridiagonal solve); the Hermite force is lower-bidiagonal and the Legendre force is dominated by the lower-triangular derivative matrix (per-x triangular solves; the rank-2 Dirichlet penalty is left to GMRES). This takes bump-on-tail's linear-phase energy drift from 928% (unpreconditioned) to ~1e-9. Config knobs: integrator, precondition, newton_iters, gmres_restart/maxiter/tol. bump-on-tail.yaml -> integrator: implicit, precondition, dt=0.02. The bump saturation phase needs a small step for the nonlinear solve to converge (the paper uses dt=0.01); large-dt robustness at saturation is the motivation for a learned preconditioner (follow-up). test_implicit gates mass-exact / energy-conserving implicit midpoint on two-stream. Suite: 17 passed. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New ADEPTModule (
hermite-legendre-1d) implementing the mixed Hermite–Legendre spectral method of Issan, Delzanno & Roytershteyn (arXiv:2606.12322) for the 1D-1V electrostatic Vlasov–Poisson system.The electron distribution is split
f = f0 + δf:f0(near-Maxwellian bulk) → asymmetrically-weighted (AW) Hermite expansion in velocity, coeffsC_n(x,t)δf(strongly non-Maxwellian features: beams, plateaus, filamentation) → Legendre expansion on a bounded velocity window[v_a, v_b], coeffsB_m(x,t)The highest Hermite coefficient
C_{Nh-1}feeds the Legendre modes (one-way), and both feed the field through Poisson. At fixed total velocity DOFs the mixed method is more accurate than pure Hermite or pure Legendre when non-Maxwellian features are localized in velocity.Structurally modeled on
BaseVlasov1D; reuses the Lawson-RK4 design of the sibling_hermite_poisson_1d.Design notes
J_{Nh,0}=J_{Nh,1}=J_{Nh,2}=0(paper §3.4/§4) and Lenard-Bernstein artificial collisions (cubic spectrum, zero on the first three moments) are both implemented and config-exposed.What's included
adept/_hermite_legendre_1d/{vector_field,modules,storage}.py+ public entry; registered in_base_dispatch andadept.__init__configs/hermite-legendre-1d/{linear-advection,two-stream,bump-on-tail}.yaml(paper parameters)docs/source/solvers/hermite_legendre_1d/config.md+ quick linksValidation
f = f0 + δfmatches the analyticf(x−vt, v, 0)to <2% L2 before recurrence.J=0enforced): mass & momentum to ~1e-13; energy to ~1e-5 (time-integration-limited, dt-convergent).J_{Nh,m}parity matches eqns 27/29/34.uv run run.py --cfg configs/hermite-legendre-1d/linear-advectionruns throughergoExo/MLflow to completion.uv run pytest tests/test_hermite_legendre_1d→ 12 passed.Test plan
uv run pytest tests/test_hermite_legendre_1d -quv run run.py --cfg configs/hermite-legendre-1d/two-stream→ phase-space vortex (Fig 8), flat conservation diagnostics (Fig 7)🤖 Generated with Claude Code