Module | Source File | Description |
---|---|---|

abstract_config | abstract_config.f90 | Define abstract type to use as a base type for derived types used to represent the input configuration of a module (actual or logical). In other words it can be used to represent a namelist state. |

antenna | antenna.f90 | Provides random forcing for Alfven wave problem Originally by Hammett, Dorland and Quataert, Dec. 5, 2001 |

antenna_data | antenna_data.f90 | FIXME : Add documentation |

ballstab | ballstab.f90 | A small module used to calculate ideal ballooning stability. Based on the original ball program in geo/ball.f90 of GS2 but tweaked to integrate closer to full GS2 runs etc. |

benchmarks | benchmarks.f90 | Helper functions for running benchmarks |

build_config | build_config.fpp | Compile-time parameters describing the built configuration |

ceq | ceq.f90 | Reads in the geometry using a CHEASE output file. The CHEASE output file is read using the helper module read_chease. |

collisional_heating | collisional_heating.f90 | FIXME : Add documentation |

collisions | collisions.fpp | Routines for implementing the model collision operator defined by Barnes, Abel et al. 2009. The collision operator causes physically motivated smoothing of structure in velocity space which is necessary to prevent buildup of structure at fine scales in velocity space, while conserving energy and momentum. |

command_line | command_line.fpp | A wrapper module for handling command line arguments. This module provides subroutine cl_getarg and integer function cl_iargc. Most of the compilers have getarg and iargc as their extensions. If not, one can use POSIX pxfgetarg and ipxfargc. |

config_collection | config_collection.fpp | Provides a defined type that contains all possible config objects. This can be used to represent the configuration used for a particular run etc. |

constant_random | constant_random.f90 | This module provides 10,000 fixed random numbers used for initialising tests, so as always to give the same result when starting from noise, regardless of compiler/system. These should not be used for production runs. |

constants | constants.fpp | A module which defines a variety of constants, for example, mathematical constants like pi, dimensions of arrays whose sizes are set at compile time, and kind parameters. |

convert | convert.f90 | Convert from complex variable a(d1,d2,d3, ...) to a
real variable ar(2,d1,d2,d3,...) and back. |

deq | deq.f90 | FIXME : Add documentation |

diagnostics_antenna | diagnostics_antenna.f90 | A module to calculate the properties of the antenna used to drive turbulence |

diagnostics_ascii | diagnostics_ascii.f90 | A module for managing text-based output files for the new diagnostics module |

diagnostics_base_config | diagnostics_base_config.f90 | |

diagnostics_config | diagnostics_config.f90 | A module for handling the configuration of the diagnostics module via the namelist diagnostics_config. |

diagnostics_create_and_write | diagnostics_create_and_write.f90 | A module which contains two high level interfaces for writing to the netcdf file, one for variables which are local to all processors, and one for variables which may be distributed in the same manner as the fields. Create and/or write the given variable depending on the values of the flags gnostics%create and gnostics%wryte |

diagnostics_dimensions | diagnostics_dimensions.f90 | This module provides a dimension class (derived type) The idea is to make it easier to support different output backends at some point by putting backend specific setup in here. |

diagnostics_fields | diagnostics_fields.f90 | This module contains functions for writing quantities that have the dimensions of the fields, including volume averaged quantities, etc. |

diagnostics_final_routines | diagnostics_final_routines.f90 | Contains a lot of old routines for writing stuff out at the end of the simulation that I had no time to upgrade |

diagnostics_fluxes | diagnostics_fluxes.fpp | Module which contains functions for calculating and writing out the fluxes of heat and momentum etc. |

diagnostics_geometry | diagnostics_geometry.f90 | A module for writing out geometric coefficients and information such as bpar, drifts and plotting coefficients |

diagnostics_heating | diagnostics_heating.f90 | Subroutines for writing out the turbulent heating... the turbulent energy dissipated in collisions and hyperviscosity Set averages in gnostics\%current_results to 0. |

diagnostics_metadata | diagnostics_metadata.f90 | A module for for writing help, metadata and the input file to the netcdf file. |

diagnostics_moments | diagnostics_moments.f90 | A module for writing out moments of the distribution function, for example density, temperature, parallel flow |

diagnostics_nonlinear_convergence | diagnostics_nonlinear_convergence.f90 | A module which contains methods for checking whether nonlinear runs have reached a saturated steady state |

diagnostics_normalisations | diagnostics_normalisations.f90 | This module writes the parameters in the normalisations namelist to the netcdf output file. These parameters play no part in the simulation, but will typically have been used in calculating the dimensionless inputs, and will typically be used to dimensionalise the outputs. |

