calculate and LU factorise the matrix multiplying the electrostatic potential in quasineutrality this involves the factor 1-Gamma_0(kperp(alpha))
Layouts Parameters Arrays Grids Calculations Geometry
wgts are species-dependent factors appearing in Gamma0 factor allocate gam0_ffs array, which will contain the Fourier coefficients in y of the Gamma0 factor that appears in quasineutrality Needed for adiabatic response In calculating the Fourier coefficients for Gamma_0, change loop orders so that inner loop is over ivmu super-index; this is done because we must integrate over v-space and sum over species, and we want to minimise memory usage where possible (so, e.g., aj0_alpha need only be a function of ivmu and can be over-written for each (ia,iky,ikx)). get J0 for all vpar, mu, spec values calculate the argument of the Bessel function J0 compute J0 corresponding to the given argument arg form coefficient needed to calculate 1-Gamma_0 Calculate gamma0(kalpha,alpha,...) = sum_s Zs^2 * ns / Ts int d3v (1-J0^2)*F_{Maxwellian} note that v-space Jacobian contains alpha-dependent factor, B(z,alpha), but this is not a problem as we have yet to transform from alpha to k_alpha if Boltzmann response used, account for non-flux-surface-averaged component of electron density TODO:GA-check
if kx = ky = 0, 1-Gam0 factor is zero; this leads to eqn of form 0 * phi_00 = int d3v g. hack for now is to set phi_00 = 0, as above inversion is singular. to avoid singular inversion, set gam0_alpha = 1.0 fourier transform Gamma_0(alpha) from alpha to k_alpha space allocate array to hold the Fourier coefficients fill the array with the requisite coefficients
TODO-GA: move this to adiabatic response factor Can probably delete -- need to check LU factorise array of gam0, using the LAPACK zgbtrf routine for banded matrices