Used to represent the input configuration of driver. See the documentation of the antenna module for more details.
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 | :: | amplitude | = | 0.0 |
Amplitude of Langevin antenna. |
|
logical, | public | :: | ant_off | = | .false. |
Overrides all other options and turns off antenna if |
|
integer, | public | :: | nk_stir | = | 0 |
Number of independent Fourier modes driven by antenna. |
|
logical, | public | :: | restarting | = | .false. |
If |
|
real, | public | :: | t0 | = | -1.0 |
Sets the time at which the antenna frequency changes from
constant w_antenna to linearly varying, with linear piece
proprtional to w_dot multiplied by |
|
complex, | public | :: | w_antenna | = | (1.0, 0.0) |
Frequency of Langevin antenna. Sets the constant part of the complex antenna frequency. |
|
real, | public | :: | w_dot | = | 0.0 |
Sets the coefficient in front of the time varying antenna
frequency (real) component activated when |
|
logical, | public | :: | write_antenna | = | .false. |
Write antenna amplitudes to ASCII file for debugging. |
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 driver namelist and populates the member variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(driver_config_type), | intent(inout) | :: | self |
Writes out a namelist representing the current state of the config object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(driver_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(driver_config_type), | intent(inout) | :: | self |
Broadcasts all config parameters so object is populated identically on all processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(driver_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) :: driver_config_type
! namelist : driver
! indexed : false
!> Amplitude of Langevin antenna.
real :: amplitude = 0.0
!> Overrides all other options and turns off antenna if `true`.
logical :: ant_off = .false.
!> Number of independent Fourier modes driven by antenna.
integer :: nk_stir = 0
!> If `true` then try to get initial antenna amplitudes from the
!> restart file. If not found in restart file then will be set to
!> 0.
logical :: restarting = .false.
!> Sets the time at which the antenna frequency changes from
!> constant [[driver:w_antenna]] to linearly varying, with linear piece
!> proprtional to [[driver:w_dot]] multiplied by `time - t0`.
real :: t0 = -1.0
!> Frequency of Langevin antenna. Sets the constant part of the
!> complex antenna frequency.
complex :: w_antenna = (1.0, 0.0)
!> Sets the coefficient in front of the time varying antenna
!> frequency (real) component activated when `time > t0`.
real :: w_dot = 0.0
!> Write antenna amplitudes to ASCII file for debugging.
logical :: write_antenna = .false.
contains
procedure, public :: read => read_driver_config
procedure, public :: write => write_driver_config
procedure, public :: reset => reset_driver_config
procedure, public :: broadcast => broadcast_driver_config
procedure, public, nopass :: get_default_name => get_default_name_driver_config
procedure, public, nopass :: get_default_requires_index => get_default_requires_index_driver_config
end type driver_config_type