Skip to content

Precondition midpoint Hermite streaming lines#31

Open
rogeriojorge wants to merge 1 commit into
agent/midpoint-custom-inner-productfrom
agent/midpoint-streaming-preconditioner
Open

Precondition midpoint Hermite streaming lines#31
rogeriojorge wants to merge 1 commit into
agent/midpoint-custom-inner-productfrom
agent/midpoint-streaming-preconditioner

Conversation

@rogeriojorge

@rogeriojorge rogeriojorge commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

  • add an opt-in implicit-midpoint preconditioner for collision, diffusion, and x-directed Hermite streaming
  • use SOLVAX's existing JAX-native banded LU rather than adding a SPECTRAX linear solver
  • keep electromagnetic fields unchanged and treat Hermite-shard boundaries as outer-GMRES block couplings
  • leave every solver default and tolerance unchanged

Motivation and evidence

The existing diagonal preconditioner removes collision/diffusion stiffness but not the tridiagonal free-streaming coupling in Hermite space. This change solves that physics block exactly along each local x-Hermite line.

On the four-device 513-Fourier by 256-Hermite Landau run to t=5, it reduced trajectory time from 196.015 s to 21.521 s and GMRES work from 46,015 (maximum 119 per step) to 3,144 (maximum 9). Relative energy change remained 3.83e-13; endpoint coefficient difference was 1.06e-12 relative and the final/initial field-norm ratio changed from 0.4358742732 to 0.4358742563.

On 257 by 128 Landau to t=1, runtime fell from 8.131 s to 3.462 s and GMRES work from 1,960 to 231.

This is deliberately not a replacement for the diagonal preconditioner. On 2-D 65-squared Orszag--Tang, iteration counts were unchanged and line-factorization overhead increased runtime from 5.776 s to 6.849 s. A two-stream control also confirms that callers must retain accuracy-appropriate linear tolerances; no tolerance is changed here.

Verification

  • 9 tests pass on the complete midpoint stack
  • Ruff and git diff checks pass
  • isolated source and wheel builds pass
  • the new unit test compares the complex banded solve directly with a dense midpoint operator containing drift, collision, diffusion, and both Hermite off-diagonals
  • combined species/Hermite-sharded audit runs complete with global Newton/GMRES products

Scope

This PR intentionally does not cache factors across time steps, add y/z alternating-direction solves, change midpoint defaults, or modify SOLVAX. Those extensions should be benchmarked independently.

@rogeriojorge
rogeriojorge marked this pull request as ready for review July 13, 2026 15:00
@rogeriojorge
rogeriojorge force-pushed the agent/midpoint-custom-inner-product branch from 8cf6fd0 to e42f3b8 Compare July 16, 2026 14:13
@rogeriojorge
rogeriojorge force-pushed the agent/midpoint-streaming-preconditioner branch from e14eebf to 4503cb2 Compare July 16, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant