coordinates

moment_kinetics.coordinates.define_coordinateFunction
define_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.

source
moment_kinetics.coordinates.define_test_coordinateFunction
define_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.

source