coordinates
moment_kinetics.coordinates — Modulemoment_kinetics.coordinates.define_coordinate — Functiondefine_coordinate(input_dict, name; parallel_io::Bool=false,
run_directory=nothing, ignore_MPI=false,
collision_operator_dim::Bool=true)
define_coordinate(coord_input::NamedTuple; parallel_io::Bool=false,
run_directory=nothing, ignore_MPI=false,
collision_operator_dim::Bool=true, irank=0, nrank=1,
comm=MPI.COMM_NULL)Create arrays associated with a given coordinate, setup the coordinate grid, and populate the coordinate structure containing all of this information.
When input_dict is passed, any missing settings will be set with default values.
When coord_input is passed, it should be a NamedTuple as generated by get_coordinate_input, which contains a field for every coordinate input option.
moment_kinetics.coordinates.define_test_coordinate — Functiondefine_test_coordinate(input_dict::AbstractDict; kwargs...)
define_test_coordinate(name; collision_operator_dim=true, kwargs...)Wrapper for define_coordinate() to make creating a coordinate for tests slightly less verbose.
When passing input_dict, it must contain a "name" field, and can contain other settings
- "ngrid", "nelement", etc. Options other than "name" will be set using defaults if they
are not passed. kwargs are the keyword arguments for define_coordinate.
The second form allows the coordinate input options to be passed as keyword arguments. For this form, apart from collision_operator_dim, the keyword arguments of define_coordinate cannot be passed, and ignore_MPI=true is always set, as this is most often useful for tests.
moment_kinetics.coordinates.elemental_to_full_grid_map — Methodreturns imin and imax, which contain the minimum and maximum indices on the full grid for each element
moment_kinetics.coordinates.equally_spaced_grid — Methodsetup an equally spaced grid with n_global grid points between [-L/2,L/2]
moment_kinetics.coordinates.equally_spaced_grid_shifted — Methodsetup an equally spaced grid with n_global grid points between [0,L]
moment_kinetics.coordinates.full_to_elemental_grid_map — Methodsetup arrays containing a map from the unpacked grid point indices to the element index and the grid point index within each element
moment_kinetics.coordinates.get_coordinate_input — Methodget_coordinate_input(input_dict, name; ignore_MPI=false,
warn_unexpected::Bool=false)Read the input for coordinate name from input_dict, setting defaults, etc.
moment_kinetics.coordinates.grid_spacing — Methodgiven a set of grid point locations calculate and return the length associated with the cell between adjacent grid points
moment_kinetics.coordinates.init_grid — Methodsetup a grid with n_global grid points on the interval [-L/2,L/2]