advance_wdriftx_explicit Subroutine

private subroutine advance_wdriftx_explicit(g, phi, bpar, gout)

advance_wdriftx_explicit subroutine calculates and adds the x-component of the magnetic drift term to the RHS of the GK equation

start the timing of the x component of the magnetic drift advance

do not calculate if wdriftx terms are all zero calculate dg/dx in (ky,kx) space

calculate dbpar/dx in (ky,kx) space

assume a single flux surface is simulated transform dg/dx from k-space to y-space add vM . grad x dg/dx term to equation

Here g_scratch is in k-space that has been pre-calculated and stored get in k-space

transform d/dx from k-space to y-space add vM . grad x d/dx term to equation add vM . grad x dg/dx term to equation calculate dphi/dx in (ky,kx) space get in k-space add vM . grad x d/dx term to equation get in k-space add vM . grad x ( 4 mu d/dx ) term to equation stop the timing of the x component of the magnetic drift advance

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