Repository navigation
Moving Hermite basis 2/5: exact moving-basis terms and the fused pump frame - #57
Open
rogeriojorge wants to merge 2 commits into
Open
rogeriojorge wants to merge 2 commits into
rogeriojorge wants to merge 2 commits into
Conversation
basis_rate_terms gives the exact closure-free coefficient rates of a moving and
rescaled basis: -(u_dot/a) sqrt(2n) C_{n-1} - (a_dot/a)[(n+1) C_n + sqrt(n(n-1)) C_{n-2}]
per axis (the n+1 is the 1/a normalization of C). uniform_acceleration returns
u_dot = (q/m)(E0 + u x B0) and the uniform field F0; Hermite_Fourier_system(F0=...)
removes that force, so the shift and the uniform force cancel identically.
simulation(frame='pump') moves each species centre this way.
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.
Adds the exact rates for a moving and rescaled basis, and an oscillating-centre (pump) frame.
basis_rate_terms. Per axis, withC = n* g/(a_x a_y a_z):-(a_dot/a)[n g_n + ...]. The +1 comes from the 1/a normalization.Pump frame.
uniform_accelerationreturnsu_dot = (q/m)(E0 + u x B0)and the uniform fieldF0.Hermite_Fourier_system(..., F0=F0)usesE - E0andu x (B - B0), so the shift and the uniform force cancel identically.simulation(frame="pump")moves each centre this way. Width changes go through the remap (PR 3/5), not a continuousa_dot.F0=None(the default) is bitwise the previous kernel.Tested SHA 39987bf. Command:
python -m pytest -q -n 2 tests. Result: 158 passed.New tests:
basis_rate_termsmatches 4th-order finite differences of exact quadrature projections of a non-Gaussian 3V f onto a moving, rescaled basis (all three axes, unequal orders) to 1e-10 relative.Stack: base
adaptive/base=integration/dark-baseline9d0982d (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.