Repository navigation
Use eigh for the upwind flux splitting of the streaming matrices - #74
Benjamin-Herfray wants to merge 1 commit into
Conversation
The Hermite streaming matrices A_x, A_y, A_z (and the Maxwell flux matrices R) are real symmetric, so split them into positive- and negative-eigenvalue parts with jnp.linalg.eigh instead of a general eig. eigh returns orthonormal eigenvectors and runs on CPU and GPU backends; the central/upwind choices are unchanged. Adds split_flux_matrix and tests of symmetry, A_p + A_m = A, sign definiteness and agreement with the previous eig construction.
|
Profiled the #74-#80 stack with 1, 2 and 4 emulated devices; details on #78. This one looks fine: eigh is the right choice (orthonormal, runs on GPU) and the flux split is exact. Needed: a test that differentiates through |
|
@Benjamin-Herfray, handing the DG work over to you. Here is the state as of 2026-10-26, from merging each PR into its base and running the suite on jax 0.12.0.1. The chain: #74 → #75 → #76 → #77 → #78 → #79 → #80, then #87 on top, which has the
The merge order within the DG branch is yours to decide. I won't push to these branches unless you ask. |
Part 1 of 7 of multi-device (spatial + species) execution for the DG solver. The PRs are stacked; merge them in order. This one targets
Discontinuous-Galerkin.The Hermite streaming matrices A_x, A_y, A_z and the Maxwell flux matrices R are real symmetric. They are now split into positive- and negative-eigenvalue parts with
jnp.linalg.eigh(new helpersplit_flux_matrix) instead of a generaleig.eighgives orthonormal eigenvectors and runs on CPU and GPU backends. The central/upwind choices are unchanged.Tests:
tests/test_parallel.pychecks symmetry,A_p + A_m = A, sign definiteness and agreement with the previouseigconstruction. The full test suite passes (7 tests).