Set up the perpendicular wavenumbers by calling the appropriate sub-modules.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public, | dimension(:,:), allocatable | :: | kwork_filter | |||
integer, | public, | dimension(:,:), allocatable | :: | itleft | |||
integer, | public, | dimension(:,:), allocatable | :: | itright | |||
integer, | public, | dimension(:,:), allocatable | :: | l_links | |||
integer, | public, | dimension(:,:), allocatable | :: | r_links | |||
integer, | public, | dimension(:,:,:), allocatable | :: | n_links | |||
integer, | public, | dimension(:, :), allocatable | :: | supercell_labels |
Labels the supercells as a function of {it, ik}. Primarily to help with post-processing, although can also help with conversion from flux tube to ballooning space. This probably really belongs in kt_grids, but placing here alongside related itleft, itright etc. |
||
integer, | public, | dimension(:), allocatable | :: | n_supercells |
Records the number of unique supercells for each ky, |
||
integer, | public, | dimension(:, :), allocatable | :: | n_cells |
Records the number of cells which are members of the supercell which owns the particular {it, ik} point. One would expect this to be equivalent to l_links + r_links + 1. |
||
real, | public, | dimension (:,:,:), allocatable | :: | kperp2 | |||
real, | public, | dimension (:,:,:), allocatable | :: | inv_kperp2 | |||
real, | public, | dimension (:,:), allocatable | :: | theta0 |
The grid |
||
real, | public, | dimension (:), allocatable | :: | akx |
The grid |
||
real, | public, | dimension (:), allocatable | :: | aky |
The grid |
||
integer, | public, | dimension(:), allocatable | :: | ikx |
Discrete kx grid index |
||
integer, | public | :: | naky |
Number of points |
|||
integer, | public | :: | ntheta0 |
Number of points |
|||
integer, | public | :: | nx |
Number of (real space) points |
|||
integer, | public | :: | ny |
Number of (real space) points |
|||
integer, | public | :: | jtwist |
Related to the box size in x. See jtwist |
|||
character(len=20), | private | :: | grid_option |
The type of perpendicular wavenumber grid used. See grid_option |
|||
real, | private | :: | rhostar |
The rhostar ( |
|||
integer, | private | :: | gridopt_switch | ||||
integer, | private, | parameter | :: | gridopt_single | = | 1 | |
integer, | private, | parameter | :: | gridopt_range | = | 2 | |
integer, | private, | parameter | :: | gridopt_specified | = | 3 | |
integer, | private, | parameter | :: | gridopt_box | = | 4 | |
logical, | public | :: | enforce_reality | = | .false. | ||
logical, | public | :: | is_box | = | .false. | ||
logical, | private | :: | initialized | = | .false. | ||
logical, | private | :: | kp2init | = | .false. | ||
type(kt_grids_config_type), | private | :: | kt_grids_config |
Used to represent the input configuration of kt_grids
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? |
|
character(len=20), | public | :: | grid_option | = | "default" |
Controls the type of perpendicular wavenumber grid to use. Can be one of |
|
real, | public | :: | rhostar | = | 1.0e-4 |
The rhostar ( |
Compute the spacing in kx indices between connected kx domains (cells) for the lowest non-zonal ky.
Helper function for finding the leftmost it of supercell
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | it | |||
integer, | intent(in) | :: | ik |
Helper function for finding the rightmost it of supercell
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | it | |||
integer, | intent(in) | :: | ik |
Gets the default name for this namelist
Gets the default requires index for this namelist
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(kt_grids_config_type), | intent(in), | optional | :: | kt_grids_config_in | ||
type(kt_grids_single_config_type), | intent(in), | optional | :: | kt_grids_single_config_in | ||
type(kt_grids_range_config_type), | intent(in), | optional | :: | kt_grids_range_config_in | ||
type(kt_grids_specified_config_type), | intent(in), | optional | :: | kt_grids_specified_config_in | ||
type(kt_grids_specified_element_config_type), | intent(in), | optional, | dimension(:) | :: | kt_grids_specified_element_config_in | |
type(kt_grids_box_config_type), | intent(in), | optional | :: | kt_grids_box_config_in |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(kt_grids_config_type), | intent(in), | optional | :: | kt_grids_config_in |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | unit |
FIXME : Add documentation
FIXME : Add documentation
For the passed jshift0 value determine the it (kx) indices to the left and right of each {it, ik} index pair. Used to construct the connected boundary conditions.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | jshift0 | |||
integer, | intent(out), | dimension(:, :) | :: | itleft | ||
integer, | intent(out), | dimension(:, :) | :: | itright |
Count how many links are to the left/right of each {it,ik} point
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(:, :) | :: | it_connections | ||
integer, | intent(out), | dimension(:, :) | :: | links |
Links is the number of links to the left or right |
Count the links to the left and right of each {it, ik} point and work out how many values are required to set the bc.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in), | dimension(:, :) | :: | itleft | ||
integer, | intent(in), | dimension(:, :) | :: | itright | ||
integer, | intent(out), | dimension(:, :) | :: | l_links | ||
integer, | intent(out), | dimension(:, :) | :: | r_links | ||
integer, | intent(out), | dimension(:, :, :) | :: | n_links |
Assigns a label to each {it, ik} point denoting which unique supercell the point belongs to.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(out), | dimension(:, :) | :: | supercell_labels | ||
integer, | intent(out), | dimension(:) | :: | n_supercells | ||
integer, | intent(out), | dimension(:, :) | :: | n_cells |
Extracts the field like data corresponding to the supercell with the {it, ik} wavenumber pair as a member and constructs the ballooning space form. By default includes duplicate theta points but can drop these on request.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | it | |||
integer, | intent(in) | :: | ik | |||
complex, | intent(in), | dimension(-ntgrid:, :, :) | :: | field_like_ft | ||
real, | intent(out), | dimension(:), allocatable | :: | theta_bs | ||
complex, | intent(out), | dimension(:), allocatable | :: | field_like_bs | ||
logical, | intent(in), | optional | :: | drop_duplicates |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | report_unit |
Reads in the kt_grids_knobs namelist and populates the member variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(kt_grids_config_type), | intent(inout) | :: | self |
Writes out a namelist representing the current state of the config object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(kt_grids_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(kt_grids_config_type), | intent(inout) | :: | self |
Broadcasts all config parameters so object is populated identically on all processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(kt_grids_config_type), | intent(inout) | :: | self |
Set the module level config instance
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(kt_grids_config_type), | intent(in), | optional | :: | kt_grids_config_in |