get_fields_fluxtube_kxkyzlo Subroutine

private subroutine get_fields_fluxtube_kxkyzlo(g, phi, apar, bpar, dist, skip_fsa)

If we are parallelising over (kx,ky,z) then this subroutine is called This is the less common version used compared with parallelising over (vpa, mu). This is NOT the default routine for stella, and the flag must be set to use this routine. Here we calculate: sum_s int dv (J0 * g) and then call get_phi which divides this by the appropriate gamtot factor TODO-GA: remove apar from this and make it only needed for EM stella

Layouts Arrays Parameters Grids Calculations Routines from other field modules Note that this advances phi for the electrostatic, fluxtube case. If electromagnetic effects are included then phi will be advanced below First gyroaverage the distribution function g at each phase space location and store this as g0 = = J_0 g in k-space Next, integrate over velocity space and sum over species and store the result in phi, which will be further modified below to account for polarization term If we are allowing for radial variation this factor changes further If we have electromagnetic effects we need to add the terms due to A_parallel and B_parallel and also need to advance phi including electromagnetic effects

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, kxkyz_lo%llim_proc:) :: g
complex, intent(inout), dimension(:, :, -nzgrid:, :) :: phi
complex, intent(inout), dimension(:, :, -nzgrid:, :) :: apar
complex, intent(inout), dimension(:, :, -nzgrid:, :) :: bpar
character(len=*), intent(in) :: dist
logical, intent(in), optional :: skip_fsa