A module to provide utilities used in geometry calculations. Mainly to provide an abstract type used as a base for specific geometry implementations.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | EQFILE_LENGTH | = | 800 | |
integer, | public, | parameter | :: | geo_type_miller | = | 0 | |
integer, | public, | parameter | :: | geo_type_global | = | 1 | |
integer, | public, | parameter | :: | geo_type_generalized_elongation | = | 2 | |
integer, | public, | parameter | :: | geo_type_fourier_series | = | 3 | |
integer, | public, | parameter | :: | geo_type_miller_extended_harmonic | = | 4 | |
integer, | public, | parameter | :: | mxh_max_moments | = | 6 |
Maximum number of moments for the Miller Extended Harmonic equilbrium |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | geoType | |||
real, | intent(in), | optional | :: | Rmaj | ||
real, | intent(in), | optional | :: | R_geo | ||
real, | intent(in), | optional | :: | r | ||
real, | intent(in), | optional | :: | dr | ||
real, | intent(in), | optional | :: | aSurf | ||
real, | intent(in), | optional | :: | sHorz | ||
real, | intent(in), | optional | :: | sVert | ||
real, | intent(in), | optional | :: | delm | ||
real, | intent(in), | optional | :: | deln | ||
real, | intent(in), | optional | :: | delmp | ||
real, | intent(in), | optional | :: | delnp | ||
real, | intent(in), | optional | :: | thm | ||
real, | intent(in), | optional | :: | thn | ||
real, | intent(in), | optional | :: | q | ||
real, | intent(in), | optional | :: | shat | ||
integer, | intent(in), | optional | :: | nt | ||
integer, | intent(in), | optional | :: | mMode | ||
integer, | intent(in), | optional | :: | nMode | ||
integer, | intent(in), | optional | :: | n_mxh | ||
real, | intent(in), | optional, | dimension(mxh_max_moments) | :: | c_mxh | |
real, | intent(in), | optional, | dimension(mxh_max_moments) | :: | s_mxh | |
real, | intent(in), | optional, | dimension(mxh_max_moments) | :: | dc_mxh_dr | |
real, | intent(in), | optional, | dimension(mxh_max_moments) | :: | ds_mxh_dr |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | r | |||
real, | intent(in) | :: | theta |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | rp |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | pbar |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | r_in | |||
real, | intent(in) | :: | theta_in | |||
real, | intent(in), | dimension(:, :) | :: | f | ||
character(len=1), | intent(in) | :: | char |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(inout) | :: | self | |||
type(geo_input_type), | intent(in) | :: | inputs |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(inout) | :: | self |
Helper type to wrap up some flux surface specific variables for analytic equilibrium type.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real, | public | :: | Rmaj |
Flux surface major radius, , input variable: |
|||
real, | public | :: | R_geo |
Location of reference magnetic field, , input variable: |
|||
real, | public | :: | r |
Minor radius, , input variable: |
|||
real, | public | :: | dr |
Step size for radial derivatives, , input variable: |
|||
real, | public | :: | aSurf |
Minor radius of shaping surface, , input variable: |
|||
real, | public | :: | sHorz |
Horizontal Shafranov shift, , input variable: |
|||
real, | public | :: | sVert |
Vertical Shafranov shift, , input variable: |
|||
real, | public | :: | delm |
First shaping mode strength, , input variable: |
|||
real, | public | :: | deln |
Second shaping mode strength, , input variable: |
|||
real, | public | :: | delmp |
First shaping mode derivative, , input variable: |
|||
real, | public | :: | delnp |
Second shaping mode derivative, , input variable: |
|||
real, | public | :: | thm |
First shaping mode tilt angle, , input variable: |
|||
real, | public | :: | thn |
Second shaping mode tilt angle, , input variable: |
|||
real, | public | :: | q |
Safety factor, , input variable: |
|||
real, | public | :: | shat |
Magnetic shear, , input variable: |
|||
integer, | public | :: | nt |
Number of points in theta, input variable: |
|||
integer, | public | :: | geoType |
Geometry specification type, input variable: |
|||
integer, | public | :: | mMode |
The first poloidal mode number, input variable: |
|||
integer, | public | :: | nMode |
The second poloidal mode number, input variable: |
|||
integer, | public | :: | n_mxh |
Number of moments for MXH equilibrium, input variable: |
|||
real, | public, | dimension(mxh_max_moments) | :: | c_mxh |
Cosine moments for MXH equilibrium, input variable: |
||
real, | public, | dimension(mxh_max_moments) | :: | s_mxh |
Sine moments for MXH equilibrium, input variable: |
||
real, | public, | dimension(mxh_max_moments) | :: | dc_mxh_dr |
Radial derivatives of cosine moments for MXH equilibrium, input variable: |
||
real, | public, | dimension(mxh_max_moments) | :: | ds_mxh_dr |
Radial derivatives of sine moments for MXH equilibrium, input variable: |
public function new_flux_surface_type (geoType, Rmaj, R_geo, r, dr, aSurf, sHorz, sVert, delm, deln, delmp, delnp, thm, thn, q, shat, nt, mMode, nMode, n_mxh, c_mxh, s_mxh, dc_mxh_dr, ds_mxh_dr) |
A derived type used to hold the inputs to the geo initialisation routine. By encapsulating all possible inputs in this type we can avoid having to have multiple initialisation interfaces which all types have to define.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=EQFILE_LENGTH), | public | :: | eqfile | = | 'EQFILE_NOT_SET' |
Filename to read in for equilibria based on reading a file |
|
integer, | public | :: | big | = | -1 |
Upsampling factor used in efit, dfit and gs2d cases |
|
character(len=EQFILE_LENGTH), | public | :: | eqnormfile | = | ' EQNORMFILE_NOT_SET' |
File containing normalisation factors for dfit |
|
real, | public, | dimension(:), allocatable | :: | theta |
Target theta grid used for ideq |
||
type(flux_surface_type), | public | :: | surf |
Used for analytic local equiliria |
|||
real, | public | :: | thShift |
Theta shift used in analytic local equiliria |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | public, | allocatable | :: | type_name |
Name of the specific implementation |
||
logical, | public | :: | initialised | = | .false. |
Has this instance been initialised |
|
logical, | public | :: | has_full_theta_range | = | .false. |
Does this implementation have the full or half theta grid? If only half then we assume up-down symmetry and use this to set gradients etc. |
|
integer, | public | :: | nr |
Typically the number of radial and theta grid points. |
|||
integer, | public | :: | nt |
Typically the number of radial and theta grid points. |
|||
real, | public | :: | psi_0 | ||||
real, | public | :: | psi_a | ||||
real, | public | :: | B_T | ||||
real, | public | :: | beta_0 | ||||
real, | public | :: | R_mag | ||||
real, | public | :: | Z_mag | ||||
real, | public | :: | aminor | ||||
real, | public, | allocatable, dimension(:,:) | :: | R_psi |
2D map of co-ordinates to R, Z or B |
||
real, | public, | allocatable, dimension(:,:) | :: | Z_psi |
2D map of co-ordinates to R, Z or B |
||
real, | public, | allocatable, dimension(:,:) | :: | B_psi |
2D map of co-ordinates to R, Z or B |
||
real, | public, | allocatable, dimension(:,:) | :: | eqth |
2D maps of theta and eqpsi |
||
real, | public, | allocatable, dimension(:,:) | :: | eqpsi_2d |
2D maps of theta and eqpsi |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dpcart |
Minor radius gradient in cylindrical coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dtcart |
Theta gradient in cylindrical coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dbcart |
B gradient in cylindrical coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dpbish |
Minor radius gradient in Bishop coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dtbish |
Theta gradient in Bishop coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dbbish |
B gradient in Bishop coordinates |
||
real, | public, | allocatable, dimension(:) | :: | eqpsi |
Equilibrium psi (not normalised) and pressure grids |
||
real, | public, | allocatable, dimension(:) | :: | pressure |
Equilibrium psi (not normalised) and pressure grids |
||
real, | public, | allocatable, dimension(:) | :: | psi_bar |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | fp |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | qsf |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | beta |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | diam |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | rc |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
procedure , public , :: initialise Subroutine | |
procedure (read_and_set_interface) , public :: read_and_set | |
procedure (noargs_interface) , public :: finish_setup | |
procedure (noargs_interface) , public :: finalise | |
procedure (rtheta_interface) , public :: rfun | |
procedure (rtheta_interface) , public :: psi | |
procedure (rtheta_interface) , public :: zpos | |
procedure (rtheta_interface) , public :: rpos | |
procedure (rp_interface) , public :: diameter | |
procedure (rp_interface) , public :: rcenter | |
procedure (pbar_interface) , public :: betafun | |
procedure (pbar_interface) , public :: dpfun | |
procedure (pbar_interface) , public :: pfun | |
procedure (pbar_interface) , public :: qfun | |
procedure (pbar_interface) , public :: dbtori | |
procedure (pbar_interface) , public :: btori | |
procedure , public , :: gradient Subroutine | Calculate the derivative of rp w.r.t. R and Z and return the modulus sqrt(drp/dR ^ 2 + drp/dZ^2). I.e. return |grad rp|. Parameters are: - rgrid: Submodule radial grid (r_circ for EFIT, rp otherwise) - theta: grid of theta - gradf(:,1): |grad psi| - gradf(:,2): 0.0 - char: if char = 'R', return |grad pressure| instead - char: if char = 'T', then return theta gradient in bishop form - gradf(:,1): (dtheta/dZ d rp/dR - dtheta/dR drp/dZ)/ |grad rp| - gradf(:,2): (dtheta/dR d rp/dR + dtheta/dZ drp/dZ)/ |grad rp| - rp: value of rp on the flux surface where we want the grad - nth: number of theta points - ntgrid: lower index of theta array is -ntgrid |
procedure (eqitem_interface) , public :: eqitem | |
procedure , public , :: calculate_gradients Subroutine | |
procedure , public , :: rhofun => rhofun_null Function | |
procedure , public , :: derm Subroutine | |
procedure , public , :: invR Function | |
procedure , public , :: eqdbish Subroutine | |
procedure , public , :: eqdcart Subroutine | |
procedure , public , :: dealloc_common_arrays Subroutine | |
procedure , public , :: alloc_common_arrays Subroutine | |
procedure , public , :: hahm_burrell Subroutine | |
procedure , public , :: dealloc_arrays Subroutine | |
procedure , public , :: alloc_arrays Subroutine | |
procedure , public , :: alloc_special_arrays => alloc_special_arrays_null Subroutine | |
procedure , public , :: dealloc_special_arrays => dealloc_special_arrays_null Subroutine |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | public, | allocatable | :: | type_name |
Name of the specific implementation |
||
logical, | public | :: | initialised | = | .false. |
Has this instance been initialised |
|
logical, | public | :: | has_full_theta_range | = | .false. |
Does this implementation have the full or half theta grid? If only half then we assume up-down symmetry and use this to set gradients etc. |
|
integer, | public | :: | nr |
Typically the number of radial and theta grid points. |
|||
integer, | public | :: | nt |
Typically the number of radial and theta grid points. |
|||
real, | public | :: | psi_0 | ||||
real, | public | :: | psi_a | ||||
real, | public | :: | B_T | ||||
real, | public | :: | beta_0 | ||||
real, | public | :: | R_mag | ||||
real, | public | :: | Z_mag | ||||
real, | public | :: | aminor | ||||
real, | public, | allocatable, dimension(:,:) | :: | R_psi |
2D map of co-ordinates to R, Z or B |
||
real, | public, | allocatable, dimension(:,:) | :: | Z_psi |
2D map of co-ordinates to R, Z or B |
||
real, | public, | allocatable, dimension(:,:) | :: | B_psi |
2D map of co-ordinates to R, Z or B |
||
real, | public, | allocatable, dimension(:,:) | :: | eqth |
2D maps of theta and eqpsi |
||
real, | public, | allocatable, dimension(:,:) | :: | eqpsi_2d |
2D maps of theta and eqpsi |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dpcart |
Minor radius gradient in cylindrical coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dtcart |
Theta gradient in cylindrical coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dbcart |
B gradient in cylindrical coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dpbish |
Minor radius gradient in Bishop coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dtbish |
Theta gradient in Bishop coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dbbish |
B gradient in Bishop coordinates |
||
real, | public, | allocatable, dimension(:) | :: | eqpsi |
Equilibrium psi (not normalised) and pressure grids |
||
real, | public, | allocatable, dimension(:) | :: | pressure |
Equilibrium psi (not normalised) and pressure grids |
||
real, | public, | allocatable, dimension(:) | :: | psi_bar |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | fp |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | qsf |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | beta |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | diam |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | rc |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
character(len=EQFILE_LENGTH), | public | :: | filename | ||||
type(spline), | public | :: | btori_spl | ||||
type(spline), | public | :: | qsf_spl | ||||
type(spline), | public | :: | pressure_spl | ||||
type(spline), | public | :: | beta_spl | ||||
type(spline), | public | :: | diam_spl | ||||
type(spline), | public | :: | rcenter_spl |
procedure , public , :: initialise Subroutine | |
procedure (read_and_set_interface) , public :: read_and_set | |
procedure , public , :: gradient Subroutine | Calculate the derivative of rp w.r.t. R and Z and return the modulus sqrt(drp/dR ^ 2 + drp/dZ^2). I.e. return |grad rp|. Parameters are: - rgrid: Submodule radial grid (r_circ for EFIT, rp otherwise) - theta: grid of theta - gradf(:,1): |grad psi| - gradf(:,2): 0.0 - char: if char = 'R', return |grad pressure| instead - char: if char = 'T', then return theta gradient in bishop form - gradf(:,1): (dtheta/dZ d rp/dR - dtheta/dR drp/dZ)/ |grad rp| - gradf(:,2): (dtheta/dR d rp/dR + dtheta/dZ drp/dZ)/ |grad rp| - rp: value of rp on the flux surface where we want the grad - nth: number of theta points - ntgrid: lower index of theta array is -ntgrid |
procedure , public , :: calculate_gradients Subroutine | |
procedure , public , :: rhofun => rhofun_null Function | |
procedure , public , :: derm Subroutine | |
procedure , public , :: invR Function | |
procedure , public , :: eqdbish Subroutine | |
procedure , public , :: eqdcart Subroutine | |
procedure , public , :: dealloc_common_arrays Subroutine | |
procedure , public , :: alloc_common_arrays Subroutine | |
procedure , public , :: hahm_burrell Subroutine | |
procedure , public , :: dealloc_arrays Subroutine | |
procedure , public , :: alloc_arrays Subroutine | |
procedure , public , :: alloc_special_arrays => alloc_special_arrays_null Subroutine | |
procedure , public , :: dealloc_special_arrays => dealloc_special_arrays_null Subroutine | |
procedure , public , :: finalise => finalise_eqfile Subroutine | |
procedure , public , :: finish_setup => finish_setup_eqfile Subroutine | |
procedure , public , :: setup_special_splines => setup_special_splines_eqfile_null Subroutine | |
procedure , public , :: delete_special_splines => delete_special_splines_eqfile_null Subroutine | |
procedure , public , :: setup_splines => setup_splines_eqfile Subroutine | |
procedure , public , :: delete_splines => delete_splines_eqfile Subroutine | |
procedure , public , :: dbtori => dbtori_eqfile Function | |
procedure , public , :: btori => btori_eqfile Function | |
procedure , public , :: betafun => betafun_eqfile Function | |
procedure , public , :: qfun => qfun_eqfile Function | |
procedure , public , :: dpfun => dpfun_eqfile Function | |
procedure , public , :: pfun => pfun_eqfile Function | |
procedure , public , :: rcenter => rcenter_eqfile Function | |
procedure , public , :: diameter => diameter_eqfile Function | |
procedure , public , :: rfun => psi_eqfile Function | |
procedure , public , :: psi => psi_eqfile Function | |
procedure , public , :: zpos => zpos_eqfile Function | |
procedure , public , :: rpos => rpos_eqfile Function | |
procedure , public , :: eqitem => eqitem_eqfile Function |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
character(len=:), | public, | allocatable | :: | type_name |
Name of the specific implementation |
||
logical, | public | :: | initialised | = | .false. |
Has this instance been initialised |
|
logical, | public | :: | has_full_theta_range | = | .false. |
Does this implementation have the full or half theta grid? If only half then we assume up-down symmetry and use this to set gradients etc. |
|
integer, | public | :: | nr |
Typically the number of radial and theta grid points. |
|||
integer, | public | :: | nt |
Typically the number of radial and theta grid points. |
|||
real, | public | :: | psi_0 | ||||
real, | public | :: | psi_a | ||||
real, | public | :: | B_T | ||||
real, | public | :: | beta_0 | ||||
real, | public | :: | R_mag | ||||
real, | public | :: | Z_mag | ||||
real, | public | :: | aminor | ||||
real, | public, | allocatable, dimension(:,:) | :: | R_psi |
2D map of co-ordinates to R, Z or B |
||
real, | public, | allocatable, dimension(:,:) | :: | Z_psi |
2D map of co-ordinates to R, Z or B |
||
real, | public, | allocatable, dimension(:,:) | :: | B_psi |
2D map of co-ordinates to R, Z or B |
||
real, | public, | allocatable, dimension(:,:) | :: | eqth |
2D maps of theta and eqpsi |
||
real, | public, | allocatable, dimension(:,:) | :: | eqpsi_2d |
2D maps of theta and eqpsi |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dpcart |
Minor radius gradient in cylindrical coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dtcart |
Theta gradient in cylindrical coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dbcart |
B gradient in cylindrical coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dpbish |
Minor radius gradient in Bishop coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dtbish |
Theta gradient in Bishop coordinates |
||
real, | public, | allocatable, dimension (:,:,:) | :: | dbbish |
B gradient in Bishop coordinates |
||
real, | public, | allocatable, dimension(:) | :: | eqpsi |
Equilibrium psi (not normalised) and pressure grids |
||
real, | public, | allocatable, dimension(:) | :: | pressure |
Equilibrium psi (not normalised) and pressure grids |
||
real, | public, | allocatable, dimension(:) | :: | psi_bar |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | fp |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | qsf |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | beta |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | diam |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
real, | public, | allocatable, dimension(:) | :: | rc |
Normalised psi, fp, q, beta, diameter and R_centre values on grid |
||
character(len=EQFILE_LENGTH), | public | :: | filename | ||||
type(spline), | public | :: | btori_spl | ||||
type(spline), | public | :: | qsf_spl | ||||
type(spline), | public | :: | pressure_spl | ||||
type(spline), | public | :: | beta_spl | ||||
type(spline), | public | :: | diam_spl | ||||
type(spline), | public | :: | rcenter_spl | ||||
integer, | public | :: | nw | ||||
integer, | public | :: | nh | ||||
real, | public, | allocatable, dimension(:) | :: | thetab | |||
real, | public, | allocatable, dimension(:) | :: | r_bound | |||
real, | public, | allocatable, dimension(:) | :: | eq_R | |||
real, | public, | allocatable, dimension(:) | :: | eq_Z | |||
type(periodic_spline), | public | :: | rbound_spl |
procedure , public , :: initialise Subroutine | |
procedure (read_and_set_interface) , public :: read_and_set | |
procedure , public , :: gradient Subroutine | Calculate the derivative of rp w.r.t. R and Z and return the modulus sqrt(drp/dR ^ 2 + drp/dZ^2). I.e. return |grad rp|. Parameters are: - rgrid: Submodule radial grid (r_circ for EFIT, rp otherwise) - theta: grid of theta - gradf(:,1): |grad psi| - gradf(:,2): 0.0 - char: if char = 'R', return |grad pressure| instead - char: if char = 'T', then return theta gradient in bishop form - gradf(:,1): (dtheta/dZ d rp/dR - dtheta/dR drp/dZ)/ |grad rp| - gradf(:,2): (dtheta/dR d rp/dR + dtheta/dZ drp/dZ)/ |grad rp| - rp: value of rp on the flux surface where we want the grad - nth: number of theta points - ntgrid: lower index of theta array is -ntgrid |
procedure , public , :: calculate_gradients Subroutine | |
procedure , public , :: rhofun => rhofun_null Function | |
procedure , public , :: invR Function | |
procedure , public , :: eqdbish Subroutine | |
procedure , public , :: eqdcart Subroutine | |
procedure , public , :: dealloc_common_arrays Subroutine | |
procedure , public , :: alloc_common_arrays Subroutine | |
procedure , public , :: hahm_burrell Subroutine | |
procedure , public , :: dealloc_arrays Subroutine | |
procedure , public , :: alloc_arrays Subroutine | |
procedure , public , :: alloc_special_arrays => alloc_special_arrays_null Subroutine | |
procedure , public , :: dealloc_special_arrays => dealloc_special_arrays_null Subroutine | |
procedure , public , :: finalise => finalise_eqfile Subroutine | |
procedure , public , :: finish_setup => finish_setup_eqfile Subroutine | |
procedure , public , :: setup_special_splines => setup_special_splines_eqfile_null Subroutine | |
procedure , public , :: delete_special_splines => delete_special_splines_eqfile_null Subroutine | |
procedure , public , :: setup_splines => setup_splines_eqfile Subroutine | |
procedure , public , :: delete_splines => delete_splines_eqfile Subroutine | |
procedure , public , :: dbtori => dbtori_eqfile Function | |
procedure , public , :: btori => btori_eqfile Function | |
procedure , public , :: betafun => betafun_eqfile Function | |
procedure , public , :: qfun => qfun_eqfile Function | |
procedure , public , :: dpfun => dpfun_eqfile Function | |
procedure , public , :: pfun => pfun_eqfile Function | |
procedure , public , :: rcenter => rcenter_eqfile Function | |
procedure , public , :: shared_setup => shared_setup_cart Subroutine | |
procedure , public , :: zbrent Function | |
procedure , public , :: rfun Function | |
procedure , public , :: bound => bound_eqfile_cart Function | |
procedure , public , :: zpos => zpos_eqfile_cart Function | |
procedure , public , :: rpos => rpos_eqfile_cart Function | |
procedure , public , :: psi => psi_eqfile_cart Function | |
procedure , public , :: diameter => diameter_eqfile_cart Function | |
procedure , public , :: eqitem => eqitem_cart Function | |
procedure , public , :: derm => derm_cart Subroutine |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | r | |||
real, | intent(in) | :: | theta |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | pbar |
Calculates fstar which is f interpolated at the location (r,theta). Here r is the normalised poloidal flux coordinate rp (= psi_pN + psi_0N) and theta_in is theta. f is a grid of values of f as a function of psi_p,theta First we find the radial and theta indices bounding our requested point and we then interpolate within the bound rectangle.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | r_in | |||
real, | intent(in) | :: | theta_in | |||
real, | intent(in), | dimension(:,:) | :: | f | ||
character(len=1), | intent(in) | :: | char |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | pbar |
at the given normalised
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | pbar |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | pbar |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | pbar |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | pbar |
Return the diameter of the flux surface at a given major radius
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | rp |
Return the major radius of the centre of a given flux surface
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | rp |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | r | |||
real, | intent(in) | :: | theta |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | pbar |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | r | |||
real, | intent(in) | :: | theta |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | r | |||
real, | intent(in) | :: | theta |
fstar is f(R,Z) interpolated at the values (r,thetain). The parameter r is the distance to the magnetic axis.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_cart_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | r_in | |||
real, | intent(in) | :: | theta_in | |||
real, | intent(in), | dimension(:, :) | :: | f | ||
character(len=1), | intent(in) | :: | char |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | val | |||
real, | intent(in), | dimension(:) | :: | array | ||
integer, | intent(in) | :: | default |
use opposite area stencil to interpolate to point bound by [istar,istar+1] and [jstar, jstar + 1].
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension(:, :) | :: | f | ||
real, | intent(in), | dimension(:) | :: | dim_1 | ||
real, | intent(in), | dimension(:) | :: | dim_2 | ||
integer, | intent(in) | :: | istar | |||
integer, | intent(in) | :: | jstar | |||
real, | intent(in) | :: | d1 | |||
real, | intent(in) | :: | d2 |
Find the value of the major radius on the plasma boundary at given geometric theta.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_cart_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | theta |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_cart_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | r | |||
real, | intent(in) | :: | theta |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_cart_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | r | |||
real, | intent(in) | :: | theta |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_cart_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | r | |||
real, | intent(in) | :: | theta |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_cart_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | rp |
Put theta
into the range
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | theta |
Returns the distance to the magnetic axis as a function of rp (the normalised poloidal flux variable) and theta.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_cart_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | r | |||
real, | intent(in) | :: | theta |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_cart_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | x1 | |||
real, | intent(in) | :: | x2 | |||
real, | intent(in) | :: | rootval | |||
real, | intent(in) | :: | thetroot | |||
real, | intent(in) | :: | tol |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | geoType | |||
real, | intent(in), | optional | :: | Rmaj | ||
real, | intent(in), | optional | :: | R_geo | ||
real, | intent(in), | optional | :: | r | ||
real, | intent(in), | optional | :: | dr | ||
real, | intent(in), | optional | :: | aSurf | ||
real, | intent(in), | optional | :: | sHorz | ||
real, | intent(in), | optional | :: | sVert | ||
real, | intent(in), | optional | :: | delm | ||
real, | intent(in), | optional | :: | deln | ||
real, | intent(in), | optional | :: | delmp | ||
real, | intent(in), | optional | :: | delnp | ||
real, | intent(in), | optional | :: | thm | ||
real, | intent(in), | optional | :: | thn | ||
real, | intent(in), | optional | :: | q | ||
real, | intent(in), | optional | :: | shat | ||
integer, | intent(in), | optional | :: | nt | ||
integer, | intent(in), | optional | :: | mMode | ||
integer, | intent(in), | optional | :: | nMode | ||
integer, | intent(in), | optional | :: | n_mxh | ||
real, | intent(in), | optional, | dimension(mxh_max_moments) | :: | c_mxh | |
real, | intent(in), | optional, | dimension(mxh_max_moments) | :: | s_mxh | |
real, | intent(in), | optional, | dimension(mxh_max_moments) | :: | dc_mxh_dr | |
real, | intent(in), | optional, | dimension(mxh_max_moments) | :: | ds_mxh_dr |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(inout) | :: | self | |||
type(geo_input_type), | intent(in) | :: | inputs | |||
real, | intent(out) | :: | psi_0_out | |||
real, | intent(out) | :: | psi_a_out | |||
real, | intent(out) | :: | rmaj | |||
real, | intent(out) | :: | B_T0 | |||
real, | intent(out) | :: | avgrmid |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(inout) | :: | self |
Given theta, R, Z, B and psi on 2D grids calculate the index space derivatives in the two grid dimensions and use these to find gradients in cartesian and Bishop space.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(inout) | :: | self |
Converts derivatives w.r.t. (psi_index,theta_index) to derivatives
w.r.t. (R,Z). Note that dfcart(1, :, :)
is not valid
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(in) | :: | self | |||
real, | intent(in), | dimension (:,:,:) | :: | dfm |
dfm(:,:,1) is deriv w.r.t. psi_index (i.e. (df/dpsi)_theta * delta psi); dfm(:,:,2) is deriv w.r.t. theta_index |
|
real, | intent(in), | dimension (:,:,:) | :: | drm |
dfm(:,:,1) is deriv w.r.t. psi_index (i.e. (df/dpsi)_theta * delta psi); dfm(:,:,2) is deriv w.r.t. theta_index |
|
real, | intent(in), | dimension (:,:,:) | :: | dzm |
dfm(:,:,1) is deriv w.r.t. psi_index (i.e. (df/dpsi)_theta * delta psi); dfm(:,:,2) is deriv w.r.t. theta_index |
|
real, | intent(out), | dimension (:,:,:) | :: | dfcart |
dfcart(:,:,1) is deriv w.r.t. R; dfcart(:,:,2) is deriv w.r.t. Z |
Convert gradients of a function f w.r.t. R,Z into bishop form.
Note that dbish(1, :, :)
is not valid
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(in) | :: | self | |||
real, | intent(in), | dimension(:, :, :) | :: | dcart |
dcart(:,:,1) is gradient of f w.r.t. R; dcart(:,:,2) is gradient of f w.r.t. Z |
|
real, | intent(in), | dimension(:, :, :) | :: | dpcart |
dcart(:,:,1) is gradient of f w.r.t. R; dcart(:,:,2) is gradient of f w.r.t. Z |
|
real, | intent(out), | dimension(:, :, :) | :: | dbish |
dbish(:,:,1) is set to (df/dR dpsi/dR + df/dZ dpsi/dZ)/|grad psi|; dbish(:,:,2) is set to (-df/dR dpsi/dZ + df/dZ dpsi/dR)/|grad psi|. Note that in the special case where f=psi: dbish(:,:,1) is |grad psi|; dbish(:,:,2) is 0 |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(in) | :: | self | |||
real, | intent(in), | dimension (-ntm:) | :: | rgrid | ||
real, | intent(in), | dimension (-ntm:) | :: | theta | ||
real, | intent(out), | dimension (-ntm:,:) | :: | grad | ||
character(len=1), | intent(in) | :: | char | |||
real, | intent(in) | :: | rp | |||
integer, | intent(in) | :: | nth_used | |||
integer, | intent(in) | :: | ntm | |||
logical, | intent(in) | :: | use_bishop |
Calculate the derivative of f w.r.t to the radial and poloidal indexes (i.e. calculate the finite differences without dividing by delta psi and delta theta). - dfm(:,:,1) is the psi derivative - dfm(:,:,2) is the theta derivative - char specifies the periodicity in theta - 'E', 'O' mean continuous at theta = +/- pi - 'T' means a jump of 2 pi at theta = +/- pi
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(in) | :: | self | |||
real, | intent(in), | dimension(:,:) | :: | f | ||
real, | intent(out), | dimension(:,:,:) | :: | dfm | ||
character(len=1), | intent(in) | :: | char |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_geo_type), | intent(in) | :: | self | |||
real, | intent(in) | :: | a |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_geo_type), | intent(inout) | :: | self |
Calculate the derivative of f w.r.t. R, Z - dfm(:,:,1) is deriv w.r.t. R - dfm(:,:,2) is deriv w.r.t. Z
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_cart_geo_type), | intent(in) | :: | self | |||
real, | intent(in), | dimension(:,:) | :: | f | ||
real, | intent(out), | dimension(:,:,:) | :: | dfm | ||
character(len=1), | intent(in) | :: | char |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_eqfile_cart_geo_type), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | nw_in | |||
integer, | intent(in) | :: | nh_in | |||
real, | intent(in), | dimension(:) | :: | spsi_bar | ||
real, | intent(in), | dimension(:) | :: | sefit_R | ||
real, | intent(in), | dimension(:) | :: | sefit_Z | ||
real, | intent(in), | dimension(:) | :: | f | ||
real, | intent(in), | dimension(:) | :: | p | ||
real, | intent(in), | dimension(:) | :: | q | ||
real, | intent(in), | dimension(:, :) | :: | sefit_psi | ||
integer, | intent(in) | :: | nbbbs | |||
real, | intent(inout), | dimension(:) | :: | rbbbs | ||
real, | intent(inout), | dimension(:) | :: | zbbbs | ||
real, | intent(in) | :: | bcentr | |||
real, | intent(in) | :: | rleft | |||
real, | intent(in) | :: | rwid | |||
real, | intent(in) | :: | zoffset | |||
real, | intent(in) | :: | zhei | |||
integer, | intent(in) | :: | big | |||
logical, | intent(in) | :: | calc_aminor |
FIXME : Add documentation | Designed for eeq/gs2deq only
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in), | dimension(:) | :: | r | ||
real, | intent(in), | dimension(:) | :: | z | ||
real, | intent(in) | :: | Z_mag | |||
real, | intent(out) | :: | a |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(inout), | dimension(:) | :: | a | ||
real, | intent(inout), | dimension(:) | :: | b | ||
real, | intent(inout), | dimension(:) | :: | c | ||
real, | intent(inout), | dimension(:) | :: | d |