diagnostics_omega | diagnostics_omega.f90 | A module which calculates and writes the growth rates and frequencies |

diagnostics_printout | diagnostics_screen_printout.f90 | A module for printing summary information to stdout during the simulation |

diagnostics_turbulence | diagnostics_turbulence.f90 | A module for calculating properties of the turbulence such as cross phases and correlations |

diagnostics_velocity_space | diagnostics_velocity_space.f90 | A module which writes out quantities which writes out diagnostic quantities which assess whether the velocity space resolution is sufficient. |

diagnostics_zonal_transfer | diagnostics_zonal_transfer.f90 | FIXME : Add documentation |

dist_fn | dist_fn.fpp | The principal function of this module is to evolve the distribution function, that is, to advance the discrete gyrokinetic equation. This involves calculating the source and dealing with the complexities of the parallel boundary conditions. In addition it contains a routine for implementing perpendicular velocity shear and calculating the right-hand side of the field equation, as well as a host of other functions. Initializes a limited selection of arrays, for example g, gnew, vperp2, typically those which are needed by other modules that don't need dist_fn to be fully initialized (e.g. nonlinear_terms) This initialization level depends on grid sizes. |

dist_fn_arrays | dist_fn_arrays.fpp | A container for the arrays that are used to store the distribution function among other things. |

eeq | eeq.f90 | This module is a submodule of geometry which handles reading from the ascii EQDSK format output by EFIT, but also now by other codes. This file contains psi on an R,Z grid, as well as other quantities such as q (safety factor), I (a.k.a. f) and p (pressure) on a psi grid. |

egrid | le_grids.f90 | FIXME : Add documentation |

eigval | eigval.fpp | A stub module representing the eigenvalue solver |

exit_codes | exit_codes.f90 | Provides the exit_code type used to represent an exit reason. Also provides a number of specific exit_code instances for regular expected exit reasons. |

fft_work | fft_work.fpp | FIXME : Add documentation |

ffttest_helper | ffttester.f90 | FIXME : Add documentation |

fields | fields.f90 | FIXME : Add documentation Made public for unit tests Made public for replay |

fields_arrays | fields_arrays.f90 | Provides storage for the EM potentials and some related data |

fields_gf_local | fields_gf_local.f90 | This module is based on the fields_local module (which is in term a re-implementation of the fields implicit functionality). fields_gf_local implements the implicit field calculation using a gf_lo based data decomposition to improve performance on large process counts. It utilises a smaller set of processes to reduce communication costs (at the expense of significant load imbalance in the fields calculations). It assumes gf_lo velocity space integration and stores field data in gf_lo format (i.e. ik,it are decomposed over processes, everthing else is local). |

fields_implicit | fields_implicit.f90 | FIXME : Add documentation |

fields_local | fields_local.f90 | This module implements the same implicit algorithm as fields_implicit. However, it is an almost complete rewrite of the implementation which can give large gains in the speed of calculating the response matrix, as well as significant gains to the advance steps |

fields_parallelization | fields_parallelization.f90 | FIXME : Add documentation |

fields_test | fields_test.f90 | FIXME : Add documentation |

file_utils | file_utils.fpp | Various utilities for working with input and output files, as well as some shims/backfills for standard features not present in older compilers. |

functional_tests | functional_tests.fpp | A module which contains a series of high level tests used in the linear and nonlinear test cases, as well as a driver function which runs GS2. Check that the relative error of the growth rates as a function of ky with respect to the given rslt is less than err. rslt should be an array of length naky which contains the growth rates as a function of ky. Returns .true. for pass and .false. for fail |

gauss_quad | gauss_quad.f90 | Utilities for Gaussian quadrature. This module provides subroutines to obtain zeros and weights of Gauss-Legendre and Gauss-Laguerre quadrature rules. |

genquad | genquad.fpp | Allows a general weight function (as specified by an external function) for integration. Returns the Gaussian quadrature weights and abscissae corresponding to the set of orthogonal polynomials associated with this weight. See: Gnauchi, in: "Orthogonal Polynomials: Theory and Practice", Nevai (Ed.). Kluwer, 1990. Wheeler, Rocky Mountain Journal of Mathematics, Vol 4, p. 287 (1974) |

geometry | geometry.f90 | Deals with most types of equilibria to generate GS2's expected geometrical parameters
Input:
rhoc :: minor radius of surface of interest (see irho below)
itor :: default one. Choose zero to get "s-alpha" equilibria (see iflux=0)
iflux :: chooses mode of operation. |

