Used to represent the input configuration of kt_grids_range
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | exist | = | .false. |
Does the related namelist exist in the target input file? |
|
integer, | public | :: | index | = | 0 |
Used to hold the specific index of numbered namelists |
|
logical, | public | :: | skip_read | = | .false. |
Do we want to skip the read step in init? |
|
logical, | public | :: | skip_broadcast | = | .false. |
Do we want to skip the broadcast step in init? |
|
logical, | public | :: | skip_smart_defaults | = | .false. |
Do we want to skip the smaart defaults in init? |
|
real, | public | :: | akx_max | = | 0.0 |
Max kx for periodic finite kx ballooning space runs with . |
|
real, | public | :: | akx_min | = | 0.0 |
Min kx for periodic finite kx ballooning space runs with . |
|
real, | public | :: | aky_max | = | 0.0 |
Upper limit of range. Should set to something other than zero. |
|
real, | public | :: | aky_min | = | 0.0 |
Lower limit of range. Should typically set to something other than zero. |
|
character(len=20), | public | :: | kyspacing_option | = | 'default' |
Sets the type of spacing between ky grid points, available options are :
|
|
integer, | public | :: | n0_max | = | 0 |
Maximum toroidal mode number. Can use instead of |
|
integer, | public | :: | n0_min | = | 0 |
Minimum toroidal mode number. Can use instead of |
|
integer, | public | :: | naky | = | 1 |
The number of 'actual' ky modes. |
|
integer, | public | :: | nn0 | = | 1 |
Number of toroidal modes, only used if |
|
integer, | public | :: | ntheta0 | = | 1 |
Number of (kx) modes |
|
real, | public | :: | rhostar_range | = | 1.0e-4 |
Used to convert |
|
real, | public | :: | theta0_max | = | 0.0 |
Upper limit of |
|
real, | public | :: | theta0_min | = | 0.0 |
Lower limit of |
Is this instance initialised?
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self |
Fully initialise the config object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(inout) | :: | self | |||
character(len=*), | intent(in), | optional | :: | name | ||
logical, | intent(in), | optional | :: | requires_index | ||
integer, | intent(in), | optional | :: | index | ||
logical, | intent(in), | optional | :: | skip_smart_defaults | ||
logical, | intent(in), | optional | :: | skip_read | ||
logical, | intent(in), | optional | :: | skip_broadcast |
Do some standard setup/checking
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(inout) | :: | self | |||
character(len=*), | intent(in), | optional | :: | name | ||
logical, | intent(in), | optional | :: | requires_index | ||
integer, | intent(in), | optional | :: | index |
Write the namelist header for this instance
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self | |||
integer, | intent(in) | :: | unit |
Returns the namelist name. Not very useful at the moment but may want to do more interesting things in the future
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self |
Returns the requires_index value. Allows access whilst keeping the variable private
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self |
An no-op implementation of the set_smart_defaults method. Unless over-ridden the specific config instance will have no smart defaults applied.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(inout) | :: | self |
Has to be intent in out as over-riding procedures need to change self |
Write the namelist footer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type character
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
character(len=*), | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type real
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
real, | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type complex
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
complex, | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type integer
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
integer, | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type logical
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | key | |||
logical, | intent(in) | :: | val | |||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type real array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self | |||
character(len=*), | intent(in) | :: | key | |||
real, | intent(in), | dimension(:) | :: | val | ||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type complex array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self | |||
character(len=*), | intent(in) | :: | key | |||
complex, | intent(in), | dimension(:) | :: | val | ||
integer, | intent(in) | :: | unit |
Writes a {key,val} pair where the value is of type integer array
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_config_type), | intent(in) | :: | self | |||
character(len=*), | intent(in) | :: | key | |||
integer, | intent(in), | dimension(:) | :: | val | ||
integer, | intent(in) | :: | unit |
Reads in the kt_grids_range_parameters namelist and populates the member variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(kt_grids_range_config_type), | intent(inout) | :: | self |
Writes out a namelist representing the current state of the config object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(kt_grids_range_config_type), | intent(in) | :: | self | |||
integer, | intent(in), | optional | :: | unit |
Resets the config object to the initial empty state
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(kt_grids_range_config_type), | intent(inout) | :: | self |
Broadcasts all config parameters so object is populated identically on all processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(kt_grids_range_config_type), | intent(inout) | :: | self |
Gets the default name for this namelist
Gets the default requires index for this namelist
type, extends(abstract_config_type) :: kt_grids_range_config_type
! namelist : kt_grids_range_parameters
! indexed : false
!> Max kx for periodic finite kx ballooning space runs with
!> \(\hat{s}=0\).
real :: akx_max = 0.0
!> Min kx for periodic finite kx ballooning space runs with
!> \(\hat{s}=0\).
real :: akx_min = 0.0
!> Upper limit of \(k_y \rho\) range. Should set to something other
!> than zero.
real :: aky_max = 0.0
!> Lower limit of \(k_y \rho\) range. Should typically set to
!> something other than zero.
real :: aky_min = 0.0
!> Sets the type of spacing between ky grid points, available options are :
!>
!> - 'default' : Same as 'linear'
!> - 'exponential' : Evenly spaced in log(ky).
!> - 'linear' : Evenly spaced in ky.
!>
character(len = 20) :: kyspacing_option = 'default'
!> Maximum toroidal mode number. Can use instead of `aky_max`.
integer :: n0_max = 0
!> Minimum toroidal mode number. Can use instead of `aky_min`.
integer :: n0_min = 0
!> The number of 'actual' ky modes.
integer :: naky = 1
!> Number of toroidal modes, only used if `n0_min`>0. Overrides `naky`
!> in kt_grids_range_parameters. Note if the number of modes isn't compatible
!> with the requested min and max toroidal mode numbers then we just run with
!> one mode, determined by `n0_max`.
integer :: nn0 = 1
!> Number of \(\theta_0\) (kx) modes
integer :: ntheta0 = 1
!> Used to convert `n0_min`, `n0_max` range into `aky_min`,
!> `aky_max`, if `n0_min`>0. If `n0_min` is set,
!> `aky_min=n0_min*drhodpsi*rhostar_range` and
!> `aky_max=n0_max*drhodpsi*rhostar_range` where `drhodpsi` is
!> calculated as a part of the geometry setup.
real :: rhostar_range = 1.0e-4
!> Upper limit of `theta_0` range
real :: theta0_max = 0.0
!> Lower limit of `theta_0` range
real :: theta0_min = 0.0
contains
procedure, public :: read => read_kt_grids_range_config
procedure, public :: write => write_kt_grids_range_config
procedure, public :: reset => reset_kt_grids_range_config
procedure, public :: broadcast => broadcast_kt_grids_range_config
procedure, public, nopass :: get_default_name => get_default_name_kt_grids_range_config
procedure, public, nopass :: get_default_requires_index => get_default_requires_index_kt_grids_range_config
end type kt_grids_range_config_type