advance_parallel_streaming_explicit Subroutine

public subroutine advance_parallel_streaming_explicit(g, phi, bpar, gout)

if flux tube simulation parallel streaming stays in ky,kx,z space with ky,kx,z local if full flux surface (flux annulus), will need to calculate in y space start the timer for the parallel streaming part of the time advance

allocate arrays needed for intermmediate calculations if simulating a full flux surface, will also need version of the above arrays that is Fourier transformed to y-space get (iv,imu,is) indices corresponding to ivmu super-index obtain get d/dz, with z the parallel coordinate and store in dgphi_dz note that this should be a centered difference to avoid numerical unpleasantness to do with inexact cancellations in later velocity integration see appendix of the stella JCP 2019 for details

compute dg/dz in k-space and store in g0

if simulating a full flux surface, need to obtain the contribution from parallel streaming in y-space, so FFT d(g/F)/dz from ky to y get dg/dz in real space get d/dz in real space multiply d(g/F)/dz and d/dz terms with vpa*(b . grad z) and add to source (RHS of GK equation) bpar term is zero unless include_bpar = T, see if statement above. deallocate intermediate arrays used in this subroutine finish timing the subroutine

Arguments

Type IntentOptional Attributes Name
complex, intent(in), dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) :: g
complex, intent(in), dimension(:, :, -nzgrid:, :) :: phi
complex, intent(in), dimension(:, :, -nzgrid:, :) :: bpar
complex, intent(inout), dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) :: gout