A container for the arrays that are used to store the distribution function among other things.
These need to be accessible at a lower dependency level than the dist_fn module itself. These arrays are allocated in the function dist_fn::allocate_arrays.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
complex, | public, | dimension (:,:,:), allocatable | :: | g | |||
complex, | public, | dimension (:,:,:), allocatable | :: | gnew | |||
real, | public, | dimension (:,:,:), allocatable | :: | wstar | |||
complex, | public, | dimension (:,:,:), allocatable | :: | g_work | |||
complex, | public, | dimension (:,:,:), allocatable | :: | gexp_1 | |||
complex, | public, | dimension (:,:,:), allocatable | :: | gexp_2 | |||
complex, | public, | dimension (:,:,:), allocatable | :: | gexp_3 | |||
real, | public, | dimension(:), allocatable | :: | kx_shift | |||
real, | public, | dimension(:), allocatable | :: | theta0_shift | |||
real, | public, | dimension (:,:,:), allocatable | :: | vpa | |||
real, | public, | dimension (:,:,:), allocatable | :: | vpac | |||
real, | public, | dimension (:,:,:,:,:), allocatable | :: | vpa_gf | |||
real, | public, | dimension (:,:,:,:), allocatable | :: | vperp2_gf | |||
real, | public, | dimension (:,:), allocatable | :: | vperp2 | |||
real, | public, | dimension (:,:), allocatable | :: | aj0 | |||
real, | public, | dimension (:,:), allocatable | :: | aj1 | |||
real, | public, | dimension (:,:,:,:,:), allocatable | :: | aj0_gf | |||
real, | public, | dimension (:,:,:,:,:), allocatable | :: | aj1_gf | |||
complex, | public, | dimension (:,:,:,:,:), allocatable | :: | c_rate | |||
complex, | public, | dimension (:,:,:), allocatable | :: | antot | |||
complex, | public, | dimension (:,:,:), allocatable | :: | antota | |||
complex, | public, | dimension (:,:,:), allocatable | :: | antotp | |||
complex, | public, | dimension (:,:,:), allocatable | :: | fieldeq | |||
complex, | public, | dimension (:,:,:), allocatable | :: | fieldeqa | |||
complex, | public, | dimension (:,:,:), allocatable | :: | fieldeqp | |||
type(g_adjust_direction_type), | public, | parameter | :: | to_g_gs2 | = | g_adjust_direction_type(.true.) | |
type(g_adjust_direction_type), | public, | parameter | :: | from_g_gs2 | = | g_adjust_direction_type(.false.) |
g_adjust transforms between representations of perturbed dist'n func'n.
To transform gnew from g_gs2 to g_wesson form: call g_adjust(gnew,phinew,bparnew,fphi,fbpar) or call g_adjust(gnew,phinew,bparnew, to_g_gs2 = .false.) or transform from gnew from g_wesson to g_gs2 form: call g_adjust(gnew,phinew,bparnew,-fphi,-fbpar) or call g_adjust(gnew,phinew,bparnew, to_g_gs2 = .true. ) CMR, 17/4/2012:
Transform between g_gs2 and g_wesson with direction indicated by passed floats [facphi] and [facbpar].
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(inout), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | phi | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | bpar | ||
real, | intent(in) | :: | facphi | |||
real, | intent(in) | :: | facbpar |
Transform between g_gs2 and g_wesson with direction indicated by passed logical [to_g_gs2].
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(inout), | dimension (:,:,:) | :: | g | ||
complex, | intent(in), | dimension (:,:,:) | :: | phi | ||
complex, | intent(in), | dimension (:,:,:) | :: | bpar | ||
type(g_adjust_direction_type), | intent(in) | :: | direction |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | private | :: | to_g_gs2 |
Return the offset between g and h at a specific set of indices
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ig | |||
integer, | intent(in) | :: | it | |||
integer, | intent(in) | :: | ik | |||
integer, | intent(in) | :: | ie | |||
integer, | intent(in) | :: | is | |||
integer, | intent(in) | :: | iglo | |||
real, | intent(in) | :: | facphi | |||
real, | intent(in) | :: | facbpar | |||
complex, | intent(in), | dimension(-ntgrid:, :, :) | :: | phi | ||
complex, | intent(in), | dimension(-ntgrid:, :, :) | :: | bpar |
A small helper function which constructs and returns the string
'
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | filename | |||
integer, | intent(in) | :: | line_no |
Transform between g_gs2 and g_wesson with direction indicated by passed logical [to_g_gs2].
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(inout), | dimension (:,:,:) | :: | g | ||
complex, | intent(in), | dimension (:,:,:) | :: | phi | ||
complex, | intent(in), | dimension (:,:,:) | :: | bpar | ||
type(g_adjust_direction_type), | intent(in) | :: | direction |
Transform between g_gs2 and g_wesson with direction indicated by passed floats [facphi] and [facbpar].
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(inout), | dimension (-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | phi | ||
complex, | intent(in), | dimension (-ntgrid:,:,:) | :: | bpar | ||
real, | intent(in) | :: | facphi | |||
real, | intent(in) | :: | facbpar |
This routine checks trapped particle bounce conditions: g(thetab,1:ik,it,il,ie,is)=g(thetab,2:ik,it,il,ie,is) and flags fractional errors exceeding a threshold tolerance, tol. CMR, 3/10/2013:
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(-ntgrid:,:,g_lo%llim_proc:) | :: | g | ||
integer, | intent(in) | :: | ik | |||
integer, | intent(in) | :: | it | |||
integer, | intent(in) | :: | il | |||
integer, | intent(in) | :: | ie | |||
integer, | intent(in) | :: | is | |||
real, | intent(out) | :: | err | |||
real, | intent(in), | optional | :: | tol |
Assign $g$ a value corresponding to $h$ (g_wesson of CMR's note in g_adjust) of $h = 0$ in order to be consistent with g_adjust. The correct function call to set h = 0 is call set_h_zero(g, phi, bpar, iglo)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(inout), | dimension (-ntgrid:, :, g_lo%llim_proc:) | :: | g | ||
complex, | intent(in), | dimension (-ntgrid:, :, :) | :: | phi | ||
complex, | intent(in), | dimension (-ntgrid:, :, :) | :: | bpar | ||
integer, | intent(in) | :: | iglo |
Check if the passed distribution function shaped array is non-zero in the forbidden region. If it is then trigger an abort.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(-ntgrid:, :, g_lo%llim_proc:) | :: | g_array | ||
character(len=*), | intent(in), | optional | :: | identifier |
Check if the passed distribution function shaped array has the same value at bounce points for both signs of v||. This provides similar functionality to check_g_bouncepoints but is intended to offer a quieter approach which could be used more routinely (i.e. throughout a run).
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex, | intent(in), | dimension(-ntgrid:, :, g_lo%llim_proc:) | :: | g_array | ||
character(len=*), | intent(in), | optional | :: | identifier | ||
real, | intent(in), | optional | :: | tolerance |