Parallelise kinetic electron preconditioner solve using static condensation - #326
Parallelise kinetic electron preconditioner solve using static condensation#326johnomotani wants to merge 10 commits into
Conversation
Probably always want this piece of logic applied, so move outside to avoid duplicated code.
When the `include_qpar_integral=true` flag was passed, previously a couple of terms that included an integral contribution were missed.
The useful part of these terms in a w_parallel integral contribution - the other included just for completeness should generally not contribute because it is proportaional to the error in the moment constraints, and the Jacobian is evaluated (for use as a preconditioner) at times when the constraints should be exactly satisfied numerically. The integral contribution couples all ponits in w_parallel, so is not compatible with splitting up the w_parallel dimension when decomposing the preconditioner matrix for a 'static condensation' solve, so it is useful to be able to remove these terms.
This may be faster because it makes the preconditioner matrix significantly more sparse (although it is then a slightly less accurate inverse of the full Jacobian), and also provides a useful comparison point for benchmarking the 'static condensation' preconditioner.
Introduces a Schur complement solver to split pdf matrix inversion from ppar matrix inversion in kinetic electron preconditioner.
Using MPIStaticCondensation.jl package (thanks to @jwscook!).
Temporary hack until we implement a better workaround for integral terms that seem to be necessary for convergence but make preconditioner matrix less sparse (because it is densely coupled in w_parallel).
|
Current status with this branch at fbacfc8, johnomotani/MPISchurComplements.jl@4559277, johnomotani/MPIStaticCondensation.jl@90456cc:
InstallationAt the moment, until the MPISchurComplements.jl and MPIStaticCondensation.jl packages are registered, you will need to clone those repos and and follow through the prompts as usual to set up moment_kinetics. |
|
It is expected that all the CI tests fail at the moment, because the MPISchurComplements.jl and MPIStaticCondensation.jl packages are not registered, and in anticipation that they will be eventually we have not put special setup in the Github Actions config files to install them. |
Work in progress - parallelises preconditioner solve by:
Todo: