inverse fourier transform coefs%fourier for several phase space points and compare with unfiltered version in alpha-space
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real, | public, | dimension(:, :, :, :), allocatable | :: | aj0x | |||
real, | public, | dimension(:, :, :, :), allocatable | :: | aj1x | |||
real, | public, | dimension(:, :), allocatable | :: | aj0v | |||
real, | public, | dimension(:, :), allocatable | :: | aj1v | |||
type(coupled_alpha_type), | public, | dimension(:, :, :, :), allocatable | :: | j0_ffs | |||
type(coupled_alpha_type), | public, | dimension(:, :, :, :), allocatable | :: | j0_B_ffs | |||
logical, | private | :: | bessinit | = | .false. | ||
type(coupled_alpha_type), | public, | dimension(:, :, :, :), allocatable | :: | j1_ffs | |||
real, | public, | dimension(:, :, :, :), allocatable | :: | j0_const | |||
real, | public, | dimension(:, :, :, :), allocatable | :: | j0_B_const | |||
real, | public, | dimension(:, :, :, :), allocatable | :: | j0max_const |
gyro_average_local takes a field at a given ky, kx, z and (vpa, mu, s) value and returns the gyro-average of that field;
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in) | :: | field | |||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ikx | |||
integer, | intent(in) | :: | iz | |||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(out) | :: | gyro_field |
if simulating a full flux surface, the alpha dependence present in kperp makes gyro-averaging non-local in k-space if simulating a flux tube, a gyro-average is local in k-space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | field | ||
integer, | intent(in) | :: | iz | |||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(out), | dimension(:, :) | :: | gyro_field |
if simulating a full flux surface, the alpha dependence present in kperp makes gyro-averaging non-local in k-space if simulating a flux tube, a gyro-average is local in k-space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | field | ||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | gyro_field |
if simulating a full flux surface, the alpha dependence present in kperp makes gyro-averaging non-local in k-space if simulating a flux tube, a gyro-average is local in k-space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | field | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | gyro_field |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:) | :: | distfn | ||
integer, | intent(in) | :: | imu | |||
integer, | intent(in) | :: | ikxkyz | |||
complex, | intent(out), | dimension(:) | :: | gyro_distfn |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | distfn | ||
integer, | intent(in) | :: | ikxkyz | |||
complex, | intent(out), | dimension(:, :) | :: | gyro_distfn |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(vmu_lo%llim_proc:) | :: | field | ||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ikx | |||
integer, | intent(in) | :: | iz | |||
complex, | intent(out), | dimension(vmu_lo%llim_proc:) | :: | gyro_field |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | field | ||
complex, | intent(out), | dimension(:, :) | :: | gyro_field | ||
type(coupled_alpha_type), | intent(in), | dimension(:, :) | :: | coefs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | field | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | gyro_field | ||
type(coupled_alpha_type), | intent(in), | dimension(:, :, -nzgrid:) | :: | coefs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | field | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | gyro_field | ||
type(coupled_alpha_type), | intent(in), | dimension(:, :, -nzgrid:, vmu_lo%llim_proc:) | :: | coefs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | dist | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | gyro_dist | ||
type(coupled_alpha_type), | intent(in), | dimension(:, :, -nzgrid:, vmu_lo%llim_proc:) | :: | coefs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(vmu_lo%llim_proc:) | :: | field | ||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ikx | |||
integer, | intent(in) | :: | iz | |||
complex, | intent(out), | dimension(vmu_lo%llim_proc:) | :: | gyro_field |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in) | :: | field | |||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ikx | |||
integer, | intent(in) | :: | iz | |||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(out) | :: | gyro_field |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | field | ||
integer, | intent(in) | :: | iz | |||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(out), | dimension(:, :) | :: | gyro_field |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | field | ||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | gyro_field |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:) | :: | distfn | ||
integer, | intent(in) | :: | imu | |||
integer, | intent(in) | :: | ikxkyz | |||
complex, | intent(out), | dimension(:) | :: | gyro_distfn |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | distfn | ||
integer, | intent(in) | :: | ikxkyz | |||
complex, | intent(out), | dimension(:, :) | :: | gyro_distfn |
if simulating a full flux surface, the alpha dependence present in kperp makes gyro-averaging non-local in k-space if simulating a flux tube, a gyro-average is local in k-space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | field | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | gyro_field |
aj0_alpha will contain J_0 as a function of k_alpha and alpha j0_B will contain J_0Bexp(-v^2) as a function of k_alpha and alpha for each value of alpha, take kperp^2 calculated on domain kx = [-kx_max, kx_max] and ky = [0, ky_max] and use symmetry to obtain kperp^2 on domain kx = [0, kx_max] and ky = [-ky_max, ky_max] this makes later convolutions involving sums over all ky more straightforward calculate the argument of the Bessel function, which depends on both alpha and k_alpha
subroutine takes a set of Fourier coefficients (ft) and returns the minimum number of coeffients that must be retained (idx) to ensure that the relative error in the total spectral energy is below a specified tolerance (tol_floor)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:) | :: | ft | ||
integer, | intent(out) | :: | idx | |||
integer, | intent(in), | optional | :: | imu | ||
integer, | intent(in), | optional | :: | iz | ||
integer, | intent(in), | optional | :: | is | ||
real, | intent(in), | optional | :: | tol_in |
gyro_average_local takes a field at a given ky, kx, z and (vpa, mu, s) value and returns the gyro-average of that field;
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in) | :: | field | |||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ikx | |||
integer, | intent(in) | :: | iz | |||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(out) | :: | gyro_field |
if simulating a full flux surface, the alpha dependence present in kperp makes gyro-averaging non-local in k-space if simulating a flux tube, a gyro-average is local in k-space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | field | ||
integer, | intent(in) | :: | iz | |||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(out), | dimension(:, :) | :: | gyro_field |
if simulating a full flux surface, the alpha dependence present in kperp makes gyro-averaging non-local in k-space if simulating a flux tube, a gyro-average is local in k-space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | field | ||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | gyro_field |
if simulating a full flux surface, the alpha dependence present in kperp makes gyro-averaging non-local in k-space if simulating a flux tube, a gyro-average is local in k-space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | field | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | gyro_field |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | field | ||
complex, | intent(out), | dimension(:, :) | :: | gyro_field | ||
type(coupled_alpha_type), | intent(in), | dimension(:, :) | :: | coefs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | field | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | gyro_field | ||
type(coupled_alpha_type), | intent(in), | dimension(:, :, -nzgrid:) | :: | coefs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | field | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | gyro_field | ||
type(coupled_alpha_type), | intent(in), | dimension(:, :, -nzgrid:, vmu_lo%llim_proc:) | :: | coefs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | dist | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | gyro_dist | ||
type(coupled_alpha_type), | intent(in), | dimension(:, :, -nzgrid:, vmu_lo%llim_proc:) | :: | coefs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:) | :: | distfn | ||
integer, | intent(in) | :: | imu | |||
integer, | intent(in) | :: | ikxkyz | |||
complex, | intent(out), | dimension(:) | :: | gyro_distfn |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | distfn | ||
integer, | intent(in) | :: | ikxkyz | |||
complex, | intent(out), | dimension(:, :) | :: | gyro_distfn |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(vmu_lo%llim_proc:) | :: | field | ||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ikx | |||
integer, | intent(in) | :: | iz | |||
complex, | intent(out), | dimension(vmu_lo%llim_proc:) | :: | gyro_field |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(vmu_lo%llim_proc:) | :: | field | ||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ikx | |||
integer, | intent(in) | :: | iz | |||
complex, | intent(out), | dimension(vmu_lo%llim_proc:) | :: | gyro_field |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in) | :: | field | |||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ikx | |||
integer, | intent(in) | :: | iz | |||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(out) | :: | gyro_field |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | field | ||
integer, | intent(in) | :: | iz | |||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(out), | dimension(:, :) | :: | gyro_field |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :) | :: | field | ||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(out), | dimension(:, :, -nzgrid:, :) | :: | gyro_field |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | distfn | ||
integer, | intent(in) | :: | ikxkyz | |||
complex, | intent(out), | dimension(:, :) | :: | gyro_distfn |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:) | :: | distfn | ||
integer, | intent(in) | :: | imu | |||
integer, | intent(in) | :: | ikxkyz | |||
complex, | intent(out), | dimension(:) | :: | gyro_distfn |
if simulating a full flux surface, the alpha dependence present in kperp makes gyro-averaging non-local in k-space if simulating a flux tube, a gyro-average is local in k-space
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | field | ||
complex, | intent(out), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | gyro_field |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gam0_ffs_type), | intent(in), | dimension(:, -nzgrid:) | :: | lu | ||
complex, | intent(inout), | dimension(:, :, -nzgrid:) | :: | solvec |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gam0_ffs_type), | intent(in) | :: | lu | |||
complex, | intent(inout), | dimension(:) | :: | solvec |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(coupled_alpha_type), | intent(in), | dimension(:, :, -nzgrid:) | :: | gam0 | ||
type(gam0_ffs_type), | intent(out), | dimension(:, -nzgrid:) | :: | lu_gam0 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:, :) | :: | gam0 | ||
type(gam0_ffs_type), | intent(out) | :: | lu_gam0 |