A module which defines the override types. These types are used within the init object (which itself is contained within the gs2_program_state object) to override values of the specified parameters (i.e. modify their values from what is specified in the input file). The appropriate "prepare_..." function from gs2_main must always be called before setting overrides.
In the future it would be nice to replace this code with something which uses the config types directly.
A type for storing overrides of the intial values of the fields and distribution function. This override is different to all the others, because in order to minimise memory usage and disk writes, this override is used internally during the simulation, and its values can thus change over the course of the simulation. In contrast, no other overrides are modified by running gs2. Also, depending on the value of in_memory, the override values will either be taken from the the arrays within the object, or from the restart files. If you want to externally modify the initial field and dist fn values, you need to use in_memory = .true. If you just want to use this override to allow you to reinitialise the equations and start from the same values, you can use either memory or restart files. If you want to want to change the number of processors and then reinitialise and then use this override you must use in_memory = .false., because currently the memory is allocated on a processor by processor basis. Changing grid sizes and then using this override is not supported. This one is too complicated to generate automatically
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | private | :: | init | = | .false. |
True if the object has been initialized. |
|
logical, | public | :: | in_memory | = | .true. |
If true, override values are read from the arrays in this object. If not, they are read from the restart files. The value of in_memory should not be changed without reinitializing this object (doing so is an excellent way of generating segmentation faults). |
|
logical, | public | :: | override | = | .false. |
Whether to override initial values or not, i.e., whether or not this override is switched on. If it is switched on, initial values will be determined by the values in the arrays or the restart files, depending on the value of in_memory. If false, initial values will be determined by the gs2 input file (note that of course, this can result in initial values being taken from the input files). |
|
complex, | public, | dimension (:,:,:), allocatable | :: | phi | |||
complex, | public, | dimension (:,:,:), allocatable | :: | apar | |||
complex, | public, | dimension (:,:,:), allocatable | :: | bpar | |||
complex, | public, | dimension (:,:,:), allocatable | :: | g | |||
complex, | public, | dimension (:,:,:), allocatable | :: | gexp_1 | |||
complex, | public, | dimension (:,:,:), allocatable | :: | gexp_2 | |||
complex, | public, | dimension (:,:,:), allocatable | :: | gexp_3 | |||
real, | public, | dimension(2) | :: | vnmult |
procedure , public , :: initialise => init_initial_values_overrides Subroutine | |
procedure , public , :: finish => finish_initial_values_overrides Subroutine | |
procedure , public , :: is_initialised => is_initialised_initial_values_overrides Function |
An object for overriding all or selected profile parameters, for example species temps, densities or gradients or the flow gradient or mach number. Note that all species parameters are arrays of size nspec and you must set the override switches individually for each species.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | private | :: | init | = | .false. | ||
logical, | public, | dimension (:), allocatable | :: | override_dens | |||
real, | public, | dimension (:), allocatable | :: | dens | |||
logical, | public, | dimension (:), allocatable | :: | override_temp | |||
real, | public, | dimension (:), allocatable | :: | temp | |||
logical, | public, | dimension (:), allocatable | :: | override_tprim | |||
real, | public, | dimension (:), allocatable | :: | tprim | |||
logical, | public, | dimension (:), allocatable | :: | override_fprim | |||
real, | public, | dimension (:), allocatable | :: | fprim | |||
logical, | public, | dimension (:), allocatable | :: | override_vnewk | |||
real, | public, | dimension (:), allocatable | :: | vnewk | |||
logical, | public | :: | override_g_exb | = | .false. | ||
real, | public | :: | g_exb | ||||
logical, | public | :: | override_mach | = | .false. | ||
real, | public | :: | mach |
procedure , public , :: initialise => init_profiles_overrides Subroutine | |
procedure , public , :: finish => finish_profiles_overrides Subroutine | |
procedure , public , :: is_initialised => is_initialised_profiles_overrides Function |
An object for overriding all or selected Miller geometry parameters.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | private | :: | init | = | .false. | ||
logical, | public | :: | override_rhoc | = | .false. | ||
real, | public | :: | rhoc | ||||
logical, | public | :: | override_qinp | = | .false. | ||
real, | public | :: | qinp | ||||
logical, | public | :: | override_shat | = | .false. | ||
real, | public | :: | shat | ||||
logical, | public | :: | override_rgeo_lcfs | = | .false. | ||
real, | public | :: | rgeo_lcfs | ||||
logical, | public | :: | override_rgeo_local | = | .false. | ||
real, | public | :: | rgeo_local | ||||
logical, | public | :: | override_geoType | = | .false. | ||
integer, | public | :: | geoType | ||||
logical, | public | :: | override_aSurf | = | .false. | ||
real, | public | :: | aSurf | ||||
logical, | public | :: | override_shift | = | .false. | ||
real, | public | :: | shift | ||||
logical, | public | :: | override_shiftVert | = | .false. | ||
real, | public | :: | shiftVert | ||||
logical, | public | :: | override_mMode | = | .false. | ||
integer, | public | :: | mMode | ||||
logical, | public | :: | override_nMode | = | .false. | ||
integer, | public | :: | nMode | ||||
logical, | public | :: | override_deltam | = | .false. | ||
real, | public | :: | deltam | ||||
logical, | public | :: | override_deltan | = | .false. | ||
real, | public | :: | deltan | ||||
logical, | public | :: | override_deltampri | = | .false. | ||
real, | public | :: | deltampri | ||||
logical, | public | :: | override_deltanpri | = | .false. | ||
real, | public | :: | deltanpri | ||||
logical, | public | :: | override_thetam | = | .false. | ||
real, | public | :: | thetam | ||||
logical, | public | :: | override_thetan | = | .false. | ||
real, | public | :: | thetan | ||||
logical, | public | :: | override_betaprim | = | .false. | ||
real, | public | :: | betaprim | ||||
logical, | public | :: | override_akappa | = | .false. | ||
real, | public | :: | akappa | ||||
logical, | public | :: | override_akappri | = | .false. | ||
real, | public | :: | akappri | ||||
logical, | public | :: | override_tri | = | .false. | ||
real, | public | :: | tri | ||||
logical, | public | :: | override_tripri | = | .false. | ||
real, | public | :: | tripri |
procedure , public , :: initialise => init_miller_geometry_overrides Subroutine | |
procedure , public , :: finish => finish_miller_geometry_overrides Subroutine | |
procedure , public , :: is_initialised => is_initialised_miller_geometry_overrides Function |
A type for containing overrides to the processor layout and optimisation flags for gs2.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | private | :: | init | = | .false. | ||
logical, | public | :: | override_nproc | = | .false. | ||
integer, | public | :: | nproc | ||||
logical, | public | :: | override_opt_redist_nbk | = | .false. | ||
logical, | public | :: | opt_redist_nbk | ||||
logical, | public | :: | override_opt_redist_persist | = | .false. | ||
logical, | public | :: | opt_redist_persist | ||||
logical, | public | :: | override_opt_redist_persist_overlap | = | .false. | ||
logical, | public | :: | opt_redist_persist_overlap | ||||
logical, | public | :: | override_intmom_sub | = | .false. | ||
logical, | public | :: | intmom_sub | ||||
logical, | public | :: | override_intspec_sub | = | .false. | ||
logical, | public | :: | intspec_sub | ||||
logical, | public | :: | override_local_field_solve | = | .false. | ||
logical, | public | :: | local_field_solve | ||||
logical, | public | :: | override_layout | = | .false. | ||
character(len=5), | public | :: | layout | ||||
logical, | public | :: | override_field_option | = | .false. | ||
character(len=8), | public | :: | field_option | ||||
logical, | public | :: | override_gf_lo_integrate | = | .false. | ||
logical, | public | :: | gf_lo_integrate | ||||
logical, | public | :: | override_gf_local_fields | = | .false. | ||
logical, | public | :: | gf_local_fields | ||||
logical, | public | :: | override_simple_gf_decomposition | = | .false. | ||
logical, | public | :: | simple_gf_decomposition | ||||
logical, | public | :: | override_field_subgath | = | .false. | ||
logical, | public | :: | field_subgath | ||||
logical, | public | :: | override_do_smart_update | = | .false. | ||
logical, | public | :: | do_smart_update | ||||
logical, | public | :: | override_field_local_allreduce | = | .false. | ||
logical, | public | :: | field_local_allreduce | ||||
logical, | public | :: | override_field_local_allreduce_sub | = | .false. | ||
logical, | public | :: | field_local_allreduce_sub | ||||
logical, | public | :: | override_opt_source | = | .false. | ||
logical, | public | :: | opt_source | ||||
logical, | public | :: | override_minnrow | = | .false. | ||
integer, | public | :: | minnrow | ||||
logical, | public | :: | override_old_comm | = | .false. | ||
integer, | public | :: | old_comm |
procedure , public , :: initialise => init_optimisations_overrides Subroutine | |
procedure , public , :: finish => finish_optimisations_overrides Subroutine | |
procedure , public , :: is_initialised => is_initialised_optimisations_overrides Function |
A type for containing overrides to the timestep and the cfl parameters
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | private | :: | init | = | .false. | ||
logical, | public | :: | override_immediate_reset | = | .false. | ||
logical, | public | :: | immediate_reset |
procedure , public , :: initialise => init_timestep_overrides Subroutine | |
procedure , public , :: finish => finish_timestep_overrides Subroutine | |
procedure , public , :: is_initialised => is_initialised_timestep_overrides Function |
A type for containing overrides to the perpendicular grids (x and y).
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | private | :: | init | = | .false. | ||
logical, | public | :: | override_ny | = | .false. | ||
integer, | public | :: | ny | ||||
logical, | public | :: | override_naky | = | .false. | ||
integer, | public | :: | naky | ||||
logical, | public | :: | override_nx | = | .false. | ||
integer, | public | :: | nx | ||||
logical, | public | :: | override_ntheta0 | = | .false. | ||
integer, | public | :: | ntheta0 | ||||
logical, | public | :: | override_y0 | = | .false. | ||
real, | public | :: | y0 | ||||
logical, | public | :: | override_x0 | = | .false. | ||
real, | public | :: | x0 | ||||
logical, | public | :: | override_jtwist | = | .false. | ||
integer, | public | :: | jtwist |
procedure , public , :: initialise => init_kt_grids_overrides Subroutine | |
procedure , public , :: finish => finish_kt_grids_overrides Subroutine | |
procedure , public , :: is_initialised => is_initialised_kt_grids_overrides Function |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(profiles_overrides_type), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(miller_geometry_overrides_type), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(optimisations_overrides_type), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timestep_overrides_type), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(kt_grids_overrides_type), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(initial_values_overrides_type), | intent(in) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(profiles_overrides_type), | intent(inout) | :: | self | |||
integer, | intent(in) | :: | nspec |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(profiles_overrides_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(miller_geometry_overrides_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(miller_geometry_overrides_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(optimisations_overrides_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(optimisations_overrides_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timestep_overrides_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(timestep_overrides_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(kt_grids_overrides_type), | intent(inout) | :: | self |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(kt_grids_overrides_type), | intent(inout) | :: | self |
overrides%in_memory after calling this function
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(initial_values_overrides_type), | intent(inout) | :: | overrides_obj | |||
integer, | intent(in) | :: | ntgrid | |||
integer, | intent(in) | :: | ntheta0 | |||
integer, | intent(in) | :: | naky | |||
integer, | intent(in) | :: | g_llim | |||
integer, | intent(in) | :: | g_ulim | |||
logical, | intent(in) | :: | force_maxwell_reinit | |||
logical, | intent(in) | :: | in_memory | |||
logical, | intent(in) | :: | has_explicit_terms |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(initial_values_overrides_type), | intent(inout) | :: | overrides_obj |