kt_grids_single Module

Set up values of kx and ky for linear runs that use a single k_perp mode.



Contents


Variables

Type Visibility Attributes Name Initial
real, private :: akx
real, private :: aky
real, private :: theta0
real, private :: rhostar_single
integer, private :: n0
logical, private :: parameters_read = .false.
logical, private :: initialized = .false.
real, private, parameter :: default_unset_value = -12345.6789
type(kt_grids_single_config_type), private :: kt_grids_single_config

Derived Types

type, public, extends(abstract_config_type) ::  kt_grids_single_config_type

Used to represent the input configuration of kt_grids_single

Components

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 :: akx = default_unset_value

for the reference species (but recommended to set theta0 instead).

real, public :: aky = 0.4

for the reference species.

integer, public :: n0 = 0

if n0>0 use toroidal mode number to override aky and set aky=n0*drhodpsi*rhostar_single where drhodpsi is calculated as a part of the geometry setup.

real, public :: rhostar_single = 1.0e-4

Used in conjunction with n0: aky=n0*drhodpsi*rhostar_single (if n0 is set) where drhodpsi is calculated as a part of the geometry setup.

real, public :: theta0 = 0.0

is the ballooning angle, sets the point in where the radial wavenumber is zero

Type-Bound Procedures

procedure , public , :: is_initialised => is_initialised_generic Function
procedure , public , :: init => init_generic Subroutine
procedure , public , :: setup => setup_generic Subroutine
procedure , public , :: write_namelist_header Subroutine
procedure , public , :: get_name => get_name_generic Function
procedure , public , :: get_requires_index => get_requires_index_generic Function
procedure , public , nopass :: write_namelist_footer Subroutine
generic, public , :: write_key_val => write_key_val_string, write_key_val_real, write_key_val_complex, write_key_val_integer, write_key_val_logical, write_key_val_real_array, write_key_val_complex_array, write_key_val_integer_array
procedure , public :: read => read_kt_grids_single_config Subroutine
procedure , public :: write => write_kt_grids_single_config Subroutine
procedure , public :: reset => reset_kt_grids_single_config Subroutine
procedure , public :: broadcast => broadcast_kt_grids_single_config Subroutine
procedure , public , nopass :: get_default_name => get_default_name_kt_grids_single_config Function
procedure , public , nopass :: get_default_requires_index => get_default_requires_index_kt_grids_single_config Function

Functions

public function get_kt_grids_single_config()

Get the module level config instance

Arguments

None

Return Value type(kt_grids_single_config_type)

Gets the default name for this namelist

Arguments

None

Return Value character(len=CONFIG_MAX_NAME_LEN)

Gets the default requires index for this namelist

Arguments

None

Return Value logical


Subroutines

public subroutine read_parameters_single(kt_grids_single_config_in)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(kt_grids_single_config_type), intent(in), optional :: kt_grids_single_config_in

public subroutine finish_parameters_single()

FIXME : Add documentation

Arguments

None

public subroutine init_kt_grids_single(kt_grids_single_config_in)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(kt_grids_single_config_type), intent(in), optional :: kt_grids_single_config_in

public subroutine wnml_kt_grids_single(unit)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: unit

public subroutine single_get_sizes(naky, ntheta0, nx, ny)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: naky
integer, intent(out) :: ntheta0
integer, intent(out) :: nx
integer, intent(out) :: ny

public subroutine single_get_grids(aky_out, theta0_out, akx_out, ikx_out)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
real, intent(out), dimension (:) :: aky_out
real, intent(out), dimension (:,:) :: theta0_out
real, intent(out), dimension (:) :: akx_out
integer, intent(out), dimension (:) :: ikx_out

Discrete kx wavenumber grid indices

public subroutine check_kt_grids_single(report_unit)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: report_unit

public subroutine set_kt_grids_single_config(kt_grids_single_config_in)

Set the module level config type Will abort if the module has already been initialised to avoid inconsistencies.

Arguments

Type IntentOptional Attributes Name
type(kt_grids_single_config_type), intent(in), optional :: kt_grids_single_config_in

private subroutine read_kt_grids_single_config(self)

Reads in the kt_grids_single_parameters namelist and populates the member variables

Arguments

Type IntentOptional Attributes Name
class(kt_grids_single_config_type), intent(inout) :: self

private subroutine write_kt_grids_single_config(self, unit)

Writes out a namelist representing the current state of the config object

Arguments

Type IntentOptional Attributes Name
class(kt_grids_single_config_type), intent(in) :: self
integer, intent(in), optional :: unit

private subroutine reset_kt_grids_single_config(self)

Resets the config object to the initial empty state

Arguments

Type IntentOptional Attributes Name
class(kt_grids_single_config_type), intent(inout) :: self

private subroutine broadcast_kt_grids_single_config(self)

Broadcasts all config parameters so object is populated identically on all processors

Arguments

Type IntentOptional Attributes Name
class(kt_grids_single_config_type), intent(inout) :: self