Get em back - #89
Open
Antoinehoff wants to merge 68 commits into
Open
Conversation
Antoinehoff
added a commit
to gkeyllorg/gkeyll
that referenced
this pull request
Oct 23, 2025
…cies struct, I don't think we will add FLR to EM soon). We also add an option to the gkyl_dg_gyrokinetic updater to get an EM adder only or ES. And also add many empty kernels for the code to compile and checking the workflow. This branch is related to the gkylcas branch gkeyllorg/gkylcas#89
…associated headers.
…ernels, add_apar and add_apardot kernels. We conserve the electrostatic part of the scripts.
…ity of generating separated EM/ES kernels. This will be cleaned once the design in Gkeyll is fully decided.
…lock instance. This did not change a iota of the output kernels but better be safe than sorry. There is an error in the addapardot volume kernel I think because my first tests explode when I include it, will work on that tomorrow 🤓 have a good night folks 😘
…nd Apardot on bP instead of bC.
…or electromagnetic routines.
…d correct a few typos in comments
…at 1/area_elem_quad and the area_elem_quad/Jc_quad factor was missing in the gradA times b term. Also combine the area_elem_quad/Jc_quad factor at the end of the building of alpha_quad to avoid repeating this operation.
…lways 3 coordinates in the magnetic equilibrium but x and y may not be present.
… spurious oscillations, changes: - The new quantities like gradA x gradH are now computed using the expansion before being evaluated at nodes. This commit need to be cleaned and not all of the changes may be necessary.
…v cases are not checked yet.
…e current state of this branch is generating good kernels but a lot of them can be removed. I will need to clean this soon.
Co-authored-by: Copilot <copilot@github.com>
…radH terms. I don't see much of a difference Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Antoinehoff
marked this pull request as ready for review
June 29, 2026 22:30
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.
This PR is related to gkeyllorg/gkeyll#867 and implements the Maxima code dedicated to generating electromagnetic (EM) kernels.
aparcontribution:The
aparcontribution is related to the effective magnetic fieldVolume kernels
In the volume kernels, the contribution of the$\nabla \times \left(A_{\parallel h} \hat{ b}\right)$ term is added to the characteristics as
Flux kernels
In the flux kernels, the contribution is added following
which will be then used to compute a dot product with$\nabla H$ .$A_{\parallel h} \nabla \times \hat{ b}$ , is straightforward since we can just reuse the $\nabla \times \hat{ b}$ and multiply it by $\nabla A_{\parallel h} \times \hat{ b}$ , we evaluate the gradient of
The implementation of the first term,
dualcurlbhat_quadvariable to haveApar.For the second term,
Aparas it is done for the Hamiltonian. Then we need to compute the covariant componentsWriting the gradient of$A_{\parallel h}$ in terms of its covariant components, $\nabla A_{\parallel h} = \partial_i A_{\parallel h} e^i$ , and using $e^j \times e^k = e_i/J_c$ , we can compute the covariant components of the second term as,
We can now compute the dot product$\nabla H \cdot (\nabla \times (A_\parallel b))$ , which yields for
cdim=3apardotcontribution:The
apardotcontribution is related to the parallel electric field term\dot A_\parallelin the characteristics and is quite straightforward as it does not require any differential operator or geometric terms.