Presently we have a separate Vlasov Poisson app in the gk-g0-app_vp branch (and some sub branches). We'd like to bring this into the main Vlasov app for (at least) 2 reasons:
So it's easier to use components common to both solvers (e.g. collisions).
So that VP undergoes the same level of scrutiny as other solvers, giving users more peace of mind.
The approach to do so is as follows:
A user will indicate in the app input table (gkyl_vm) that they wish to run an electrostatic simulation with is_electrostatic, such as
Internally, the only new object we will create is a apps/vp_field.c, which handles the Poisson problem and the external potentials. The Vlasov app will choose between vm_field or vp_field based on the is_electrostatic input (default=false).
In order to not further balloon the Vlasov Maxwell solver, to avoid its accidental modification, and make the code more modular, we will create a separate rk3 stepping function for VP. This update function will be chosen based on is_electrostatic in a similar way to how we choose the operator split update (e.g. for implicit BGK), e.g.
The reason for this is that VP uses a different stepping logic than VM, and is more like that used in GK. A version of vlasov_poisson_update_ssp_rk3 already exists and has been validated in the gk-g0-app_vp branch.
The final app-related point, which has not been fully worked out, pertains field diagnostics. Certain field diagnostics like the field energy diagnostic needs to be modified. I think on the user-side we'll keep the call
So what we'll do is change the user-facing function so it actually does
app->field_calc_energy(app, tm, app->field);
and this pointer will be set to vm_field_calc_energy or vp_field_calc_energy based on is_electrostatic.
Lastly, we will separate VP from the underlying vlasov DG solver (dg_updater_vlasov), creating dg_updater_vlasov_poisson, so that its kernels and collisionless solvers are isolated for future modification without tampering with the VM solver (and its various flavors).
Much of this work is prototyped in the gk-g0-app_vp branch.
Presently we have a separate Vlasov Poisson app in the gk-g0-app_vp branch (and some sub branches). We'd like to bring this into the main Vlasov app for (at least) 2 reasons:
The approach to do so is as follows:
A user will indicate in the app input table (
gkyl_vm
) that they wish to run an electrostatic simulation withis_electrostatic
, such asgkyl_vlasov_field
) likeapps/vp_field.c
, which handles the Poisson problem and the external potentials. The Vlasov app will choose betweenvm_field
orvp_field
based on theis_electrostatic
input (default=false).update
function will be chosen based onis_electrostatic
in a similar way to how we choose the operator split update (e.g. for implicit BGK), e.g.The reason for this is that VP uses a different stepping logic than VM, and is more like that used in GK. A version of
vlasov_poisson_update_ssp_rk3
already exists and has been validated in thegk-g0-app_vp
branch.which internally calls
So what we'll do is change the user-facing function so it actually does
and this pointer will be set to
vm_field_calc_energy
orvp_field_calc_energy
based onis_electrostatic
.dg_updater_vlasov
), creatingdg_updater_vlasov_poisson
, so that its kernels and collisionless solvers are isolated for future modification without tampering with the VM solver (and its various flavors).Much of this work is prototyped in the
gk-g0-app_vp
branch.