Used to represent the input configuration of dist_fn_species. There should be one of this namelist for each species simulated.
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 | :: | bakdif | = | 0.0 |
Spatial implicitness parameter. Any value greater than 0 adds
numerical dissipation which is often necessary to avoid grid
scale oscillations. When WarningIt is possible to have different values for the different species simulated, but in a number of places we only use the value given by the first species. It is strongly recommended to use the same value for all species. TodoClarify the motivation for the electromagnetic recommendation. TodoConsider forcing this to be constant across all species. TodoConsider changing the default to the recommended value. |
|
real, | public | :: | fexpr | = | 0.4 |
Sets the real part of the temporal implicitness parameter. Any
value smaller than 0.5 adds numerical dissipation. When TodoConsider changing the default to the recommended value. |
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 |
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 dist_fn_species_knobs namelist and populates the member variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dist_fn_species_config_type), | intent(inout) | :: | self |
Writes out a namelist representing the current state of the config object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dist_fn_species_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(dist_fn_species_config_type), | intent(inout) | :: | self |
Broadcasts all config parameters so object is populated identically on all processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(dist_fn_species_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) :: dist_fn_species_config_type
! namelist : dist_fn_species_knobs
! indexed : true
!> Spatial implicitness parameter. Any value greater than 0 adds
!> numerical dissipation which is often necessary to avoid grid
!> scale oscillations. When `bakdif = 0.0` (default) we use a
!> \(2^\textrm{nd}\) order grid centered approach in the parallel
!> direction. When `bakdif = 1.0` this becomes a fully upwinded
!> method. Recommended value is 0.05 for electrostatic
!> simulations and 0.0 for electromagnetic.
!>
!>
!> @warning It is possible to have different values for the
!> different species simulated, but in a number of places we only
!> use the value given by the first species. It is strongly
!> recommended to use the same value for all species.
!>
!> @todo Clarify the motivation for the electromagnetic
!> recommendation.
!>
!> @todo Consider forcing this to be constant across all species.
!>
!> @todo Consider changing the default to the recommended value.
real :: bakdif = 0.0
!> Sets the real part of the temporal implicitness parameter. Any
!> value smaller than 0.5 adds numerical dissipation. When `fexpr
!> = 0.5` we have a \(2^\textrm{nd}\) order time centered
!> approach. If `fexpr = 0.0` this reduces to a fully implicit
!> backward Euler method. When `fexpr = 1.0` this instead becomes
!> a fully explicit forward Euler method (not recommended). The
!> recommended value is 0.48.
!>
!> @todo Consider changing the default to the recommended value.
real :: fexpr = 0.4
contains
procedure, public :: read => read_dist_fn_species_config
procedure, public :: write => write_dist_fn_species_config
procedure, public :: reset => reset_dist_fn_species_config
procedure, public :: broadcast => broadcast_dist_fn_species_config
procedure, public, nopass :: get_default_name => get_default_name_dist_fn_species_config
procedure, public, nopass :: get_default_requires_index => get_default_requires_index_dist_fn_species_config
end type dist_fn_species_config_type