Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow calculation of CFL frequency in surface kernels #175

Merged
merged 5 commits into from
Jul 26, 2023

Conversation

manauref
Copy link
Collaborator

This goes with gkylcas PR 22 (ammarhakim/gkylcas#22).

Currently hyper_dg and all (DG) equation objects expect the calculation of the CFL frequency to take place in the volume kernel. We wish to allow gyrokinetics to compute the CFL rate in the surface kernels instead, because we are using surface quadrature values of the CFL rate and we already evaluate quad values of alpha there. So this eliminates the need to evaluate alpha at quad nodes a second time.

I checked the relevant unit tests and they pass. I also ran VM reg tests through g2 and they all pass; GK reg tests don't pass because our time step changed, but we have a more restrictive one now.

@ammarhakim you can review if you want, but please let @JunoRavin merge

JunoRavin and others added 5 commits July 19, 2023 14:06
…L computation which is done based on *surface* values of the phase space flux. However, the evaluation of the phase space flux inside the surfaces is an extremely costly endeavor, measured at upwards of 25% of the total update for gyrokinetics in 3x2v.

Since the phase space flux has to be evaluated at surfaces anyway, we will implement a modification to hyper_dg which returns the CFL from the surface updates. This will be highly disruptive, as it will involve modification to a large percentage of our kernels (but mostly a search and replace). Basic idea implemented in hyper_dg (does not currently build)
…m the surface kernels. Return CFL frequency from GK surface kernels instead of volume. Code compiles on my mac, but haven't yet checked unit/reg tests (gkylcas d44142f304d7b0e8e9e263741250d763e537d076).
…nge (but they probably don't all check for recorrectness of kernels. Will check some g2 reg tests before PRing.
…previous commit (or maybe there hadn't been because I forgot to add new kernels) and I hadn't seen them. They are mostly related to inconsistent signatures. I made the following hack for now to get it working: L12 of zero/gkyl_dg_euler_pkpm.h I added moms, and L149-151 of zero/gkyl_dg_euler_pkpm_priv.h I added getching of moms. This may be incorrect, it's just a hack to get the system working. @JunoRavin will resolve conflicts later.
…s defined, eliminating the previous formula in favor of just taking the maximum absolute value over all quad points and left/right sides of a cell. Unfortunately it seems the time step has overall dropped by a factor of 1.5 (33%) still. Will explore a little more but wanna commit kernels for now.
@manauref manauref requested a review from JunoRavin July 26, 2023 18:03
@JunoRavin JunoRavin merged commit 99e7a29 into main Jul 26, 2023
2 checks passed
@JunoRavin JunoRavin deleted the hyper-dg-surf-cfl branch July 23, 2024 12:35
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.

2 participants