kt_grids_range Module

Set up ranges of kx and ky for linear runs.



Contents


Variables

Type Visibility Attributes Name Initial
integer, private :: naky
integer, private :: ntheta0
integer, private :: nn0
integer, private :: n0_min
integer, private :: n0_max
real, private :: aky_min
real, private :: aky_max
real, private :: theta0_min
real, private :: theta0_max
real, private :: akx_min
real, private :: akx_max
real, private :: rhostar_range
character(len=20), private :: kyspacing_option
integer, private :: kyspacingopt_switch
logical, private :: parameters_read = .false.
logical, private :: initialized = .false.
integer, private, parameter :: kyspacingopt_linear = 1
integer, private, parameter :: kyspacingopt_exp = 2
type(kt_grids_range_config_type), private :: kt_grids_range_config

Derived Types

type, public, extends(abstract_config_type) ::  kt_grids_range_config_type

Used to represent the input configuration of kt_grids_range

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_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 :

Read more…
integer, public :: n0_max = 0

Maximum toroidal mode number. Can use instead of aky_max.

integer, public :: n0_min = 0

Minimum toroidal mode number. Can use instead of aky_min.

integer, public :: naky = 1

The number of 'actual' ky modes.

integer, public :: nn0 = 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, public :: ntheta0 = 1

Number of (kx) modes

real, public :: rhostar_range = 1.0e-4

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, public :: theta0_max = 0.0

Upper limit of theta_0 range

real, public :: theta0_min = 0.0

Lower limit of theta_0 range

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_range_config Subroutine
procedure , public :: write => write_kt_grids_range_config Subroutine
procedure , public :: reset => reset_kt_grids_range_config Subroutine
procedure , public :: broadcast => broadcast_kt_grids_range_config Subroutine
procedure , public , nopass :: get_default_name => get_default_name_kt_grids_range_config Function
procedure , public , nopass :: get_default_requires_index => get_default_requires_index_kt_grids_range_config Function

Functions

public function get_kt_grids_range_config()

Get the module level config instance

Arguments

None

Return Value type(kt_grids_range_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_range(kt_grids_range_config_in)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(kt_grids_range_config_type), intent(in), optional :: kt_grids_range_config_in

public subroutine finish_parameters_range()

FIXME : Add documentation

Arguments

None

public subroutine init_kt_grids_range(kt_grids_range_config_in)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
type(kt_grids_range_config_type), intent(in), optional :: kt_grids_range_config_in

public subroutine wnml_kt_grids_range(unit)

FIXME : Add documentation

Arguments

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

public subroutine range_get_sizes(naky_x, ntheta0_x, nx, ny)

FIXME : Add documentation

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: naky_x
integer, intent(out) :: ntheta0_x
integer, intent(out) :: nx
integer, intent(out) :: ny

public subroutine range_get_grids(aky, theta0, akx, ikx)

FIXME : Add documentation

Read more…

Arguments

Type IntentOptional Attributes Name
real, intent(out), dimension (:) :: aky
real, intent(out), dimension (:,:) :: theta0
real, intent(out), dimension (:) :: akx
integer, intent(out), dimension (:) :: ikx

Discrete kx wavenumber grid indices

public subroutine check_kt_grids_range(report_unit)

FIXME : Add documentation
DD>Calculate the kt grids

Arguments

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

public subroutine set_kt_grids_range_config(kt_grids_range_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_range_config_type), intent(in), optional :: kt_grids_range_config_in

private subroutine read_kt_grids_range_config(self)

Reads in the kt_grids_range_parameters namelist and populates the member variables

Arguments

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

private subroutine write_kt_grids_range_config(self, unit)

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

Arguments

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

private subroutine reset_kt_grids_range_config(self)

Resets the config object to the initial empty state

Arguments

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

private subroutine broadcast_kt_grids_range_config(self)

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

Arguments

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