Used to represent the input configuration of ballstab
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? |
|
real, | public | :: | beta_div | = | 1.0 |
The minimum in scans is
|
|
real, | public | :: | beta_mul | = | 1.0 |
The maximum in scans is
|
|
real, | public | :: | diff | = | 0.0 |
Controls decentring used in the numerical integration used for solving the ballooning equation. Recommended values are either 0 (default) or 1/3. |
|
logical, | public | :: | make_salpha | = | .false. |
Not currently used for anything. TodoConsider removing this variable |
|
integer, | public | :: | n_beta | = | 1 |
How many values should be used in s-alpha type scans. |
|
integer, | public | :: | n_shat | = | 1 |
How many values should be used in s-alpha type scans. |
|
real, | public | :: | shat_max | = | 0.0 |
The maximum value of to use in s-alpha type scans. NoteThis gets a smart default of the equilibrium value of |
|
real, | public | :: | shat_min | = | 0.0 |
The minimum value of to use in s-alpha type scans. NoteThis gets a smart default of the equilibrium value of |
|
real, | public | :: | theta0 | = | 0.0 |
The theta0 value to use in solving the ideal ballooning problem. We don't currently provide a means to study multiple theta0 in a single run. This may change in the future. |
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 |
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 |
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 ballstab_knobs namelist and populates the member variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ballstab_config_type), | intent(inout) | :: | self |
Writes out a namelist representing the current state of the config object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ballstab_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(ballstab_config_type), | intent(inout) | :: | self |
Broadcasts all config parameters so object is populated identically on all processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ballstab_config_type), | intent(inout) | :: | self |
Gets the default name for this namelist
Gets the default requires index for this namelist
Set the smart defaults for the ballstab_config_type instance
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(ballstab_config_type), | intent(inout) | :: | self |
type, extends(abstract_config_type) :: ballstab_config_type
! namelist : ballstab_knobs
! indexed : false
!> The minimum \(\beta^\prime\) in scans is
!> `beta_prime_equilibrium/beta_div`
real :: beta_div = 1.0
!> The maximum \(\beta^\prime\) in scans is
!> `beta_prime_equilibrium*beta_mul`
real :: beta_mul = 1.0
!> Controls decentring used in the numerical integration used for
!> solving the ballooning equation. Recommended values are either
!> 0 (default) or 1/3.
real :: diff = 0.0
!> Not currently used for anything.
!>
!> @todo Consider removing this variable
logical :: make_salpha = .false.
!> How many \(\beta^\prime\) values should be used in s-alpha
!> type scans.
integer :: n_beta = 1
!> How many \(\hat{s}\) values should be used in s-alpha type
!> scans.
integer :: n_shat = 1
!> The maximum value of \(\hat{s}\) to use in s-alpha type scans.
!>
!> @note This gets a smart default of the equilibrium value of \(\hat{s}\)
real :: shat_max = 0.0
!> The minimum value of \(\hat{s}\) to use in s-alpha type scans.
!>
!> @note This gets a smart default of the equilibrium value of \(\hat{s}\)
real :: shat_min = 0.0
!> The theta0 value to use in solving the ideal ballooning problem. We don't
!> currently provide a means to study multiple theta0 in a single run. This
!> may change in the future.
real :: theta0 = 0.0
contains
procedure, public :: read => read_ballstab_config
procedure, public :: write => write_ballstab_config
procedure, public :: reset => reset_ballstab_config
procedure, public :: broadcast => broadcast_ballstab_config
procedure, public, nopass :: get_default_name => get_default_name_ballstab_config
procedure, public, nopass :: get_default_requires_index => get_default_requires_index_ballstab_config
procedure :: set_smart_defaults => set_smart_defaults_local
end type ballstab_config_type