geq | geq.fpp | FIXME : Add documentation |

git_version_mod | git_version_mod.f90 | Explicit interfaces for the functions in git_hash.fpp |

gk_complex_root | gk_complex_root.f90 | FIXME : Add documentation |

gridgen4mod | gridgen4mod.f90 | FIXME : Add more documentation |

gs2_diagnostics | gs2_diagnostics.fpp | A module for calculating and writing the main GS2 outputs. |

gs2_diagnostics_new | gs2_diagnostics_new.f90 | A module for calculating and writing gs2 outputs. It can write
these outputs both to a netcdf file |

gs2_gryfx_zonal | gs2_gryfx_zonal.f90 | FIXME : Add documentation |

gs2_heating | gs2_heating.f90 | FIXME : Add documentation |

gs2_init | gs2_init.fpp | This module is analogous to the init() function in Linux-based operating systems: it initialises gs2 to a certain init_level. At a given init level, certain modules are initialised and certain are not. |

gs2_io | gs2_io.fpp | A module for writing to netcdf. |

gs2_layouts | gs2_layouts.fpp | FIXME : Add documentation |

gs2_main | gs2_main.fpp | This module provides the external interface to gs2. It contains functions to initialize gs2, functions to run gs2, functions to finalize gs2 and functions to override/tweak gs2 parameters. |

gs2_metadata | gs2_metadata.fpp | Write some standard metadata to a netCDF file |

gs2_optimisation | gs2_optimisation.f90 | This module sits on top of gs2_main and provides a toolkit for measuring and optimising performance |

gs2_reinit | gs2_reinit.f90 | FIXME : Add documentation |

gs2_save | gs2_save.fpp | FIXME : Add documentation |

gs2_time | gs2_time.f90 | FIXME : Add documentation |

gs2_transforms | gs2_transforms.fpp | FIXME : Add documentation |

gs2d | eeq.f90 | This module contains routines to read from CMR's GS2D equilibrium solver |

hdf_wrapper | hdf_wrapper.fpp | hdf5 wrapper subroutines written by Tomo Tatsuno once ver. 1.8.0 becomes available, we can remove this module and use those High-level APIs. |

hyper | hyper.f90 | FIXME : Add documentation |

ideq | ideq.f90 | FIXME : Add documentation |

ingen_mod | ingen_mod.fpp | Reads in namelists, checks for consistency of inputs, writes a report to runname.report, checks for requested variations, generates new input files, and exits. |

init_g | init_g.f90 | This module contains the subroutines which set the initial value of the fields and the distribution function. |

integration | integration.f90 | Utility module containing generic integration routines |

job_manage | job_manage.fpp | FIXME : Add documentation |

kt_grids | kt_grids.f90 | Set up the perpendicular wavenumbers by calling the appropriate sub-modules. |

kt_grids_box | kt_grids.f90 | Set the perpendicular box size and resolution for linear or nonlinear runs. |

kt_grids_range | kt_grids.f90 | Set up ranges of kx and ky for linear runs. |

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

kt_grids_specified | kt_grids.f90 | Set up sets of (kx, ky) values for linear runs. |

lapack_wrapper | lapack_wrapper.fpp | A small module just designed to provide interfaces to commonly used lapack routines so that we can forget about the precision of the arguments at the calling site and the compiler has some information about the lapack routine arguments. |

layouts_type | layouts_type.f90 | FIXME : Add documentation |

le_derivatives | le_derivatives.fpp | FIXME : Add documentation |

le_grids | le_grids.f90 | FIXME : Add documentation DD> |

leq | leq.f90 | Analytic local equilibria via generalised forms of the Miller model |

lowflow | lowflow.f90 | FIXME : Add documentation |

mat_inv | matrix_inverse.fpp | A module to hold different routines which can be used to invert a matrix |

mdsio | mds.fpp | FIXME : Add documentation (or tidy up above) |

mdslib | mdslib.f90 | FIXME : Add documentation |

memory_usage | memory_usage.fpp | Provide some small utilty functions for trying to monitor memory use. |

mp | mp.fpp | Easier Fortran90 interface to the 1 Message Passing Library. |

mt19937 | mt19937.f90 | Mersenne-Twister pseudorandom number generator (PRNG), specifically MT19937 |

netcdf_utils | netcdf_utils.fpp | Provides some convenience wrappers around netCDF procedures, mostly for handling netCDF errors in a consistent manner, removing the need to manually check the returned status code. |

