Closed JunoRavin closed 4 months ago
Generally I'm very happy with these modifications - my principal concern regards the changes to the handling of sources, and how these changes interact with (or, at the very least, inform) our plans for sources in moments and other places, especially in light of plans for the multi-block infrastructure. I very much like the use of an update_func
function pointer as part of the input app for selecting which source solver to use, and I believe that, unless we have a good reason not to, something very much like this is how we should handle source solver selection across the rest of the code.
But it seems to me, unless I'm missing something, that our choice of implicit, semi-implicit, or fully explicit (SSP RK-3 or similar) source solver should essentially be independent of our choice of splitting (1st order, 2nd order Strang, etc.). It's arguable that we should really be having two function pointers (e.g. update_func
, which contains a pointer to the basic integrator(s), and split_func
, which assembles those integrators together in some arbitrary way on each time-step). Looking ahead to the multi-block infrastructure, we probably want individual child blocks to have pointers to individual integrators (including the hyperbolic time-stepper, etc.), which the parent block can then decide (based on a function pointer of its own) how to assemble together into a single forward time-step across the entire domain, so as to facilitate situations like "each child block takes a hyperbolic time-step separately, then apply a forward-Euler step across the entire block domain", etc., which would not be possible within the current design.
I don't think that any immediate modification to the code in the dg_10m
branch is required, but this new (provisional) design should probably be borne in mind when making any further changes to, or developing any further infrastructure upon, the current source solver(s).
Comments about Strang splitting:
One confusion we are creating is that the wave-prop in general does not work on GPUs. Perhaps having only specific equations working on GPUs is fine, though, as long as all functions on an eqn that takes use_gpu are really on the GPU, and not only 1.
Going forward it is best to the DR first, specially for such changes.
@JunoRavin please submit the PR for the branch.
Design review merged with https://github.com/ammarhakim/gkylzero/pull/429
A number of extensions to the Vlasov and PKPM system have been explored in the https://github.com/ammarhakim/gkylzero/tree/dg_10m branch that have yielded new functionality and improvements to robustness and are ready for design review.
The new features are:
To accomplish these new features the following refactorings have been performed:
As part of this design exploration a number of things were tried that it is worth noting what worked better or worse:
so that when the ten moment primitive variable solve is called that divides by rho or subtracts the Reynolds stress, what is returned to me is exactly the evaluation of the primitive variable at that quadrature point.