Use split packages for Fokker Planck collision operator - #388
Open
mrhardman wants to merge 20 commits into
Open
Conversation
…t normalisation of collision frequency when evolving moments separately from the pdf.
…options for computing the boundary data for the Rosenbluth potentials.
…robably) due to a change in exactly how FokkerPlanck computes the dFdvpa and dFdvperp compared to the original implementation in moment_kinetics. The fact that the tests for other boundary_data_option did not require updating reduces the likelihood of a bug having been introduced.
…ent-method second derivative stiffness matrices and mass matrices.
Collaborator
Author
|
Closes #220. |
Tested with
```
julia> include("test_scripts/chebyshev_radau_test.jl")
julia> chebyshevradau_test(ngrid=17,discretization="gausslegendre_pseudospectral")
```
with output as follows.
```
f(y) = exp(-4 y) test
exact df: -4.0 num df: -3.9999975421403935 abs(err): 2.4578596065083502e-6
f(y) = exp(-y^2) test
exact df: 0.0 num df: 1.1835285762413992e-5 abs(err): 1.1835285762413992e-5
exact f[0]: 0.9997752682206045 num f[0]: 0.999775517763114 abs(err): 2.495425095450088e-7
f(y) = sin(y) test
exact df: 1.0 num df: 1.0000000000000098 abs(err): 9.769962616701378e-15
f(y) = y + y^2 + y^3 test
exact df: 1.0 num df: 1.0000000000001137 abs(err): 1.1368683772161603e-13
```
… that Lobatto and Radau points are covered by the same function.
mrhardman
marked this pull request as ready for review
August 4, 2025 10:31
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.
Attempt to use FokkerPlanck to provide the collision operator. This PR will hopefully reduce code volume in various modules without losing functionality.
The main features of this PR are to:
gauss_legendre.jlmodule for now, but other developers could now mergegauss_legendre.jlandchebyshev.jl, with some careful thought).N.B.
ngrid*ngridcores on the local node to be fully parallelised. Forngrid=5, it is easy to imagine that we could break the domain into blocks of sized ~20 core shared-memory regions and only parallelise over space.