nonlinear_terms | nonlinear_terms.fpp | FIXME : Add documentation |

normalisations | normalisations.f90 | FIXME : Add documentation |

old_interface_store | gs2_main.fpp | FIXME : Add documentation |

optimisation_config | optimisation_config.f90 | A module for handling the configuration of the optimisation module via the namelist optimisation_config. |

optionals | optionals.fpp | Some utilities for working with optional arguments |

overrides | overrides.f90 | 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. |

parameter_scan | parameter_scan.f90 | A module which allows multiple values of certain parameters to be considered within a single simulation. |

parameter_scan_arrays | parameter_scan_arrays.f90 | FIXME : Add documentation |

peq | peq.fpp | FIXME : Add documentation |

pgplot_utils | pgplot_utils.fpp | FIXME : Add documentation! |

prof | prof.fpp | FIXME : Add documentation |

quadpack | quadpack.f90 | |

ran | ran.fpp | A wrapper module for random number generator. This module provides real function ranf using intrinsic random_number/random_seed or Mersenne Twister 19937 (see mt19937.f90). |

read_chease | read_chease.f90 | CHEASE Output Reader |

redistribute | redistribute.f90 | Redistribute distributed (integer, real, complex or logical) (1, 2, 3, or 4) dimensional arrays into two dimensional arrays with first index on local processor, and vice versa. |

regression | regression.f90 | FIXME : Add documentation |

run_parameters | run_parameters.f90 | This module is basically a store for the input parameters that are specified in the namelists knobs and parameters. In general, the names of the public variables in this module are the same as the name of the input parameter they correspond to. If true and nonlinear_mode is "off", return simple diffusive estimates of fluxes to trinity If true and nonlinear_mode is "off", and trinity_linear_fluxes is true, return quasilinear estimates of fluxes to trinity If true use old diagnostics. Included for testing only and will eventually be removed. Please use the new diagnostics module! |

runtime_tests | runtime_tests.fpp | This module is intended to be used for runtime tests which interrogate what is functional/what compile time options were enabled/disabled, and also any enviroment variables which affect what happens at runtime. |

shm_mpi3 | shm_mpi3.f90 | This module handles share memory using MPI3 and records the allocation in a linked list such that shared memory can be accessed later in arbitrary location of the code (hopefully) |

shmem | shmem.fpp | FIXME : Add documentation |

simpledataio | simpledataiof.F90 | Fortran interface to simpledataio, which requires the iso_c_binding intrinsic module introduced in Fortran 2003. All functions of simpledataio are provided in this module with the exception of write_variable which is provided in simpledataio_write ifdef SIMPLEDATAIO_HAS_PARALLEL_NETCDF endif |

simpledataio_read | simpledataio_read.F90 | Wrapper routines for reading variables from netcdf file. |

simpledataio_write | simpledataio_write.F90 | Wrapper routines for writing variables to a netcdf file. |

sorting | sorting.f90 | This module provides various routines for sorting arrays This isn't something we commonly do but these routines are useful in a few places. |

species | species.f90 | FIXME : Add documentation |

spfunc | spfunc.fpp | FIXME : Add documentation (or tidy existing documentation) |

splines | spl.f90 | FIXME : Add documentation |

standard_header | standard_header.f90 | Contains functions for creating a standard header for files and output |

summation | summation.f90 | Provides utility routines for compenstated summation. The purpose of these approaches is to try to minimise the accumulation of floating point errors. |

text_options | text_options.f90 | FIXME : Add documentation |

theta_grid | theta_grid.f90 | FIXME : Add documentation |

theta_grid_eik | theta_grid.f90 | FIXME : Add documentation |

theta_grid_file | theta_grid.f90 | Use output from rungridgen |

theta_grid_gridgen | theta_grid.f90 | FIXME : Add documentation |

theta_grid_params | theta_grid_params.f90 | FIXME : Add documentation |

theta_grid_salpha | theta_grid.f90 | FIXME : Add documentation |

unit_tests | unit_tests.f90 | A module containing functions for running unit tests Is the relative error of the first argument with respect to the correct answer less than err? If the correct value is 0.0, then err is treated as an absolute error |

uuid_mod | uuid_mod.fpp | Create a random (version 4) Universally Unique Identifier (UUID) |

volume_averages | volume_averages.f90 | This module contains functions for averaging quantities which have the dimensions of space, and potentially species. For example, (y), (x), (x,y), (theta,x,y), (x,y,s) etc. The names of the interfaces are self-explanatory: for example, the function average_theta averages the theta dimension. |