Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real, | public, | dimension(2, 3) | :: | time_implicit_advance | = | 0. |
dist_choice indicates whether the non-Boltzmann part of the pdf (h) is evolved
in parallel streaming or if the guiding centre distribution (g =
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(inout), | dimension(:, :, -nzgrid:, :, vmu_lo%llim_proc:) | :: | g | ||
complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | phi | ||
complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | apar | ||
complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | bpar |
get_gke_rhs calculates the RHS of the GK equation. as the response matrix approach requires separate solution of the 'inhomogeneous' GKE, the homogeneous GKE (to obtain the response matrix itself), and the full GKE, which RHS is obtained depends on the input values for 'pdf', 'phi', 'apar', 'aparnew' and 'aparold'
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ivmu | |||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ie | |||
complex, | intent(in), | dimension(:) | :: | |||
complex, | intent(in), | dimension(:) | :: | phi | ||
complex, | intent(in), | dimension(:) | :: | apar | ||
complex, | intent(in), | dimension(:) | :: | aparnew | ||
complex, | intent(in), | dimension(:) | :: | aparold | ||
complex, | intent(in), | dimension(:) | :: | bpar | ||
complex, | intent(out), | dimension(:) | :: | rhs | ||
complex, | intent(in), | optional, | dimension(:) | :: | phi_ffs |
get_contributions_from_fields takes as input the appropriately averaged electrostatic potential phi and magnetic vector potential components apar and returns in rhs the sum of the source terms involving phi and apar that appear on the RHS of the GK equation when g is the pdf
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:) | :: | phi | ||
complex, | intent(in), | dimension(:) | :: | apar | ||
complex, | intent(in), | dimension(:) | :: | aparnew | ||
complex, | intent(in), | dimension(:) | :: | bpar | ||
integer, | intent(in) | :: | ivmu | |||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ie | |||
complex, | intent(out), | dimension(:) | :: | scratch | ||
complex, | intent(out), | dimension(:) | :: | rhs |
get_contributions_from_phi takes as input the appropriately averaged electrostatic potential phi and returns in rhs the sum of the source terms involving phi that appear on the RHS of the GK equation when g is the pdf
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:) | :: | phi | ||
integer, | intent(in) | :: | ivmu | |||
integer, | intent(in) | :: | iky | |||
integer, | intent(in), | dimension(:) | :: | iz_from_izext | ||
integer, | intent(in), | dimension(:) | :: | ikx_from_izext | ||
complex, | intent(out), | dimension(:) | :: | scratch | ||
complex, | intent(out), | dimension(:) | :: | rhs |
get_contributions_from_bpar takes as input the appropriately averaged electrostatic potential bpar and returns in rhs the sum of the source terms involving bpar that appear on the RHS of the GK equation when g is the pdf
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:) | :: | bpar | ||
integer, | intent(in) | :: | ivmu | |||
integer, | intent(in) | :: | iky | |||
integer, | intent(in), | dimension(:) | :: | iz_from_izext | ||
integer, | intent(in), | dimension(:) | :: | ikx_from_izext | ||
complex, | intent(out), | dimension(:) | :: | scratch | ||
complex, | intent(out), | dimension(:) | :: | rhs |
get_contributions_from_apar takes as input the appropriately averaged parallel component of the vector potential, apar, and returns in rhs the sum of the source terms involving apar that appear on the RHS of the GK equation when g is the pdf
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:) | :: | apar | ||
complex, | intent(in), | dimension(:) | :: | aparnew | ||
integer, | intent(in) | :: | ivmu | |||
integer, | intent(in) | :: | iky | |||
integer, | intent(in), | dimension(:) | :: | iz_from_izext | ||
integer, | intent(in), | dimension(:) | :: | ikx_from_izext | ||
complex, | intent(out), | dimension(:) | :: | scratch | ||
complex, | intent(inout), | dimension(:) | :: | rhs |
adds the contributions to the GKE RHS that comes from switching from
gbar^{n+1} = g^{n+1} + (Ze/T)(vpa/c)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(inout), | dimension(:) | :: | scratch2 | ||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ia | |||
integer, | intent(in) | :: | iv | |||
integer, | intent(in) | :: | imu | |||
integer, | intent(in) | :: | is | |||
integer, | intent(in) | :: | nz_ext | |||
integer, | intent(in), | dimension(:) | :: | iz_from_izext | ||
complex, | intent(inout), | dimension(:) | :: | rhs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(inout), | dimension(:) | :: | scratch | ||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ia | |||
integer, | intent(in) | :: | ivmu | |||
integer, | intent(in) | :: | iv | |||
integer, | intent(in) | :: | is | |||
integer, | intent(in) | :: | nz_ext | |||
integer, | intent(in), | dimension(:) | :: | iz_from_izext | ||
complex, | intent(inout), | dimension(:) | :: | rhs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(inout), | dimension(:) | :: | |||
complex, | intent(in), | dimension(:) | :: | apar | ||
real, | intent(in) | :: | facapar | |||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ivmu | |||
integer, | intent(in), | dimension(:) | :: | ikx_from_izext | ||
integer, | intent(in), | dimension(:) | :: | iz_from_izext |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ivmu | |||
integer, | intent(in), | dimension(:) | :: | ikx_from_izext | ||
integer, | intent(in), | dimension(:) | :: | iz_from_izext | ||
complex, | intent(in), | dimension(:) | :: | fld | ||
complex, | intent(out), | dimension(:) | :: | gyro_fld |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ivmu | |||
integer, | intent(in), | dimension(:) | :: | ikx_from_izext | ||
integer, | intent(in), | dimension(:) | :: | iz_from_izext | ||
complex, | intent(in), | dimension(:) | :: | fld | ||
complex, | intent(out), | dimension(:) | :: | gyro_fld |
get_contributions_from_pdf takes as an argument the evolved pdf
(either guiding centre distribution g=
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(:) | :: | |||
complex, | intent(in), | dimension(:) | :: | apar | ||
integer, | intent(in) | :: | ivmu | |||
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ie | |||
complex, | intent(out), | dimension(:) | :: | rhs | ||
complex, | intent(in), | optional, | dimension(:) | :: | source_ffs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | ie | |||
integer, | intent(in) | :: | it | |||
integer, | intent(in) | :: | ivmu | |||
complex, | intent(inout), | dimension(:) | :: |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(inout) | :: | iz | |||
integer, | intent(in) | :: | iv | |||
integer, | intent(in) | :: | is | |||
integer, | intent(in) | :: | sgn | |||
integer, | intent(in) | :: | iz1 | |||
integer, | intent(in) | :: | iz2 | |||
complex, | intent(in), | dimension(:) | :: | wdrift_ext | ||
complex, | intent(inout), | dimension(:) | :: |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | iky | |||
integer, | intent(in) | :: | iv | |||
integer, | intent(in) | :: | is | |||
integer, | intent(in) | :: | sgn | |||
complex, | intent(inout), | dimension(llim:) | :: | g | ||
integer, | intent(in) | :: | llim |
use the LU-decomposed response matrix and the contributions from the 'inhomogeneous' fields (phi, apar) to solve for (phi^{n+1}, apar^{n+1})
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | phi | ||
complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | apar | ||
complex, | intent(inout), | dimension(:, :, -nzgrid:, :) | :: | bpar |