Skip to content

Moving Hermite basis 5/5: expose the hypercollision spectrum and order >= 2 - #60

Open
rogeriojorge wants to merge 2 commits into
adaptive/p4-triggersfrom
adaptive/p5-hypercollision
Open

rogeriojorge wants to merge 2 commits into
adaptive/p4-triggersfrom
adaptive/p5-hypercollision

Conversation

@rogeriojorge

Copy link
Copy Markdown
Member

Exposes the hypercollision closure, which is diagonal and commutes with the remap.

  • hypercollision_spectrum(Nn, Nm, Np, order=2) returns the per-mode damping of -nu * col * C. Each axis's top mode is damped at nu.
  • The spectrum is zero for n <= 2*order - 2, so every moment of total degree <= 2 is untouched for any basis centre and width.
  • order=2 is the existing default and is bitwise checked on 4 layouts.
  • order=1 (Lenard-Bernstein-like) is rejected: in a moving basis it damps momentum and energy.
  • A user collision_matrix parameter overrides the default.

Not included: a Hou-Li filter.

Tested SHA d3379cc. Command: python -m pytest -q -n 2 tests. Result: 184 passed.

New tests:

  • Spectrum values for orders 2 and 3 against factorials.
  • order=1 is rejected.
  • Collision RHS equals -nu col C exactly, and n, M_i, M_ii have exactly zero rate in shifted, anisotropic bases.

DG note for the whole stack:

  • u, a are per species and uniform in x, so the moving-basis terms, remap and closure carry over to the DG branch unchanged.
  • A Lax-Friedrichs speed must use max |u + a root(H_N)|.
  • DG energy is exact only with central fluxes.
  • Not implemented here.

Stack: base adaptive/base = integration/dark-baseline 9d0982d (main ab87385 + #48, #46, #13, #12, #9, #55, #50, #44, #18, #51). This lands on main after those foundation PRs and the earlier PRs of this stack (#56 first). Local results only (macOS, Python 3.12, JAX 0.11.2, x64); GitHub CI on this branch has not been checked yet.

hypercollision_spectrum(Nn, Nm, Np, order) returns the per-mode damping of
-nu * col * C (top mode of each axis damped at nu; zero for n <= 2*order-2), so
every moment of total degree <= 2 is untouched in any basis. order=2 is the
existing default, bitwise; order=1 is rejected. A user collision_matrix
overrides the default.
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