diff --git a/dev/constraints_on_normalized_distribution_function/index.html b/dev/constraints_on_normalized_distribution_function/index.html index 2530dfd2fe..df55169e9b 100644 --- a/dev/constraints_on_normalized_distribution_function/index.html +++ b/dev/constraints_on_normalized_distribution_function/index.html @@ -24,4 +24,4 @@ \end{align}\]

Evolving $n$

When evolving only $n$ separately, we only need one constraint and the correction is just a re-scaling. This corresponds to $B=0,C=0$ so that

\[\begin{align} 1 &= AI_0 \\ A &= \frac{1}{I_0} -\end{align}\]

+\end{align}\]

diff --git a/dev/debugging-hints/index.html b/dev/debugging-hints/index.html index a14d694c39..2a65357fd0 100644 --- a/dev/debugging-hints/index.html +++ b/dev/debugging-hints/index.html @@ -1,2 +1,2 @@ -Debugging · moment_kinetics

Debugging

Shared-memory parallelism

For information on race conditions and debugging, see Shared memory debugging.

Dumping state of physics variables

There is a function moment_kinetics.file_io.debug_dump provided in the moment_kinetics.file_io module that can be inserted to save the distribution function, moments, etc. These can include a label so that if there are several 'dumps' within a timestep, they can be easily identified.

To use, first import the function

using ..file_io: debug_dump

then insert calls at the point where you want to save the variables, e.g.

debug_dump(f, density, upar, ppar, phi, t, istage=istage, label="foo")

where f, density, upar, ppar, and phi are arrays and t is an mk_float. istage is an optional mk_int, and can be used to identify the stage in the ssp_rk!() function. label is optional and can be any string, intended to distinguish different calls to debug_dump().

There is an alternative method (implementation) of the function that takes moment_kinetics.moment_kinetics_structs.scratch_pdf and moment_kinetics.moment_kinetics_structs.em_fields_struct arguments. This can be convenient within the functions in moment_kinetics.time_advance, e.g.

debug_dump(fvec_out, fields, t, istage=istage, label="bar")

Any of the positional arguments can be replaced by nothing if they are not available in a certain place, or just not needed. If nothing is passed, then arrays filled with 0.0 are written into the output.

The output is written into a NetCDF file debug_output.cdf in the current directory (the filename is currently hard-coded because that was simpler than adding more command line arguments, etc.).

For debugging, a script util/compare_debug_files.jl is provided to compare two output files, assumed to have similar structure (i.e. the same set of debug_dump() calls). An example workflow could be:

  1. Checkout master branch.
  2. Create new branch, git checkout -b newfeature.
  3. Work on newfeature...
  4. At some point, a bug is introduced which breaks some test or example - i.e. changes its output. Commit the current state of the code.
  5. Add debug_dump() calls before and after locations where the bug is likely to be.
  6. Run the broken case.
  7. mv debug_output.cdf debug_after.cdf, so the file does not get overwritten.
  8. git stash to 'save' the debug_dump() statements.
  9. git checkout a commit where the test/example was working.
  10. git stash pop to add the debug_dump() statements on top of the working commit (fingers crossed there are no merge conflicts).
  11. Run the test example again.
  12. mv debug_output.cdf debug_before.cdf
  13. Run the comparison script julia util/compare_debug_files.jl debug_before.cdf debug_after.cdf
  14. The script identifies the first point (by t, istage and label) where any variable in the two output files has a maximum difference that is larger than some very tight (1.e-14) absolute and relative tolerances, and reports which variables were different and their maximum difference.
+Debugging · moment_kinetics

Debugging

Shared-memory parallelism

For information on race conditions and debugging, see Shared memory debugging.

Dumping state of physics variables

There is a function moment_kinetics.file_io.debug_dump provided in the moment_kinetics.file_io module that can be inserted to save the distribution function, moments, etc. These can include a label so that if there are several 'dumps' within a timestep, they can be easily identified.

To use, first import the function

using ..file_io: debug_dump

then insert calls at the point where you want to save the variables, e.g.

debug_dump(f, density, upar, ppar, phi, t, istage=istage, label="foo")

where f, density, upar, ppar, and phi are arrays and t is an mk_float. istage is an optional mk_int, and can be used to identify the stage in the ssp_rk!() function. label is optional and can be any string, intended to distinguish different calls to debug_dump().

There is an alternative method (implementation) of the function that takes moment_kinetics.moment_kinetics_structs.scratch_pdf and moment_kinetics.moment_kinetics_structs.em_fields_struct arguments. This can be convenient within the functions in moment_kinetics.time_advance, e.g.

debug_dump(fvec_out, fields, t, istage=istage, label="bar")

Any of the positional arguments can be replaced by nothing if they are not available in a certain place, or just not needed. If nothing is passed, then arrays filled with 0.0 are written into the output.

The output is written into a NetCDF file debug_output.cdf in the current directory (the filename is currently hard-coded because that was simpler than adding more command line arguments, etc.).

For debugging, a script util/compare_debug_files.jl is provided to compare two output files, assumed to have similar structure (i.e. the same set of debug_dump() calls). An example workflow could be:

  1. Checkout master branch.
  2. Create new branch, git checkout -b newfeature.
  3. Work on newfeature...
  4. At some point, a bug is introduced which breaks some test or example - i.e. changes its output. Commit the current state of the code.
  5. Add debug_dump() calls before and after locations where the bug is likely to be.
  6. Run the broken case.
  7. mv debug_output.cdf debug_after.cdf, so the file does not get overwritten.
  8. git stash to 'save' the debug_dump() statements.
  9. git checkout a commit where the test/example was working.
  10. git stash pop to add the debug_dump() statements on top of the working commit (fingers crossed there are no merge conflicts).
  11. Run the test example again.
  12. mv debug_output.cdf debug_before.cdf
  13. Run the comparison script julia util/compare_debug_files.jl debug_before.cdf debug_after.cdf
  14. The script identifies the first point (by t, istage and label) where any variable in the two output files has a maximum difference that is larger than some very tight (1.e-14) absolute and relative tolerances, and reports which variables were different and their maximum difference.
diff --git a/dev/developing/index.html b/dev/developing/index.html index 13fad13406..6546110936 100644 --- a/dev/developing/index.html +++ b/dev/developing/index.html @@ -25,4 +25,4 @@ julia> include("util/print-macros.jl")

or on the command line

$ julia --project util/print-macros.jl

The ranges used are stored in a LoopRanges struct in the Ref variable loop_ranges (which is exported by the looping module). The range for each dimension is stored in a member with the same name as the dimension, e.g. loop_ranges[].s for the species. Occasionally it is useful to access the range directly. There are different LoopRanges instances for different parallelization patterns - the instance stored in loop_ranges is updated when begin_*_region() is called. It is possible to find out the current region type (i.e. which dimensions are being parallelized) by looking at loop_ranges[].parallel_dims.

Note

The square brackets [] after loop_ranges[] are needed because loop_ranges is a reference to a LoopRanges object Ref{LoopRanges} (a bit like a pointer) - it allows loop_ranges to be a const variable, so its type is always known at compile time, but the actual LoopRanges can be set/modified at run-time.

It is also possible to run a block of code in serial (on just the rank-0 member of each block of processes) by wrapping it in a @serial_region macro. This is mostly useful for initialization or file I/O where performance is not critical. For example

@serial_region begin
     # Do some initialization
     f .= 0.0
-end

Internally, when the begin_*_region() functions need to change the region type (i.e. the requested region is not already active), they call _block_synchronize(), which calls MPI.Barrier(). They also switch over the LoopRanges struct contained in looping.loop_ranges as noted above. For optimization, the _block_synchronize() call can be skipped - when it is correct to do so - by passing the argument no_synchronize=true (or some more complicated conditional expression if synchronization is necessary when using some options but not for others).

Collision operator and anyv region

The Fokker-Planck collision operator requires a special approach to shared-memory parallelisation. There is an outer loop over spatial points (and potentially over species). Inside that outer loop there are operations that can benefit from parallelisation over $v_{\perp}$, or over $v_{\parallel}$, or over both $v_{\perp}$ and $v_{\parallel}$, as well as some that do not parallelise over velocity space at all. To deal with this, it is beneficial to parallelise the outer loop over species and spatial dimensions as much as possible, and then within that allow changes between different ways of parallelizing over velocity space.

The mechanism introduced to allow the type of parallelization just described is the 'anyv' (read any-$v$) region. Before the outer loop of the collision operator begin_s_r_z_anyv_region() is used to start the 'anyv' parallelization. Then within the @loop is ir iz begin... the functions begin_anyv_region() (for no parallelization over velocity space), begin_anyv_vperp_region(), begin_anyv_vpa_region() and begin_anyv_vperp_vpa_region() can be used to parallelize over neither velocity space dimension, either velocity space dimension individually, or over both velocity space dimensions together. This is possible because 'subblocks' of processes are defined. Each subblock shares the same range of species and spatial indices, which stay the same throughout the begin_s_r_z_anyv_region() section, and are not shared with any other subblock of processes. Because the subblock has an independent set of species- and spatial-indices, when changing the velocity-space parallelization only the processes in the sub-block need to be synchronized which is done by moment_kinetics.communication._anyv_subblock_synchronize, which is called when necessary within the begin_anyv*_region() functions (the whole shared-memory block does not need to be synchronized at once, as would be done by moment_kinetics.communication._block_synchronize). The processes that share an anyv subblock are all part of the comm_anyv_subblock[] communicator (which is a subset of the processes in the full block, whose communicator is comm_block[]).

See also notes on debugging the 'anyv' parallelisation: Collision operator and 'anyv' region.

Package structure

The structure of the packages in the moment_kinetics repo is set up so that some features, which depend on 'heavy' external packages (such as Makie, Plots, and Symbolics, which take a long time to precompile and load) can be optional.

The structure is set up by the machines/machine_setup.sh script, which prompts the user for input to decide which optional components to include (as well as some settings related to batch job submission on HPC clusters). machine_setup.sh calls several other scripts to do the setup (written as far as possible in Julia). The structure of these scripts is explained in machine_setup notes.

The intention is that a top-level 'project' (defined by a Project.toml file, which is created and populated by machines/machine_setup.sh) is set up in the top-level directory of the repository. The moment_kinetics package itself (which is in the moment_kinetics/ subdirectory, defined by its own Project.toml file which is tracked by git), and optionally other post-processing packages, are added to this top-level project using Pkg.develop().

Optional dependencies

Some capabilities that require optional dependencies are provided using 'package extensions' (a new feature of Julia in v1.9.0).

The way we use package extensions is a bit of a hack. Extensions are intended to be activated when an optional dependency (called a 'weakdep' by Julia) is loaded, e.g. using moment_kinetics, NCDatasets. This usage pattern is not the most convenient for the way we use moment_kinetics where we would rather just load moment_kinetics and then specify for example binary_format = "netcdf" in the input TOML file. To work around this, the optional dependencies are loaded automatically if they are installed (by calling Base.requires() in the __init__() function of an appropriate sub-module). This is not the way package extensions were intended to be used, and it may be a bit fragile - at the time of writing in January 2024 there would be an error on precompilation if the optional dependencies were added in one order, which went away when the order was reversed. If this causes problems, we might need to consider an alternative, for example adding the optional dependencies to the startup.jl file, instead of trying to auto-load them from within the moment_kinetics package.

The optional capabilities at the moment are:

Post processing packages

Post processing functionality is provided by separate packages (makie_post_processing and plots_post_processing) rather than by extensions. Extensions are not allowed to define new modules, functions, etc. within the main package, they can only add new methods (i.e. new implementations of the function for a different number of arguments, or different types of the arguments) to functions already defined in the main package. For post-processing, we want to add a lot of new functions, so to use extensions instead of separate packages we would need to define all the function names in the main package, and then separately the implementations in the extension, which would be inconvenient and harder to maintain.

There are two suggested ways of setting up the post-processing packages:

  1. For interactive use/development on a local machine, one or both post-processing packages can be added to the top-level project using Pkg.develop(). This is convenient as there is only one project to deal with. Both simulations and post-processing are run using
    $ bin/julia --project -O3 <...>
  2. For optimized use on an HPC cluster it is better to set up a separate project for the post-processing package(s). This allows different optimization flags to be used for running simulations (-O3 --check-bounds=no) and for post-processing (-O3). [Note, in particular Makie.jl can have performance problems if run with --check-bounds=no, see here.] Simulations should be run with
    $ bin/julia --project -O3 --check-bounds=no <...>
    and post-processing with
    $ bin/julia --project=makie_post_processing -O3 <...>
    or
    $ bin/julia --project=plots_post_processing -O3 <...>
    This option can also be used on a local machine, if you want to optimise your simulation runs as much as possible by using the --check-bounds=no flag. To do this answer y to the prompt "Would you like to set up separate packages for post processing..." from machines/machine_setup.sh.

To support option 2, the post-processing packages are located in sub-sub-directories (makie_post_processing/makie_post_processing/ and plots_post_processing/plots_post_processing/), so that the separate projects can be created in the sub-directories (makie_post_processing/ and plots_post_processing). moment_kinetics and the other dependencies must also be added to the separate projects (the machine_setup.sh script takes care of this).

+end

Internally, when the begin_*_region() functions need to change the region type (i.e. the requested region is not already active), they call _block_synchronize(), which calls MPI.Barrier(). They also switch over the LoopRanges struct contained in looping.loop_ranges as noted above. For optimization, the _block_synchronize() call can be skipped - when it is correct to do so - by passing the argument no_synchronize=true (or some more complicated conditional expression if synchronization is necessary when using some options but not for others).

Collision operator and anyv region

The Fokker-Planck collision operator requires a special approach to shared-memory parallelisation. There is an outer loop over spatial points (and potentially over species). Inside that outer loop there are operations that can benefit from parallelisation over $v_{\perp}$, or over $v_{\parallel}$, or over both $v_{\perp}$ and $v_{\parallel}$, as well as some that do not parallelise over velocity space at all. To deal with this, it is beneficial to parallelise the outer loop over species and spatial dimensions as much as possible, and then within that allow changes between different ways of parallelizing over velocity space.

The mechanism introduced to allow the type of parallelization just described is the 'anyv' (read any-$v$) region. Before the outer loop of the collision operator begin_s_r_z_anyv_region() is used to start the 'anyv' parallelization. Then within the @loop is ir iz begin... the functions begin_anyv_region() (for no parallelization over velocity space), begin_anyv_vperp_region(), begin_anyv_vpa_region() and begin_anyv_vperp_vpa_region() can be used to parallelize over neither velocity space dimension, either velocity space dimension individually, or over both velocity space dimensions together. This is possible because 'subblocks' of processes are defined. Each subblock shares the same range of species and spatial indices, which stay the same throughout the begin_s_r_z_anyv_region() section, and are not shared with any other subblock of processes. Because the subblock has an independent set of species- and spatial-indices, when changing the velocity-space parallelization only the processes in the sub-block need to be synchronized which is done by moment_kinetics.communication._anyv_subblock_synchronize, which is called when necessary within the begin_anyv*_region() functions (the whole shared-memory block does not need to be synchronized at once, as would be done by moment_kinetics.communication._block_synchronize). The processes that share an anyv subblock are all part of the comm_anyv_subblock[] communicator (which is a subset of the processes in the full block, whose communicator is comm_block[]).

See also notes on debugging the 'anyv' parallelisation: Collision operator and 'anyv' region.

Package structure

The structure of the packages in the moment_kinetics repo is set up so that some features, which depend on 'heavy' external packages (such as Makie, Plots, and Symbolics, which take a long time to precompile and load) can be optional.

The structure is set up by the machines/machine_setup.sh script, which prompts the user for input to decide which optional components to include (as well as some settings related to batch job submission on HPC clusters). machine_setup.sh calls several other scripts to do the setup (written as far as possible in Julia). The structure of these scripts is explained in machine_setup notes.

The intention is that a top-level 'project' (defined by a Project.toml file, which is created and populated by machines/machine_setup.sh) is set up in the top-level directory of the repository. The moment_kinetics package itself (which is in the moment_kinetics/ subdirectory, defined by its own Project.toml file which is tracked by git), and optionally other post-processing packages, are added to this top-level project using Pkg.develop().

Optional dependencies

Some capabilities that require optional dependencies are provided using 'package extensions' (a new feature of Julia in v1.9.0).

The way we use package extensions is a bit of a hack. Extensions are intended to be activated when an optional dependency (called a 'weakdep' by Julia) is loaded, e.g. using moment_kinetics, NCDatasets. This usage pattern is not the most convenient for the way we use moment_kinetics where we would rather just load moment_kinetics and then specify for example binary_format = "netcdf" in the input TOML file. To work around this, the optional dependencies are loaded automatically if they are installed (by calling Base.requires() in the __init__() function of an appropriate sub-module). This is not the way package extensions were intended to be used, and it may be a bit fragile - at the time of writing in January 2024 there would be an error on precompilation if the optional dependencies were added in one order, which went away when the order was reversed. If this causes problems, we might need to consider an alternative, for example adding the optional dependencies to the startup.jl file, instead of trying to auto-load them from within the moment_kinetics package.

The optional capabilities at the moment are:

Post processing packages

Post processing functionality is provided by separate packages (makie_post_processing and plots_post_processing) rather than by extensions. Extensions are not allowed to define new modules, functions, etc. within the main package, they can only add new methods (i.e. new implementations of the function for a different number of arguments, or different types of the arguments) to functions already defined in the main package. For post-processing, we want to add a lot of new functions, so to use extensions instead of separate packages we would need to define all the function names in the main package, and then separately the implementations in the extension, which would be inconvenient and harder to maintain.

There are two suggested ways of setting up the post-processing packages:

  1. For interactive use/development on a local machine, one or both post-processing packages can be added to the top-level project using Pkg.develop(). This is convenient as there is only one project to deal with. Both simulations and post-processing are run using
    $ bin/julia --project -O3 <...>
  2. For optimized use on an HPC cluster it is better to set up a separate project for the post-processing package(s). This allows different optimization flags to be used for running simulations (-O3 --check-bounds=no) and for post-processing (-O3). [Note, in particular Makie.jl can have performance problems if run with --check-bounds=no, see here.] Simulations should be run with
    $ bin/julia --project -O3 --check-bounds=no <...>
    and post-processing with
    $ bin/julia --project=makie_post_processing -O3 <...>
    or
    $ bin/julia --project=plots_post_processing -O3 <...>
    This option can also be used on a local machine, if you want to optimise your simulation runs as much as possible by using the --check-bounds=no flag. To do this answer y to the prompt "Would you like to set up separate packages for post processing..." from machines/machine_setup.sh.

To support option 2, the post-processing packages are located in sub-sub-directories (makie_post_processing/makie_post_processing/ and plots_post_processing/plots_post_processing/), so that the separate projects can be created in the sub-directories (makie_post_processing/ and plots_post_processing). moment_kinetics and the other dependencies must also be added to the separate projects (the machine_setup.sh script takes care of this).

diff --git a/dev/external_sources_notes/index.html b/dev/external_sources_notes/index.html index df1005ef24..9b921192ea 100644 --- a/dev/external_sources_notes/index.html +++ b/dev/external_sources_notes/index.html @@ -17,4 +17,4 @@ \end{align}\]

or in 1V simulations

\[\begin{align} S_i &= A_i(r,z) \left[ \frac{1}{sqrt{\pi} \sqrt{2 T_{\mathrm{source},i} / m_i}} \exp\left( -\frac{v_\perp^2}{T_{\mathrm{source},i}} - f_i(v_\parallel) \right) \right] \\ S_n &= A_n(r,z) \left[ \frac{1}{sqrt{\pi} \sqrt{2 T_{\mathrm{source},n} / m_n}} \exp\left( -\frac{v_z^2}{T_{\mathrm{source},n}} - f_n(v_z) \right) \right] -\end{align}\]

Note that this source does not give a fixed power input (although that might be a nice feature to have), it just swaps plasma/neutral particles at a constant rate.

API

See external_sources.

+\end{align}\]

Note that this source does not give a fixed power input (although that might be a nice feature to have), it just swaps plasma/neutral particles at a constant rate.

API

See external_sources.

diff --git a/dev/geometry/index.html b/dev/geometry/index.html index bd321d2212..16e5f01ec3 100644 --- a/dev/geometry/index.html +++ b/dev/geometry/index.html @@ -14,4 +14,4 @@ = J \frac{E_z B_\zeta}{B^2}. \end{equation}\]

Due to the axisymmetry of the system, the differential operator $\mathbf{b} \cdot \nabla (\cdot) = b_z \partial {(\cdot)}{\partial z}$, and the convective derivative

\[\begin{equation} \frac{d B}{d t} = \frac{d z}{d t} \frac{\partial B}{ \partial z} + \frac{dr}{dt}\frac{\partial B}{\partial r}. -\end{equation}\]

+\end{equation}\]

diff --git a/dev/getting_started/index.html b/dev/getting_started/index.html index 509b88ce59..8c378c60cf 100644 --- a/dev/getting_started/index.html +++ b/dev/getting_started/index.html @@ -2,4 +2,4 @@ Getting started · moment_kinetics

Getting started

The full documentation is online at https://mabarnes.github.io/moment_kinetics.

Setup

First clone this git repository, e.g. (to clone it into a directory with the default name moment_kinetics)

$ git clone git@github.com:mabarnes/moment_kinetics

The command above assumes that you have an account on Github.com, and that account has ssh keys set up. If that is not the case you can clone using https instead

$ git clone https://github.com/mabarnes/moment_kinetics

When using https some things (e.g. pushing to the remote repository) may require you to use 2-factor authentication, see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls.

Warning

Do not download the zip-file from the Github.com page. This gives you the source code files but does not create a git repository. We get some version information from git when running the code, so without the git repository you will not be able to run a simulation.

  1. If you have already installed Julia, ensure that the Julia version is >= 1.9.0 by doing $ julia --version at command line. The setup script in step 2 can also download a Julia binary if you have not already installed Julia.

  2. If you are running on a desktop/laptop (rather than an HPC cluster) ensure that you have an MPI implementation installed (using whatever the usual way of installing software is on your system). It should not matter which MPI implementation - openmpi is often a good choice if you have no reason to prefer a particular one. Check that the MPI compiler wrapper mpicc is available, e.g. $ mpicc --version should run without an error.

  3. Run the setup script $ machines/machine_setup.sh This script will prompt you for various options. The default choices should be sensible in most cases. On a laptop/desktop the 'name of machine to set up' will be 'generic-pc' and will set up for interactive use. On supported clusters, 'name of machine' will be the name of the cluster. On other clusters 'generic-batch' can be used, but requires some manual setup (see machines/generic-batch-template/README.md).

    For more information, see machine_setup notes.

    If you want or need to set up 'by hand' without using machines/machine_setup.sh, see Manual setup.

Some other notes that might sometimes be useful:

  • To speed up running scripts or the first call of run_moment_kinetics in a REPL session, it is possible to compile a 'system image' (moment_kinetics.so). By running $ julia --project -O3 precompile.jl and then start Julia by running for example $ julia --project -O3 -Jmoment_kinetics.so this significantly decreases the load time but prevents code changes from taking effect when moment_kinetics.so is used until you repeat the compilation of the system image. Note that this also prevents the Revise package from updating moment_kinetics when you edit the code during and interactive session.

    System images are created by default on HPC clusters, and are required to use the provided jobscript-*.template submission scripts (used by submit-run.sh and submit-restart.sh). This is to try and minimise the compilation that has to be replicated on all the (possibly thousands of) processes in a parallel run. After changing source code, you should run $ precompile-submit.sh (to re-compile the moment_kinetics.so system image).

  • In the course of development, it is sometimes helpful to upgrade the Julia version. Upgrading the version of Julia or upgrading packages may require a fresh installation of moment_kinetics. To make a fresh install with the latest package versions you should be able to just run julia pkg> update (to enter 'Package mode' enter ']' at the julia> prompt). It might sometimes necessary or helpful to instead remove (or rename) the Manifest.jl file in the main directory, and re-run the setup from step 2) above. It can sometimes be necessary to remove or rename the .julia/ directory (located by default in your home directory) to force all the dependencies to be rebuilt.

  • When using the Plots-based post-processing library, one may have to set an environment variable to avoid error messages from the Qt library. If you execute the command $ julia --project run_post_processing.jl runs/your_run_dir/ and see the error message qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. this can be suppressed by setting export QT_QPA_PLATFORM=offscreen in your .bashrc or .bash_profile files.

Run a simulation

To run julia with optimization, type

$ julia -O3 --project run_moment_kinetics.jl input.toml

Note that the middle character in -O3 is a capital letter 'O', not a zero. (On HPC clusters, or if you selected the "set up separate packages for post processing" option from machines/machine_setup.sh, you should use -O3 --check-bounds=no instead of just -O3, and the same in the Restarting section.)

Options are specified in a TOML file, e.g. input.toml here. The defaults are specified in moment_kinetics_input.jl.

  • To run in parallel, just put mpirun -np <n> in front of the call you would normally use, with <n> the number of processes to use.
  • It may be more convenient when running moment_kinetics more than once to work from the Julia REPL, e.g. $ julia -O3 --project julia> using moment_kinetics julia> run_moment_kinetics("input.toml") where input is the name of a TOML file containing the desired options. It is also possible to pass a Dict() containing any non-default options desired, which might sometimes be useful in tests or scripts julia> run_moment_kinetics(input) Especially when developing the code, a lot of compilation time can be saved by using Revise.jl, and re-running a test case in the REPL (without restarting julia) - this is enabled by default when setting up using machines/machine_setup.sh for 'generic-pc'.

On an HPC cluster, you can submit a simulation (using the input file input.toml) to the batch queue using the convenience script

$ ./submit-run.sh input.toml

See the help text

$ ./submit-run.sh -h

for various command line options to change parameters (e.g. number of nodes, etc.).

If you need to rebuild the system images moment_kinetics.so and makie_postproc.so or plots_postproc.so because you have updated the code since they were built, it may be convenient to use

$ ./submit-precompile-and-run.sh input.toml

which will submit jobs for compilation, to run the simulation, and to do post processing. The simulation job will wait for the compilation job creating moment_kinetics.so to finish before starting. The post processing job will wait for the compilation job creating makie_postproc.so or plots_postproc.so to finish before starting.

Stopping a run

When running in the REPL (especially with MPI) interrupting a run using Ctrl-C can mess things up, and require you to restart Julia. There is also a chance that you might interrupt while writing the output files and corrupt them. To avoid these problems, you can stop the run cleanly (including writing the distribution functions at the last time point, so that it is possible to restart the run from where you stopped it), by creating an empty file called stop in the run directory. For example, if the name of your run is 'my_example'

$ touch runs/my_example/stop

moment_kinetics checks for this file when it is going to write output, and if it is present writes all output and then returns cleanly. The 'stop file' is deleted when a run is (re-)started, if present, so you do not have to manually delete it before (re-)starting the run again.

Restarting

To restart a simulation using input.toml from the last time point in the existing run directory,

$ julia -O3 --project run_moment_kinetics --restart input.toml

or to restart from a specific output file - either from the same run or (if the settings are compatible, see below) a different one - here runs/example/example.dfns.h5

$ julia -O3 --project run_moment_kinetics input.toml runs/example/example.dfns.h5

The output file must include distribution functions. When not using parallel I/O there will be multiple output files from different MPI ranks - any one of these can be passed.

To do the same from the Julia REPL

$ julia -O3 --project
 julia> run_moment_kinetics("input.toml", restart=true)

or

julia> run_moment_kinetics("input.toml", restart="runs/example/example.dfns.h5")

When calling the run_moment_kinetics() function you can also choose a particular time index to restart from, e.g.

julia> run_moment_kinetics("input.toml", restart="runs/example/example.dfns.h5", restart_time_index=42)

On an HPC cluster, you can submit a restart (using the input file input.toml) to the batch queue using the convenience script

$ ./submit-restart.sh input.toml

or to restart from a particular output file

$ ./submit-restart.sh -r runs/example/example.dfns.h5 input.toml

See the help text

$ ./submit-restart.sh -h

for various other command line options to change parameters (e.g. number of nodes, etc.).

If you need to rebuild the system images moment_kinetics.so and makie_postproc.so or plots_postproc.so because you have updated the code since they were built, it may be convenient to use

$ ./submit-precompile-and-restart.sh [-r runs/example/example.dfns.h5] input.toml

which will submit jobs for compilation, to restart the simulation, and to do post processing. The simulation job will wait for the compilation job creating moment_kinetics.so to finish before starting. The post processing job will wait for the compilation job creating makie_postproc.so or plots_postproc.so to finish before starting.

It is possible to restart a run from another output file with different resolution settings or different moment-kinetic options. This is done by interpolating variables from the old run onto the new grid.

  • When interpolating in spatial dimensions it is not recommended to change the length of the domain.
  • For velocity space dimensions, changing the size of the domain should be OK. Points outside the original domain will be filled with $\propto \exp(-v^2)$ decreasing values.
  • When changing from 1D (no $r$-dimension) to 2D (with $r$-dimension), the interpolated values will be constant in $r$.
  • When changing from 1V to 2V or 3V, the interpolated values will be proportional to $\exp(-v_j^2)$ in the new dimension(s).

When running in parallel, both the old and the new grids must be compatible with the distributed-MPI parallelisation. When not using Parallel I/O, the distributed-MPI domain decomposition must be identical in the old and new runs (as each block only reads from a single file).

Post-processing with makie_post_processing

The default post-processing module, written to be a bit more generic and flexible than the original Plots-based one, and able to be used interactively, is provided in makie_post_processing, see Post processing.

On an HPC cluster, when you call ./submit-run.sh or ./submit-restart.sh, a job will (by default) be submitted to run makie_post_processing.makie_post_process or plots_post_processing.analyze_and_plot_data (depending on which you have set up, or on whether you pass the -o argument when both are set up) on the output after the run is finished. You can skip this by passing the -a argument to ./submit-run.sh or ./submit-restart.sh.

Original, Plots-based post processing quickstart

This post-processing functionality is now disabled by default, but you can enable it by entering y at the "Would you like to set up plots_post_processing?" prompt in machines/machine_setup.sh.

To make plots and calculate frequencies/growth rates, run

$ julia --project -O3 run_post_processing.jl runs/<directory to process>

passing the directory to process as a command line argument. Input options for post-processing can be specified in post_processing_input.jl. Note that even when running interactively, it is necessary to restart Julia after modifying post_processing_input.jl.

Post processing can be done for several directories at once using

$ julia --project -O3 post_processing_driver.jl runs/<directory1> runs/<directory2> ...

passing the directories to process as command line arguments. Optionally pass a number as the first argument to parallelise post processing of different directories.

Parallel I/O

To enable parallel I/O, HDF5.jl needs to be configured to use an HDF5 library which has MPI enabled and is compiled using the same MPI as you run Julia with. To ensure this happens, machines/machine_setup.sh will download the HDF5 source code and compile a local copy of the library under machines/artifacts, unless you enter n at the "Do you want to download, and compile a local version of HDF5" prompt (except on known HPC clusters where an MPI-enabled HDF5 is provided by a module - this is currently true on ARCHER2 - where the module-provided HDF5 is used).

Running parameter scans

Parameter scans (see Parameter scans) can be performed by running

$ julia -O3 --project run_parameter_scan.jl path/to/scan/input.toml

If running a scan, it can be parallelised by passing the -p argument to julia, e.g. to run on 8 processes

$ julia -p 8 -O3 --project run_parameter_scan.jl path/to/scan/input.toml

Tests

There is a test suite in the test/ subdirectory. It can be run in a few ways:

  • Execute some or all of the tests as a script. For example in the terminal run $ julia -O3 --project moment_kinetics/test/runtests.jl or in the REPL run julia> include("moment_kinetics/test/runtests.jl") Individual test files can also be used instead of runtests.jl, which runs all the tests.
  • You can also run the tests using Pkg. Either using pkg> mode $ julia -O3 --project julia> <press ']' to enter pkg mode> (moment_kinetics) pkg> test moment_kinetics using Pkg in the REPL $ julia -O3 --project julia> import Pkg julia> Pkg.test("moment_kinetics") or run on the command line julia -O3 --project -e "import Pkg; Pkg.test("moment_kinetics")` The downside of this method is that it will cause NCDatasets to be installed if you did not install it already, which might sometimes cause linking errors (related to the HDF5 library, see Optional dependencies).

By default the test suite should run fairly quickly (in a few minutes). To do so, it skips many cases. To run more comprehensive tests, you can activate the --long option:

  • In the REPL, run julia> push!(ARGS, "--long") before running the tests.
  • Running from the terminal, pass as a command line argument, e.g. $ julia -O3 --project --long moment_kinetics/test/runtests.jl
  • Using test_args argument julia> Pkg.test("moment_kinetics"; test_args=["--long"]) Note the semicolon is necessary.

To get more output on what tests were successful, an option --verbose (or -v) can be passed in a similar way to --long (if any tests fail, the output is printed by default).

Manufactured Solutions Tests

In addition to the test suite in the test/ subdirectory, the moment_kinetics project utilises the method of manufactured solutions to test more complicated models in 1D1V, and 2D2V or 2D3V (for neutral particles). To run these tests we run a normal moment_kinetics simulation, making use of the manufacted solutions test TOML options. We describe how to use the existing tests below. To set up moment_kinetics to use the manufactured solutions features, take the following steps:

  • Install moment_kinetics using the setup instructions above (Setup), using the plots_post_processing project and make sure that the Symbolics package is installed, e.g., if following the manual setup instructions (Manual setup), these commands would be $ julia -O3 --project julia> ] develop ./moment_kinetics develop ./plots_post_processing/plots_post_processing add Symbolics if you will run the tests with MPI, make sure that MPI is also installed at this step.

  • Select an input file representing the desired test. For example, we can pick from the list MMS input TOML list.

  • Run the input file using the usual command. julia> using moment_kinetics julia> run_moment_kinetics("runs/your_MMS_test_input.toml")

  • Use the post processing module to test the error norms for the simulation of interest. julia> using plots_post_processing julia> analyze_and_plot_data("runs/your_MMS_test_input") This will print out a series of numbers to the terminal which represent the error norms for each field and distribution function compared to the exact analytical solution, at each time step in the simulation. This error data can be computed for different resolutions.

  • Finally, to partially automate this last step when a resolution scan is performed, we provide functions for generating plots of the error data versus resolutions in the file plot_MMS_sequence.jl in the plots_post_processing project. This can be accessed by using the run_MMS_test.jl script from the command line

    $ julia -O3 --project run_MMS_test.kl

    or by using the underlying functions in the REPL

    import plots_post_processing
     using plots_post_processing.plot_MMS_sequence
    -run_mms_test()

    Note that currently the lists of files used as input for the plotting functions are hardcoded for the purposes of self-documenting the tests – these lists could be made input parameters to improve these scripts.

+run_mms_test()

Note that currently the lists of files used as input for the plotting functions are hardcoded for the purposes of self-documenting the tests – these lists could be made input parameters to improve these scripts.

diff --git a/dev/index.html b/dev/index.html index 1fcc619061..c138bffaa0 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · moment_kinetics

Home

Documentation for moment_kinetics.jl

Contents

Modules

+Home · moment_kinetics

Home

Documentation for moment_kinetics.jl

Contents

Modules

diff --git a/dev/input_options/index.html b/dev/input_options/index.html index d8e8fa8ed6..46f7c845fc 100644 --- a/dev/input_options/index.html +++ b/dev/input_options/index.html @@ -1,2 +1,2 @@ -Input Options · moment_kinetics

Input Options

This page describes the input options that can be specified in .toml input files. The input variable name is given first, followed by its default value and a brief description.

File I/O

Option nameDefault valueDescription
run_namename of the input .toml file with the .toml suffix removedprefix for all output files associated with this run
base_directory"runs"directory where the simulation data will be stored

Model Options

Timestepping Options

See timestepping-input-parameters.

Special cases

Some options apply only for certain types of run, etc. These special cases are described in the following subsections.

+Input Options · moment_kinetics

Input Options

This page describes the input options that can be specified in .toml input files. The input variable name is given first, followed by its default value and a brief description.

File I/O

Option nameDefault valueDescription
run_namename of the input .toml file with the .toml suffix removedprefix for all output files associated with this run
base_directory"runs"directory where the simulation data will be stored

Model Options

Timestepping Options

See timestepping-input-parameters.

Special cases

Some options apply only for certain types of run, etc. These special cases are described in the following subsections.

diff --git a/dev/machine_setup_notes/index.html b/dev/machine_setup_notes/index.html index 758b02219d..cd120a22dc 100644 --- a/dev/machine_setup_notes/index.html +++ b/dev/machine_setup_notes/index.html @@ -1,4 +1,4 @@ -machine_setup notes · moment_kinetics

machine_setup notes

The machines subdirectory provides scripts to set up Julia and moment_kinetics to run on laptops/desktops or on clusters. If the cluster is not one of the currently supported machines, then some additional manual setup is required.

Currently supported:

  • "generic-pc" - A generic personal computer (i.e. laptop or desktop machine). Set up for interactive use, rather than for submitting jobs to a batch queue.
  • "generic-batch" - A generic cluster using a batch queue. Requires some manual setup first, see machines/generic-batch-template/README.md.
  • "archer" - the UK supercomputer ARCHER2
  • "marconi" - the EUROfusion supercomputer Marconi

The usage is described in Getting started. This page contains some extra technical information.

Notes on some prompts from the script

You will be prompted to enter a location for your .julia directory. If you are installing on a personal computer or on a cluster which allows access to your home directory from compute nodes, it is fine to leave this as the default. If not (e.g. on ARCHER2), you need to set a path which is accessible from the compute nodes. If you want to create a completely self-contained install (e.g. for reproducibility or for debugging some dependency conflicts), you might want to put .julia within the moment_kinetics directory (i.e. enter .julia at the prompt).

Defaults for prompts

The default value for each of the settings that the user is prompted for interactively are first taken from some sensible, machine-specific defaults. When machines/machine_setup.sh is run, the values chosen by the user are saved in the [moment_kinetics] section of LocalPreferences.toml, and these values are used as the defaults next time machines/machine_setup.sh is run, in order to make it easier to re-run the setup, e.g. because some dependencies need updating, or to change just one or a few settings.

A few settings (which are needed before Julia can be started for the first time) are saved into hidden files (.julia_default.txt, .this_machine_name.txt, and .julia_directory_default.txt) instead of into LocalPreferences.toml, to avoid needing to parse a TOML file using bash.

bin/julia

A symlink or script is created at bin/julia to call the chosen julia executable. On HPC systems we create a file julia.env which must be source'd (to load the right modules, etc.) before julia can be used - in this case julia.env can be used to set up any environment variables, etc. so a symlink is sufficient. On laptops/desktops that will be used interactively, it is inconvenient to have to remember to source julia.env, especially if you have multiple instances of moment_kinetics, so instead the necessary setup (of the JULIA_DEPOT_PATH environment variable, if needed, and a Python venv if the Plots-based post processing is enabled) is done by making bin/julia a small bash script, which does that setup and then calls the chosen julia executable, passing through to it any command line arguments.

julia.env

A julia.env file is used on HPC systems to set up the environment (modules and environment variables). On laptop/desktop systems this would be inconvenient (especially if there are multiple instances of moment_kinetics) so a julia.env is not used for these.

The julia.env is created from a template julia.env which is located in the subdirectory of machines/ for the specific machine being set up.

If you need to run julia interactively (for moment_kinetics) on a machine that uses julia.env, either run source julia.env in each terminal session where you want to use moment_kinetics, or add it to your .bashrc (if this does not conflict with any other projects).

Warning

Note that julia.env runs module purge to remove any already loaded modules (to get a clean environment). It is therefore very likely to interfere with other projects.

Setup of post processing packages

See Post processing packages.

Use of system images

On HPC clusters, creating system images moment_kinetics.so and for post processing makie_postproc.so and/or plots_postproc.so is required. This is to avoid (as far as practical) wasting CPU hours doing identical compilation in large parallel jobs. If you wanted to remove this requirement for some reason (although this is not recommended), you would need to go to the subdirectory of machines/ for the machine you are working on, and edit the jobscript-run.template, jobscript-restart.template, jobscript-postprocess.template, and jobscript-postprocess-plotsjl.template files to remove the -J*.so argument. If you do do this, please do not commit those changes and merge them to the master branch of moment_kinetics.

Operations done by machines/machine_setup.sh

The convenience script machine_setup.sh is provide because the actual setup happens in multiple stages, with Julia being restarted in between (as this is required on some machines), and because the script is able to download Julia if Julia is not already installed.

The steps done by machines/machine_setp.sh are:

  1. Get the name of the 'machine' ('generic-pc', 'archer', etc.) so that machine-dependent setup can be done and machine-specific defaults can be used. ()

  2. Download a Julia executable, or prompt the user for the location of one (defaulting to any julia found in $PATH).

  3. Get the location of the .julia directory to be used by (this copy of) moment_kinetics. At this point we have enough setup to start using julia. Export JULIA_DEPOT_PATH so that this is used any time julia is run in the rest of the script.

  4. Run machines/shared/machine_setup.jl. This script (whose functions are documented in API documentation):

    • prompts the user for most of the settings (and saves them to LocalPreferences.toml from where they can be accessed by other scripts later and used as defaults if machines/machine_setup is re-run)
    • creates the julia.env file (from the template for the given machine) on HPC systems
    • creates the bin/julia symlink or script (see bin/julia)
    • creates a link to the compile_dependencies.sh script for the machine (if there is one).
    • installs the Revise package and adds using Revise to the startup.jl file (on laptop/desktop systems, and if the user did not de-select this).

    It is necessary to restart julia after this script has been run, so that we can first source julia.env (if it exists) or use the script at bin/julia in order to use the environment settings in them.

  5. If julia.env exists, run source julia.env to load modules, etc.

  6. Set the optimization flags that will be used for running simulations or for running post processing. These need to be set the same as will be used eventually so that precompilation of dependencies and packages that happens while running machines/machine_setup.sh does not need to be overwritten (due to different optimization flags) later, as this would be a waste of time (although it should work fine).

  7. Add various dependencies to the top-level project, by calling machines/shared/add_dependencies_to_project.jl. This will set up MPI and HDF5 to link to the correct libraries. julia needs to be restarted after the setup of MPI and HDF5 is done, which is why this is a separate script from the following one (this separation also allows add_dependencies_to_project.jl to be re-used in makie_post_processing_setup.jl and plots_post_processing_setup.jl if these are to be set up as separate projects from the top-level one).

  8. Complete the setup by running machines/shared/machine_setup_stage_two.jl, which creates a Python venv with matplotlib installed (if plots_post_processing is enabled), creates symlinks at the top level to scripts to submit batch jobs (if setting up for an HPC cluster), and submits a job to compile a system image for moment_kinetics (if setting up for an HPC cluster, and if the user did not de-select this).

  9. Set up makie_post_processing (if enabled) by running machines/shared/makie_post_processing_setup.jl and/or plots_post_processing (if enabled) by running machines/shared/plots_post_processing_setup.jl. These scripts also submit jobs to create system images for makie_post_processing or plots_post_processing (if setting up for an HPC cluster, and if the user did not de-select this).

  10. Print a message indicating which optimization flags to use for running simulations or for post-processing.

API documentation

moment_kinetics.machine_setup.get_settingFunction
get_setting(setting_name, message, machine, local_defaults,
-            possible_values=nothing)

Prompt the user to set a setting called setting_name after printing message. Default value is read from local_defaults if it exists there (which it will do if it has been set before, as then it is stored in LocalPreferences.toml), or from sensible defaults in the machine section of default_settings otherwise.

source
moment_kinetics.machine_setup.get_user_inputMethod
get_user_input(possible_values, default_value)

Prompt for user input. If the user enters nothing, return default_value. Check that the entered value is one of possible_values, if not prompt again.

source
moment_kinetics.machine_setup.machine_setup_moment_kineticsMethod
machine_setup_moment_kinetics(machine::String; ; no_force_exit::Bool=false,
-                              interactive::Bool=true)

Do setup for a known machine, prompting the user for various settings (with defaults set to sensible values - if the script has been run before, the defaults are the previously used values):

  • On clusters that use a module system, provide julia.env at the top level of the moment_kinetics repo.

    Call

    source julia.env

    to get the correct modules for running moment_kinetics, either on the command line (to get them for the current session) or in your .bashrc (to get them by default). Note that this calls module purge so will remove any currently loaded modules when it is run.

  • Makes a symlink to, or a bash script that calls, the Julia executable used to run this command at bin/julia under the moment_kinetics repo, so that setup and job submission scripts can use a known relative path.

    Note

    If you change the Julia executable, e.g. to update to a new verison, you will need to either replace the symlink <moment_kinetics>/bin/julia or edit the bash script at <moment_kinetics>/bin/julia by hand, or re-run this function using the new executable.

Usually it is necessary for Julia to be restarted after running this function to run Julia with the correct JULIA_DEPOT_PATH, etc. so the function will force Julia to exit. If for some reason this is not desired (e.g. when debugging), pass no_force_exit=true.

The interactive argument exists so that when this function is called from another script, terminal output with instructions for the next step can be disabled.

Currently supported machines:

  • "generic-pc" - A generic personal computer (i.e. laptop or desktop machine).. Set up for interactive use, rather than for submitting jobs to a batch queue.
  • "generic-batch" - A generic cluster using a batch queue. Requires some manual setup first, see machines/generic-batch-template/README.md.
  • "archer" - the UK supercomputer ARCHER2
  • "marconi" - the EUROfusion supercomputer Marconi
Note

The settings created by this function are saved in LocalPreferences.toml. It might sometimes be useful to edit these by hand (e.g. the account setting if this needs to be changed.): it is fine to do this.

source
+machine_setup notes · moment_kinetics

machine_setup notes

The machines subdirectory provides scripts to set up Julia and moment_kinetics to run on laptops/desktops or on clusters. If the cluster is not one of the currently supported machines, then some additional manual setup is required.

Currently supported:

  • "generic-pc" - A generic personal computer (i.e. laptop or desktop machine). Set up for interactive use, rather than for submitting jobs to a batch queue.
  • "generic-batch" - A generic cluster using a batch queue. Requires some manual setup first, see machines/generic-batch-template/README.md.
  • "archer" - the UK supercomputer ARCHER2
  • "marconi" - the EUROfusion supercomputer Marconi

The usage is described in Getting started. This page contains some extra technical information.

Notes on some prompts from the script

You will be prompted to enter a location for your .julia directory. If you are installing on a personal computer or on a cluster which allows access to your home directory from compute nodes, it is fine to leave this as the default. If not (e.g. on ARCHER2), you need to set a path which is accessible from the compute nodes. If you want to create a completely self-contained install (e.g. for reproducibility or for debugging some dependency conflicts), you might want to put .julia within the moment_kinetics directory (i.e. enter .julia at the prompt).

Defaults for prompts

The default value for each of the settings that the user is prompted for interactively are first taken from some sensible, machine-specific defaults. When machines/machine_setup.sh is run, the values chosen by the user are saved in the [moment_kinetics] section of LocalPreferences.toml, and these values are used as the defaults next time machines/machine_setup.sh is run, in order to make it easier to re-run the setup, e.g. because some dependencies need updating, or to change just one or a few settings.

A few settings (which are needed before Julia can be started for the first time) are saved into hidden files (.julia_default.txt, .this_machine_name.txt, and .julia_directory_default.txt) instead of into LocalPreferences.toml, to avoid needing to parse a TOML file using bash.

bin/julia

A symlink or script is created at bin/julia to call the chosen julia executable. On HPC systems we create a file julia.env which must be source'd (to load the right modules, etc.) before julia can be used - in this case julia.env can be used to set up any environment variables, etc. so a symlink is sufficient. On laptops/desktops that will be used interactively, it is inconvenient to have to remember to source julia.env, especially if you have multiple instances of moment_kinetics, so instead the necessary setup (of the JULIA_DEPOT_PATH environment variable, if needed, and a Python venv if the Plots-based post processing is enabled) is done by making bin/julia a small bash script, which does that setup and then calls the chosen julia executable, passing through to it any command line arguments.

julia.env

A julia.env file is used on HPC systems to set up the environment (modules and environment variables). On laptop/desktop systems this would be inconvenient (especially if there are multiple instances of moment_kinetics) so a julia.env is not used for these.

The julia.env is created from a template julia.env which is located in the subdirectory of machines/ for the specific machine being set up.

If you need to run julia interactively (for moment_kinetics) on a machine that uses julia.env, either run source julia.env in each terminal session where you want to use moment_kinetics, or add it to your .bashrc (if this does not conflict with any other projects).

Warning

Note that julia.env runs module purge to remove any already loaded modules (to get a clean environment). It is therefore very likely to interfere with other projects.

Setup of post processing packages

See Post processing packages.

Use of system images

On HPC clusters, creating system images moment_kinetics.so and for post processing makie_postproc.so and/or plots_postproc.so is required. This is to avoid (as far as practical) wasting CPU hours doing identical compilation in large parallel jobs. If you wanted to remove this requirement for some reason (although this is not recommended), you would need to go to the subdirectory of machines/ for the machine you are working on, and edit the jobscript-run.template, jobscript-restart.template, jobscript-postprocess.template, and jobscript-postprocess-plotsjl.template files to remove the -J*.so argument. If you do do this, please do not commit those changes and merge them to the master branch of moment_kinetics.

Operations done by machines/machine_setup.sh

The convenience script machine_setup.sh is provide because the actual setup happens in multiple stages, with Julia being restarted in between (as this is required on some machines), and because the script is able to download Julia if Julia is not already installed.

The steps done by machines/machine_setp.sh are:

  1. Get the name of the 'machine' ('generic-pc', 'archer', etc.) so that machine-dependent setup can be done and machine-specific defaults can be used. ()

  2. Download a Julia executable, or prompt the user for the location of one (defaulting to any julia found in $PATH).

  3. Get the location of the .julia directory to be used by (this copy of) moment_kinetics. At this point we have enough setup to start using julia. Export JULIA_DEPOT_PATH so that this is used any time julia is run in the rest of the script.

  4. Run machines/shared/machine_setup.jl. This script (whose functions are documented in API documentation):

    • prompts the user for most of the settings (and saves them to LocalPreferences.toml from where they can be accessed by other scripts later and used as defaults if machines/machine_setup is re-run)
    • creates the julia.env file (from the template for the given machine) on HPC systems
    • creates the bin/julia symlink or script (see bin/julia)
    • creates a link to the compile_dependencies.sh script for the machine (if there is one).
    • installs the Revise package and adds using Revise to the startup.jl file (on laptop/desktop systems, and if the user did not de-select this).

    It is necessary to restart julia after this script has been run, so that we can first source julia.env (if it exists) or use the script at bin/julia in order to use the environment settings in them.

  5. If julia.env exists, run source julia.env to load modules, etc.

  6. Set the optimization flags that will be used for running simulations or for running post processing. These need to be set the same as will be used eventually so that precompilation of dependencies and packages that happens while running machines/machine_setup.sh does not need to be overwritten (due to different optimization flags) later, as this would be a waste of time (although it should work fine).

  7. Add various dependencies to the top-level project, by calling machines/shared/add_dependencies_to_project.jl. This will set up MPI and HDF5 to link to the correct libraries. julia needs to be restarted after the setup of MPI and HDF5 is done, which is why this is a separate script from the following one (this separation also allows add_dependencies_to_project.jl to be re-used in makie_post_processing_setup.jl and plots_post_processing_setup.jl if these are to be set up as separate projects from the top-level one).

  8. Complete the setup by running machines/shared/machine_setup_stage_two.jl, which creates a Python venv with matplotlib installed (if plots_post_processing is enabled), creates symlinks at the top level to scripts to submit batch jobs (if setting up for an HPC cluster), and submits a job to compile a system image for moment_kinetics (if setting up for an HPC cluster, and if the user did not de-select this).

  9. Set up makie_post_processing (if enabled) by running machines/shared/makie_post_processing_setup.jl and/or plots_post_processing (if enabled) by running machines/shared/plots_post_processing_setup.jl. These scripts also submit jobs to create system images for makie_post_processing or plots_post_processing (if setting up for an HPC cluster, and if the user did not de-select this).

  10. Print a message indicating which optimization flags to use for running simulations or for post-processing.

API documentation

moment_kinetics.machine_setup.get_settingFunction
get_setting(setting_name, message, machine, local_defaults,
+            possible_values=nothing)

Prompt the user to set a setting called setting_name after printing message. Default value is read from local_defaults if it exists there (which it will do if it has been set before, as then it is stored in LocalPreferences.toml), or from sensible defaults in the machine section of default_settings otherwise.

source
moment_kinetics.machine_setup.get_user_inputMethod
get_user_input(possible_values, default_value)

Prompt for user input. If the user enters nothing, return default_value. Check that the entered value is one of possible_values, if not prompt again.

source
moment_kinetics.machine_setup.machine_setup_moment_kineticsMethod
machine_setup_moment_kinetics(machine::String; ; no_force_exit::Bool=false,
+                              interactive::Bool=true)

Do setup for a known machine, prompting the user for various settings (with defaults set to sensible values - if the script has been run before, the defaults are the previously used values):

  • On clusters that use a module system, provide julia.env at the top level of the moment_kinetics repo.

    Call

    source julia.env

    to get the correct modules for running moment_kinetics, either on the command line (to get them for the current session) or in your .bashrc (to get them by default). Note that this calls module purge so will remove any currently loaded modules when it is run.

  • Makes a symlink to, or a bash script that calls, the Julia executable used to run this command at bin/julia under the moment_kinetics repo, so that setup and job submission scripts can use a known relative path.

    Note

    If you change the Julia executable, e.g. to update to a new verison, you will need to either replace the symlink <moment_kinetics>/bin/julia or edit the bash script at <moment_kinetics>/bin/julia by hand, or re-run this function using the new executable.

Usually it is necessary for Julia to be restarted after running this function to run Julia with the correct JULIA_DEPOT_PATH, etc. so the function will force Julia to exit. If for some reason this is not desired (e.g. when debugging), pass no_force_exit=true.

The interactive argument exists so that when this function is called from another script, terminal output with instructions for the next step can be disabled.

Currently supported machines:

  • "generic-pc" - A generic personal computer (i.e. laptop or desktop machine).. Set up for interactive use, rather than for submitting jobs to a batch queue.
  • "generic-batch" - A generic cluster using a batch queue. Requires some manual setup first, see machines/generic-batch-template/README.md.
  • "archer" - the UK supercomputer ARCHER2
  • "marconi" - the EUROfusion supercomputer Marconi
Note

The settings created by this function are saved in LocalPreferences.toml. It might sometimes be useful to edit these by hand (e.g. the account setting if this needs to be changed.): it is fine to do this.

source
diff --git a/dev/manual_setup/index.html b/dev/manual_setup/index.html index ba3710b3c8..8b348baef6 100644 --- a/dev/manual_setup/index.html +++ b/dev/manual_setup/index.html @@ -12,4 +12,4 @@ /your/python/location $ julia -O3 --project julia> ENV["PYTHON"]="/your/python/location" -julia> using Pkg; Pkg.build("PyCall") +julia> using Pkg; Pkg.build("PyCall") diff --git a/dev/manufactured_solution_test_examples/index.html b/dev/manufactured_solution_test_examples/index.html index 13a07ef2ae..0ce3a5472c 100644 --- a/dev/manufactured_solution_test_examples/index.html +++ b/dev/manufactured_solution_test_examples/index.html @@ -4,4 +4,4 @@ runs/1D-mirror_MMS_ngrid_9_nel_r_1_z_16_vpa_16_vperp_8_diss.toml runs/1D-mirror_MMS_ngrid_9_nel_r_1_z_32_vpa_32_vperp_16_diss.toml

1D2V/1D3V test (with neutrals)

runs/1D-sound-wave_cheb_nel_r_1_z_2_vpa_4_vperp_4.toml
runs/1D-wall_cheb-with-neutrals_nel_r_1_z_2_vpa_4_vperp_4.toml
runs/1D-wall_cheb-with-neutrals-with-sheath_nel_r_1_z_2_vpa_4_vperp_4.toml

2D1V tests

These tests are used to test the spatial advection in simple cases with wall boundary conditions.

runs/2D-wall_MMS_nel_r_32_z_32_vpa_16_vperp_1_diss.toml

2D2V tests

These tests are used to test the spatial advection in cases with wall boundary conditions or geometrical features where two velocity dimensions are necessary.

runs/2D-sound-wave_cheb_ion_only_nel_r_2_z_2_vpa_4_vperp_4.toml
runs/2D-mirror_MMS_ngrid_5_nel_r_8_z_8_vpa_8_vperp_4_diss.toml
 runs/2D-mirror_MMS_ngrid_5_nel_r_16_z_16_vpa_16_vperp_8_diss.toml
-runs/2D-mirror_MMS_ngrid_5_nel_r_32_z_32_vpa_16_vperp_16_diss.toml

2D2V/2D3V tests

These tests include a two-dimensional domain, ions, and neutrals (which have three velocity dimensions).

runs/2D-wall_cheb-with-neutrals_nel_r_2_z_2_vpa_4_vperp_4.toml
runs/2D-sound-wave_cheb_nel_r_2_z_2_vpa_4_vperp_4.toml
runs/2D-sound-wave_cheb_cxiz_nel_r_2_z_2_vpa_4_vperp_4.toml
+runs/2D-mirror_MMS_ngrid_5_nel_r_32_z_32_vpa_16_vperp_16_diss.toml

2D2V/2D3V tests

These tests include a two-dimensional domain, ions, and neutrals (which have three velocity dimensions).

runs/2D-wall_cheb-with-neutrals_nel_r_2_z_2_vpa_4_vperp_4.toml
runs/2D-sound-wave_cheb_nel_r_2_z_2_vpa_4_vperp_4.toml
runs/2D-sound-wave_cheb_cxiz_nel_r_2_z_2_vpa_4_vperp_4.toml
diff --git a/dev/moment_kinetic_equations/index.html b/dev/moment_kinetic_equations/index.html index 74c71a8e7f..15ee58f9db 100644 --- a/dev/moment_kinetic_equations/index.html +++ b/dev/moment_kinetic_equations/index.html @@ -703,4 +703,4 @@ + \frac{w_{\|,n}^{2}}{2}\frac{v_{\mathrm{th},n}}{n_{n}}\frac{\partial n_{n}}{\partial z}\right]\frac{\partial g_{n}}{\partial w_{\|,n}} \\ & = -R_{in}n_{i}\left(g_{n} - \frac{v_{\mathrm{th},n}}{v_{\mathrm{th},i}}g_{i}\right) - R_{\mathrm{ion}}n_{i}g_{n} + \frac{v_{\mathrm{th},n}}{n_{n}} S_{n} -\end{align}\]

+\end{align}\]

diff --git a/dev/parameter_scans/index.html b/dev/parameter_scans/index.html index 23cc435492..5eda1ed80d 100644 --- a/dev/parameter_scans/index.html +++ b/dev/parameter_scans/index.html @@ -3,4 +3,4 @@ julia> include("run_parameter_scan.jl") julia> run_parameter_scan("path/to/an/input/file.toml")

or to run a single scan from the command line

$ julia -p 8 --project -O3 run_parameter_scan.jl path/to/an/input/file.toml

The -p 8 argument passed to julia in these examples is optional. It indicates that julia should use 8 processes for parallelism. In this case we are not using MPI - each run in the scan is run in serial, but up to 8 (in this example) runs from the scan can be performed simultaneously (using the @distributed macro).

The runs can use MPI - in this case call julia using mpirun, etc. as usual but do not pass the -p argument. Mixing MPI and @distributed would cause oversubscription and slow everything down. The runs will run one after the other, and each run will be MPI parallelised.

The inputs (see moment_kinetics.parameter_scans.get_scan_inputs) can be passed to the function in a Dict, or read from a TOML file.

run_parameter_scan can also be passed a directory (either as an argument to the function or from the command line), in which case it will perform a run for every input file contained in that directory.

Post processing a scan

makie_post_processing.makie_post_process can be called for each run in a scan. For example to post process the scan in runs/scan_example from the REPL

$ julia -p 8 --project -O3
 julia> include("post_process_parameter_scan.jl")
-julia> post_process_parameter_scan("runs/scan_example/")

or to from the command line

$ julia -p 8 --project -O3 post_process_parameter_scan.jl runs/scan_example/

Again the -p 8 argument passed to julia in these examples is optional. It indicates that julia should use 8 processes for parallelism. Each run in the scan is post-processed in serial, but up to 8 (in this example) runs from the scan can be post-processed simultaneously (using the @distributed macro).

API

moment_kinetics.parameter_scans.generate_scan_input_filesFunction
generate_scan_input_files(filename::AbstractString, dirname=nothing)

Read inputs for a scan from a TOML file and call generate_scan_input_files(scan_input::AbstractDict, dirname::AbstractString).

By default, dirname will be set to filename with the .toml extension removed.

source
moment_kinetics.parameter_scans.generate_scan_input_filesMethod
generate_scan_input_files(scan_input::AbstractDict, dirname::AbstractString)

Generate individual input files for each run in the scan specified by scan_input, saving the generated files in dirname

Inputs are generated by calling get_scan_inputs(scan_inputs::AbstractDict).

source
moment_kinetics.parameter_scans.get_scan_inputsMethod
get_scan_inputs(scan_inputs::AbstractDict)

Make a set of inputs for a parameter scan.

scan_inputs is like a Dict of inputs for run_moment_kinetics, except that any value may be an array instead of a scalar. The values passed as arrays will be combined as follows.

A special, extra, setting combine_outer can be passed, with the names of options to combine using an 'outer product'

By default, inputs are combined with an 'inner product', i.e. inputs a,b,c are combined as (a[1],b[1],c[1]), (a[2],b[2],c[2]), etc. Any inputs named in 'combine_outer' are instead combined with an 'outer product', i.e. an entry is created for every value of those inputs combined with every combination of the other inputs.

Returns a Vector{OrderedDict} whose entries are the input for a single run in the parameter scan.

source
moment_kinetics.parameter_scans.get_scan_inputsMethod
get_scan_inputs(file_or_dir::AbstractString)

If file_or_dir is a file, read input from it using TOML , and call get_scan_inputs(scan_inputs::AbstractDict).

If file_or_dir is a directory, read input from all the .toml files in the directory, returning the inputs as a Vector{OrderedDict}.

source
moment_kinetics.parameter_scans.get_scan_inputsMethod
get_scan_inputs()

Get input file name from command line options, and call get_scan_inputs(filename::AbstractString)

source
+julia> post_process_parameter_scan("runs/scan_example/")

or to from the command line

$ julia -p 8 --project -O3 post_process_parameter_scan.jl runs/scan_example/

Again the -p 8 argument passed to julia in these examples is optional. It indicates that julia should use 8 processes for parallelism. Each run in the scan is post-processed in serial, but up to 8 (in this example) runs from the scan can be post-processed simultaneously (using the @distributed macro).

API

moment_kinetics.parameter_scans.generate_scan_input_filesFunction
generate_scan_input_files(filename::AbstractString, dirname=nothing)

Read inputs for a scan from a TOML file and call generate_scan_input_files(scan_input::AbstractDict, dirname::AbstractString).

By default, dirname will be set to filename with the .toml extension removed.

source
moment_kinetics.parameter_scans.generate_scan_input_filesMethod
generate_scan_input_files(scan_input::AbstractDict, dirname::AbstractString)

Generate individual input files for each run in the scan specified by scan_input, saving the generated files in dirname

Inputs are generated by calling get_scan_inputs(scan_inputs::AbstractDict).

source
moment_kinetics.parameter_scans.get_scan_inputsMethod
get_scan_inputs(scan_inputs::AbstractDict)

Make a set of inputs for a parameter scan.

scan_inputs is like a Dict of inputs for run_moment_kinetics, except that any value may be an array instead of a scalar. The values passed as arrays will be combined as follows.

A special, extra, setting combine_outer can be passed, with the names of options to combine using an 'outer product'

By default, inputs are combined with an 'inner product', i.e. inputs a,b,c are combined as (a[1],b[1],c[1]), (a[2],b[2],c[2]), etc. Any inputs named in 'combine_outer' are instead combined with an 'outer product', i.e. an entry is created for every value of those inputs combined with every combination of the other inputs.

Returns a Vector{OrderedDict} whose entries are the input for a single run in the parameter scan.

source
moment_kinetics.parameter_scans.get_scan_inputsMethod
get_scan_inputs(file_or_dir::AbstractString)

If file_or_dir is a file, read input from it using TOML , and call get_scan_inputs(scan_inputs::AbstractDict).

If file_or_dir is a directory, read input from all the .toml files in the directory, returning the inputs as a Vector{OrderedDict}.

source
moment_kinetics.parameter_scans.get_scan_inputsMethod
get_scan_inputs()

Get input file name from command line options, and call get_scan_inputs(filename::AbstractString)

source
diff --git a/dev/post_processing_notes/index.html b/dev/post_processing_notes/index.html index d16a494ea5..0be41da44e 100644 --- a/dev/post_processing_notes/index.html +++ b/dev/post_processing_notes/index.html @@ -3,4 +3,4 @@ julia> makie_post_process("runs/example-run/")

or

julia> makie_post_process("runs/example-run1/", "runs/example-run2/", "runs/example-run3/")

What this function does is controlled by the settings in an input file, by default post_processing_input.toml.

To run from the command line

julia --project run_makie_post_processing.jl dir1 [dir2 [dir3 ...]]

If multiple directories are passed, comparison plots will be made. This usually means that for line plots and animations the output for all the runs will be drawn on the same plot. For heatmap plots, the runs will be plotted side by side.

If there is output from several restarts of the same run in a directory, by default they will all be read and plotted. A single restart can be started by passing the restart_id argument to makie_post_process().

It is also possible to pass an output file (*.moments.h5 or *.dfns.h5) instead of a directory. The file name is just used to find the directory and run_name (which is the prefix of the file name), so for example you can pass a *.moments.h5 file and ask for distribution function plots (as long as the corresponding *.dfns.h5 file exists). This is useful if some output files were moved to a different directory, or the run directory was renamed (e.g. for backup, or to compare some different input options or code versions).

To see all the options that can be set, makie_post_processing.generate_example_input_file can be used to create an example file containing all the options with their default values. The options are all commented out when the file is created.

Viewing animations

Animations are produced in .gif format. Most utilities just play gifs, but provide no options to pause them, etc. One that provides a few more features is multigifview (developed by @johnomotani).

Interactive use

The functions in makie_post_processing.makie_post_processing can be used interactively (or in standalone scripts). To do so, first get the 'info' for a run (file names, metadata, etc.) using makie_post_processing.get_run_info

julia> using makie_post_processing
 julia> run_info = get_run_info("runs/example-run/")

or to load from the distribution functions output file .dfns.h5

julia> run_info_dfns = get_run_info("runs/example-run/"; dfns=true)

Settings for post-processing are read from an input file, by default post_processing_input.toml (you can select a different one using the setup_input_file argument to get_run_info()). The relevant settings for interactive use are the default indices (iz0, ivpa0, etc.) that are used to select slices for 1D/2D plots and animations. The settings are read by setup_makie_post_processing!() which is called by default as part of get_run_info(). You might want to call it directly if you load both 'moments' and 'distribution functions' data, to get sensible settings for both at the same time.

Then you can make 1d or 2d plots, e.g.

julia> fig1 = plot_vs_z(run_info, "phi")
 julia> fig2 = plot_vs_r_t(run_info, "density"; outfile="density_vs_r_t.pdf")

using makie_post_processing.plot_vs_t, etc. for 1d and makie_post_processing.plot_vs_r_t, etc. for 2d plots. The outfile argument can be used to save the plot. You can also change the default values used to select from the other dimensions

julia> plot_vs_z(run_info, "phi"; outfile="phi_vs_z.pdf", it=42, ir=7)

You can make animations in a similar way

julia> fig1 = animate_vs_z(run_info, "phi"; outfile="phi_vs_z.gif", it=8:12, ir=1)
-julia> fig2 = animate_vs_z_r(run_info, "density"; outfile="density_vs_z_r.mp4")

using makie_post_processing.animate_vs_r, etc. for 1d and makie_post_processing.animate_vs_z_r, etc. for 2d animations. Note that outfile is required for animations.

API

See makie_post_processing.

+julia> fig2 = animate_vs_z_r(run_info, "density"; outfile="density_vs_z_r.mp4")

using makie_post_processing.animate_vs_r, etc. for 1d and makie_post_processing.animate_vs_z_r, etc. for 2d animations. Note that outfile is required for animations.

API

See makie_post_processing.

diff --git a/dev/search/index.html b/dev/search/index.html index 27aa70dbcb..0d51ad6dee 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · moment_kinetics

Loading search...

    +Search · moment_kinetics

    Loading search...

      diff --git a/dev/search_index.js b/dev/search_index.js index e8bf6084c8..842043d11f 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"zz_moment_kinetics_structs/#moment_kinetics_structs","page":"moment_kinetics_structs","title":"moment_kinetics_structs","text":"","category":"section"},{"location":"zz_moment_kinetics_structs/","page":"moment_kinetics_structs","title":"moment_kinetics_structs","text":"Modules = [moment_kinetics.moment_kinetics_structs]","category":"page"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs","text":"structs used within moment_kinetics that should be defined early to avoid dependency cycles when they are used by several other modules.\n\n\n\n\n\n","category":"module"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.boundary_distributions_struct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.boundary_distributions_struct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.discretization_info","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.discretization_info","text":"discretization_info for one dimension\n\nAll the specific discretizations in moment_kinetics are subtypes of this type.\n\n\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.electron_pdf_substruct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.electron_pdf_substruct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.em_fields_struct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.em_fields_struct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.moments_electron_substruct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.moments_electron_substruct","text":"momentselectronsubstruct is a struct that contains moment information for electrons\n\n\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.moments_ion_substruct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.moments_ion_substruct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.moments_neutral_substruct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.moments_neutral_substruct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.moments_struct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.moments_struct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.null_spatial_dimension_info","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.null_spatial_dimension_info","text":"Type representing a spatial dimension with only one grid point\n\n\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.null_velocity_dimension_info","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.null_velocity_dimension_info","text":"Type representing a velocity space dimension with only one grid point\n\n\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.pdf_struct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.pdf_struct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.pdf_substruct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.pdf_substruct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.scratch_electron_pdf","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.scratch_electron_pdf","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.scratch_pdf","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.scratch_pdf","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.weak_discretization_info","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.weak_discretization_info","text":"discretization_info for a discretization that supports 'weak form' methods, for one dimension\n\n\n\n\n\n","category":"type"},{"location":"shared_memory_debugging/#Shared-memory-debugging","page":"Shared memory debugging","title":"Shared memory debugging","text":"","category":"section"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"This debug_test directory contains scripts for running a set of short runs, intended to be used with the --debug flag to check for bugs (e.g. race conditions). The output is not checked - the intention is just to catch errors raised by the debugging checks.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"The inputs only have 3 time-steps, and very few grid points, because the debug checks are very slow. The actual output is not important, so it does not matter that the runs are badly under-resolved.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"It may be necessary to use the --compiled-modules=no flag to Julia for changes to the --debug setting to be picked up correctly. This setting means that all precompilation is redone each time Julia is started, which can be slow. An alternative workaround is to hard-code the moment_kinetics.debugging._debug_level variable in debugging.jl to the desired value.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"To run the debug tests, call (from the top-level moment_kinetics directory) something like","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"julia --project --check-bounds=yes --compiled-modules=no debug_test/runtests.jl --debug 99","category":"page"},{"location":"shared_memory_debugging/#Collision-operator-and-'anyv'-region","page":"Shared memory debugging","title":"Collision operator and 'anyv' region","text":"","category":"section"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"The collision operator uses a slightly hacky special set of functions for shared memory parallelism, to allow the outer loop over species and spatial dimensions to be parallelised, but also inner loops over vperp, vpa or vperp and vpa to be parallelised - changing the type of inner-loop parallelism within the outer loop. This happens within an 'anyv' region, which is started with the begin_s_r_z_anyv_region() function. The debug checks within an 'anyv' region only check for correctness on the sub-block communicator that parallelises over velocity space, so if there were errors due to incorrect species or spatial parallelism they would not (might not?) be detected. These errors should be unlikely as the collision operator only writes to a single species at a single spatial point.","category":"page"},{"location":"shared_memory_debugging/#Finding-race-conditions","page":"Shared memory debugging","title":"Finding race conditions","text":"","category":"section"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"The code is parallelized using MPI with shared memory arrays. 'Race conditions' can occur if a shared array is accessed incorrectly. All the processes sharing an array can be synchronized, ensuring they pass through the following code block with a consistent state, by using the _block_synchronize() function (which calls MPI.Barrier() to synchronize the processes). Race conditions occur if between consecutive calls to _block_synchronize() any array is:","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"written by 2 or more processes at the same position\nwritten by one process at a certain position, and read by one or more other processes at the same position.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"If a race condition occurs, it can result in errors in the results. These are sometimes small, but often show inconsistent results between runs (because results erroneously depend on the execution order on different processes). They are undefined behaviour though, and so can also cause anything up to segfaults.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"The provided debugging routines can help to pin down where either of these errors happen.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"The @debug_shared_array macro (activated at --debug 2 or higher) counts all reads and writes to shared arrays by each process, and checks at each _block_synchronize() call whether either pattern has occurred since the previous _block_synchronize(). If they have and in addition @debug_track_array_allocate_location is active (--debug 3 or higher), then the array for which the error occured is identified by printing a stack-trace of the location where it was allocated, and the stack-trace for the exception shows the location of the _block_synchronize() call where the error occured.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"@debug_block_synchronize (activated at --debug 4)checks that all processes called _block_synchronize() from the same place - i.e. the same line in the code, checked by comparing stack traces.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"@debug_detect_redundant_block_synchronize (activated at --debug 5) aims to find any unnecessary calls to _block_synchronize(). These calls can be somewhat expensive (for large numbers of processes at least), so it is good to minimise the number. When this mode is active, at each _block_synchronize() a check is made whether there would be a race-condition error if the previous _block_synchronize() call was removed. If there would not be, then the previous call was unnecessary and could be removed. The tricky part is that whether it was necessary or not could depend on the options being used... Detecting redundant block_synchronize() calls requires that all dimensions that could be split over processes are actually split over processes, which demands a large number of processes are used. The @debug_detect_redundant_block_synchronize flag, when activated, modifies the splitting algorithm to force every dimension to be split if possible, and raise an error if not.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"Suggested debugging strategy for race conditions is:","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"Look at the loop types and ensure that there is an appropriate begin_*_region() call before each new loop type.\nRun debug_test/runtests.jl with @debug_shared_array activated, but not @debug_detect_redundant_block_synchronize. It will be faster to first run without @debug_track_array_allocate_location to find failing tests, then with @debug_track_array_allocate_location to help identify the cause of the failure. Usually a failure should indicate where there is a missing begin_*_region() call. There may be places though where synchronization is required even though the type of loop macros used does not change (for example when phi is calculated contributions from all ion species need to be summed, resulting in an unusual pattern of array accesses); in this case _block_synchronize() can be called directly.\nThe function debug_check_shared_memory() can be inserted between begin_*_region() calls when debugging to narrow down the location where the incorrect array access occured. It is defined when @debug_shared_array is active, and can be imported with using ..communication: debug_check_shared_memory(). The function runs the same error checks as are added by @debug_shared_array in _block_synchronize().\nThe tests in debug_test/ check for correctness by looping over the dimensions and forcing each to be split over separate processes in turn. This allows the correctness checks to be run using only 2 processes, which would not be possible if all dimensions had to be split at the same time.\n[This final level of checking only looks for minor optimizations rather than finding bugs, so it is much less important than the checks above.] Run debug_test/debug_redundant_synchronization/runtests.jl with @debug_detect_redundant_block_synchronize activated. This should show if any call to _block_synchronize() (including the ones inside begin_*_region() calls) was 'unnecessary' - i.e. there would be no incorrect array accesses if it was removed. This test needs to be run on a suitable combination of grid sizes and numbers of processes so that all dimensions are split across multiple processes to avoid false positives. Any redundant calls which appear in all tests can be deleted. Redundant calls that appear in only some tests (unless they are in some code block that is just not called in all the other tests) should preferably be moved inside a conditional block, so that they are called only when necessary, if a suitable one exists. If there is no conditional block that the call can be moved to, it may sometimes be necessary to just test one or more options before calling, e.g.\nmoments.evolve_upar && _block_synchronize()\nThe checks for redundant _block_synchronize() calls have been separated from the correctness checks so that the correctness checks can be run in the CI using only 2 processes, while the redundancy checks can be run manually on a machine with enough memory and cpu cores.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"You can find out what loop type is currently active by looking at loop_ranges[].parallel_dims. This variable is a Tuple containing Symbols for each dimension currently being parallelized.","category":"page"},{"location":"zz_analysis/#analysis","page":"analysis","title":"analysis","text":"","category":"section"},{"location":"zz_analysis/","page":"analysis","title":"analysis","text":"Modules = [moment_kinetics.analysis]","category":"page"},{"location":"zz_analysis/#moment_kinetics.analysis","page":"analysis","title":"moment_kinetics.analysis","text":"\n\n\n\n","category":"module"},{"location":"zz_analysis/#moment_kinetics.analysis.analyze_2D_instability-NTuple{7, Any}","page":"analysis","title":"moment_kinetics.analysis.analyze_2D_instability","text":"\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.analyze_fields_data-Tuple{Any, Any, Any}","page":"analysis","title":"moment_kinetics.analysis.analyze_fields_data","text":"\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.analyze_moments_data-NTuple{8, Any}","page":"analysis","title":"moment_kinetics.analysis.analyze_moments_data","text":"\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.analyze_pdf_data-NTuple{7, Any}","page":"analysis","title":"moment_kinetics.analysis.analyze_pdf_data","text":"\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.check_Chodura_condition","page":"analysis","title":"moment_kinetics.analysis.check_Chodura_condition","text":"Check the (kinetic) Chodura condition\n\nChodura condition is: ∫d^3v F/vpa^2 ≤ mi ne/Te\n\nReturn a tuple (whose first entry is the result for the lower boundary and second for the upper) of the ratio which is 1 if the Chodura condition is satisfied (with equality): Te/(mi ne) * ∫d^3v F/vpa^2\n\nCurrently only evaluates condition for the first species: is=1\n\n2D2V\n\nIn normalised form (normalised variables suffixed with 'N'): vpa = cref vpaN vperp = cref vperpN ne = nref neN Te = Tref TeN F = FN nref / cref^3 pi^3/2 cref = sqrt(2 Tref / mi)\n\ncref^3 ∫d^3vN FN nref / cref^3 pi^3/2 cref^2 vpaN^2 ≤ mi nref neN / Tref TeN nref / (pi^3/2 cref^2) * ∫d^3vN FN / vpaN^2 ≤ mi nref neN / Tref TeN mi nref / (pi^3/2 2 Tref) * ∫d^3vN FN / vpaN^2 ≤ mi nref neN / Tref TeN 1 / (2 pi^3/2) * ∫d^3vN FN / vpaN^2 ≤ neN / TeN 1 / (2 pi^3/2) * ∫d^3vN FN / vpaN^2 ≤ neN / TeN TeN / (2 neN pi^3/2) * ∫d^3vN FN / vpaN^2 ≤ 1\n\nNote that integrate_over_vspace() includes the 1/pi^3/2 factor already.\n\n1D1V\n\nThe 1D1V code evolves the marginalised distribution function f = ∫d^2vperp F so the Chodura condition becomes ∫dvpa f/vpa^2 ≤ mi ne/Te\n\nIn normalised form (normalised variables suffixed with 'N'): vpa = cref vpaN ne = nref neN Te = Tref TeN f = fN nref / cref sqrt(pi) cref = sqrt(2 Tref / mi)\n\ncref ∫dvpaN fN nref / cref sqrt(pi) cref^2 vpaN^2 ≤ mi nref neN / Tref TeN nref / (sqrt(pi) cref^2) * ∫dvpaN fN / vpaN^2 ≤ mi nref neN / Tref TeN mi nref / (sqrt(pi) 2 Tref) * ∫dvpaN fN / vpaN^2 ≤ mi nref neN / Tref TeN 1 / (2 sqrt(pi)) * ∫dvpaN fN / vpaN^2 ≤ neN / TeN 1 / (2 sqrt(pi)) * ∫dvpaN fN / vpaN^2 ≤ neN / TeN TeN / (2 neN sqrt(pi)) * ∫dvpaN fN / vpaN^2 ≤ 1\n\nNote that integrate_over_vspace() includes the 1/sqrt(pi) factor already.\n\nIf ir0 is passed, only load the data for as single r-point (to save memory).\n\nIf find_extra_offset=true is passed, calculates how many entries of f_lower/f_upper adjacent to v_=0 would need to be zero-ed out in order for the condition to be satisfied.\n\n\n\n\n\n","category":"function"},{"location":"zz_analysis/#moment_kinetics.analysis.field_line_average-Tuple{Any, Any, Any}","page":"analysis","title":"moment_kinetics.analysis.field_line_average","text":"\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.fit_cosine","page":"analysis","title":"moment_kinetics.analysis.fit_cosine","text":"Fit a cosine to a 1d array\n\nFit function is Acos(2πn(z + δ)/L)\n\nThe domain z is taken to be periodic, with the first and last points identified, so L=z[end]-z[begin]\n\nArguments\n\nz : Array 1d array with positions of the grid points - should have the same length as data data : Array 1d array of the data to be fit amplitudeguess : Float Initial guess for the amplitude (the value from the previous time point might be a good choice) offsetguess : Float Initial guess for the offset (the value from the previous time point might be a good choice) n : Int, default 1 The periodicity used for the fit\n\nReturns\n\namplitude : Float The amplitude A of the cosine fit offset : Float The offset δ of the cosine fit error : Float The RMS of the difference between data and the fit\n\n\n\n\n\n","category":"function"},{"location":"zz_analysis/#moment_kinetics.analysis.fit_delta_phi_mode-Tuple{Any, Any, Any}","page":"analysis","title":"moment_kinetics.analysis.fit_delta_phi_mode","text":"Fit delta_phi to get the frequency and growth rate.\n\nNote, expect the input to be a standing wave (as simulations are initialised with just a density perturbation), so need to extract both frequency and growth rate from the time-variation of the amplitude.\n\nThe function assumes that if the amplitude does not cross zero, then the mode is non-oscillatory and so fits just an exponential, not exp*cos. The simulation used as input should be long enough to contain at least ~1 period of oscillation if the mode is oscillatory or the fit will not work.\n\nArguments\n\nz : Array{mkfloat, 1} 1d array of the grid point positions t : Array{mkfloat, 1} 1d array of the time points deltaphi : Array{mkfloat, 2} 2d array of the values of delta_phi(z, t)\n\nReturns\n\nphifitresult struct whose fields are: growthrate : mkfloat Fitted growth rate of the mode amplitude0 : mkfloat Fitted amplitude at t=0 frequency : mkfloat Fitted frequency of the mode offset0 : mkfloat Fitted offset at t=0 amplitudefiterror : mkfloat RMS error in fit to ln(amplitude) - i.e. ln(A) offsetfiterror : mkfloat RMS error in fit to offset - i.e. δ cosinefiterror : mkfloat Maximum of the RMS errors of the cosine fits at each time point amplitude : Array{mkfloat, 1} Values of amplitude from which growthrate fit was calculated offset : Array{mk_float, 1} Values of offset from which frequency fit was calculated\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.get_Fourier_modes_1D-Union{Tuple{T}, Tuple{AbstractArray{T, 3}, moment_kinetics.coordinates.coordinate, Any, Any}} where T","page":"analysis","title":"moment_kinetics.analysis.get_Fourier_modes_1D","text":"Get 1D Fourier transform (in r) of nonuniformdata\n\nFirst interpolates to uniform grid, then uses FFT.\n\nIf zind is not given, find the zind where mode seems to be growing most strongly.\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.get_Fourier_modes_2D-Union{Tuple{T}, Tuple{AbstractArray{T, 3}, moment_kinetics.coordinates.coordinate, Any, moment_kinetics.coordinates.coordinate, Any}} where T","page":"analysis","title":"moment_kinetics.analysis.get_Fourier_modes_2D","text":"Get 2D Fourier transform (in r and z) of nonuniformdata\n\nFirst interpolates to uniform grid, then uses FFT\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.get_r_perturbation-Union{Tuple{AbstractArray{T, 3}}, Tuple{T}} where T","page":"analysis","title":"moment_kinetics.analysis.get_r_perturbation","text":"Return (v - mean(v, dims=2))\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.get_unnormalised_f_coords_2d-NTuple{9, Any}","page":"analysis","title":"moment_kinetics.analysis.get_unnormalised_f_coords_2d","text":"Get the unnormalised distribution function and unnormalised ('lab space') coordinates.\n\nInputs should depend only on z and vpa.\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.get_unnormalised_f_dzdt_1d-NTuple{8, Any}","page":"analysis","title":"moment_kinetics.analysis.get_unnormalised_f_dzdt_1d","text":"Get the unnormalised distribution function and unnormalised ('lab space') dzdt coordinate at a point in space.\n\nInputs should depend only on vpa.\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.moving_average-Tuple{AbstractVector, Int64}","page":"analysis","title":"moment_kinetics.analysis.moving_average","text":"Calculate a moving average\n\nresult[i] = mean(v[i-n:i+n])\n\nExcept near the ends of the array where indices outside the range of v are skipped.\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.steady_state_residuals-Tuple{Any, Any, Any}","page":"analysis","title":"moment_kinetics.analysis.steady_state_residuals","text":"steady_state_residuals(variable, variable_at_previous_time, dt;\n epsilon=0.0001, use_mpi=false)\n\nCalculate how close a variable is to steady state.\n\nCalculates several quantities. Define the 'squared absolute residual' r_mathrmabs(t)^2 for a quantity a(tx) as\n\nr_mathrmabs(t)^2 = left( a(tx) - a(t - delta tx) right)\n\nand the 'squared relative residual' r_mathrmrel(t)^2\n\nr_mathrmrel(t)^2 = left( fraca(tx) - a(t - delta tx)delta t left a(tx) + epsilon max_x(a(tx)) right right)\n\nwhere x stands for any spatial and velocity coordinates, and the offset epsilon max_x(a(tx)) is used to avoid points where a(tx) happens to be very close to zero from dominating the result in the 'squared relative residual', with max_x being the maximum over the x coordinate(s). Returns an OrderedDict containing: the maximum 'absolute residual' max_xleft( sqrtr_mathrmabs(t)^2 right) (\"RMS absolute residual\"); the root-mean-square (RMS) 'absolute residual' left sqrtr_mathrmabs(t)^2 right_x (\"max absolute residual\"); the maximum 'relative residual' max_xleft( sqrtr_mathrmrel(t)^2 right) (\"RMS relative residual\"); the root-mean-square (RMS) 'relative residual' left sqrtr_mathrmrel(t)^2 right_x (\"max relative residual\").\n\nvariable gives the value of a(tx) at the current time, variable_at_previous_time the value a(t - delta t x) at a previous time and dt gives the difference in times delta t. All three can be arrays with a time dimension of the same length, or have no time dimension.\n\nBy default runs in serial, but if use_mpi=true is passed, assume MPI has been initialised, and that variable has r and z dimensions but no species dimension, and use @loop_* macros. In this case the result is returned only on global rank 0. When using distributed-memory MPI, this routine will double-count the points on block boundaries.\n\nIf only_max_abs=true is passed, then only calculate the 'maxium absolute residual'. In this case the OrderedDict returned will have only one entry, for \"max absolute residual\".\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.steady_state_square_residuals-Tuple{Any, Any, Any}","page":"analysis","title":"moment_kinetics.analysis.steady_state_square_residuals","text":"steady_state_square_residuals(variable, variable_at_previous_time, dt;\n variable_max=nothing, epsilon=1.0e-4,\n use_mpi=false, only_max_abs=false)\n\nUsed to calculate the mean square residual for steady_state_residuals.\n\nUseful to define this separately as it can be called on (equally-sized) chunks of the variable and then combined appropriately. If this is done, the global maximum of abs.(variable) should be passed to variable_max.\n\nSee steady_state_residuals for documenation of the other arguments. The return values of steady_state_residuals are the square-root of the return values of this function.\n\n\n\n\n\n","category":"method"},{"location":"zz_quadrature/#quadrature","page":"quadrature","title":"quadrature","text":"","category":"section"},{"location":"zz_quadrature/","page":"quadrature","title":"quadrature","text":"Modules = [moment_kinetics.quadrature]","category":"page"},{"location":"zz_quadrature/#moment_kinetics.quadrature","page":"quadrature","title":"moment_kinetics.quadrature","text":"\n\n\n\n","category":"module"},{"location":"zz_quadrature/#moment_kinetics.quadrature.composite_simpson_weights-Tuple{Any}","page":"quadrature","title":"moment_kinetics.quadrature.composite_simpson_weights","text":"compositesimpsonweights creates, computes, and returns an array for the 1D integration weights associated with each grid point using composite Simpson's rule\n\n\n\n\n\n","category":"method"},{"location":"zz_input_structs/#input_structs","page":"input_structs","title":"input_structs","text":"","category":"section"},{"location":"zz_input_structs/","page":"input_structs","title":"input_structs","text":"Modules = [moment_kinetics.input_structs]","category":"page"},{"location":"zz_input_structs/#moment_kinetics.input_structs","page":"input_structs","title":"moment_kinetics.input_structs","text":"\n\n\n\n","category":"module"},{"location":"zz_input_structs/#moment_kinetics.input_structs.advance_info","page":"input_structs","title":"moment_kinetics.input_structs.advance_info","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.advection_input","page":"input_structs","title":"moment_kinetics.input_structs.advection_input","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.collisions_input","page":"input_structs","title":"moment_kinetics.input_structs.collisions_input","text":"Collisions input struct to contain all the different collisions substructs and overall collision input parameters.\n\n\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.electron_physics_type","page":"input_structs","title":"moment_kinetics.input_structs.electron_physics_type","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.em_fields_input","page":"input_structs","title":"moment_kinetics.input_structs.em_fields_input","text":"Settings for electronmagenetic fields\n\n\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.geometry_input","page":"input_structs","title":"moment_kinetics.input_structs.geometry_input","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.ion_source_data","page":"input_structs","title":"moment_kinetics.input_structs.ion_source_data","text":"Source profile structs for ions and electrons which allows them to have any number of different sources (from wall perhaps, superposition of core sources, etc.). These sources are then contained in a vector of structs.\n\nSince the ion source must be the same as the electron source in all respects (apart from possibly a different electron temperature or source strength), the electron vector of source profile structs will be a kind of mirror of the ion vector of structs. \n\n\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.ion_species_parameters","page":"input_structs","title":"moment_kinetics.input_structs.ion_species_parameters","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.neutral_species_parameters","page":"input_structs","title":"moment_kinetics.input_structs.neutral_species_parameters","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.pp_input","page":"input_structs","title":"moment_kinetics.input_structs.pp_input","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.spatial_initial_condition_input","page":"input_structs","title":"moment_kinetics.input_structs.spatial_initial_condition_input","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.species_composition","page":"input_structs","title":"moment_kinetics.input_structs.species_composition","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.time_info","page":"input_structs","title":"moment_kinetics.input_structs.time_info","text":"t_error_sum is included so that a type which might be mkfloat or Float128 can be set by an option but known at compile time when a `timeinfo` struct is passed as a function argument.\n\n\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.velocity_initial_condition_input","page":"input_structs","title":"moment_kinetics.input_structs.velocity_initial_condition_input","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#Base.get-Tuple{Dict, Any, Enum}","page":"input_structs","title":"Base.get","text":"Utility method for converting a string to an Enum when getting from a Dict, based on the type of the default value\n\n\n\n\n\n","category":"method"},{"location":"zz_input_structs/#moment_kinetics.input_structs.Dict_to_NamedTuple-Tuple{Any}","page":"input_structs","title":"moment_kinetics.input_structs.Dict_to_NamedTuple","text":"Convert a Dict whose keys are String or Symbol to a NamedTuple\n\nUseful as NamedTuple is immutable, so option values cannot be accidentally changed.\n\n\n\n\n\n","category":"method"},{"location":"zz_input_structs/#moment_kinetics.input_structs.check_sections!-Tuple{AbstractDict}","page":"input_structs","title":"moment_kinetics.input_structs.check_sections!","text":"check_sections!(options::AbstractDict)\n\nCheck that there are no unexpected sections in options. The 'expected sections' are the ones that were defined with set_defaults_and_check_section!.\n\n\n\n\n\n","category":"method"},{"location":"zz_input_structs/#moment_kinetics.input_structs.options_to_TOML-Tuple","page":"input_structs","title":"moment_kinetics.input_structs.options_to_TOML","text":"options_to_toml(io::IO [=stdout], data::AbstractDict; sorted=false, by=identity)\n\nConvert moment_kinetics 'options' (in the form of a Dict) to TOML format.\n\nThis function is defined so that we can handle some extra types, for example Enum.\n\nFor descriptions of the arguments, see TOML.print.\n\n\n\n\n\n","category":"method"},{"location":"zz_input_structs/#moment_kinetics.input_structs.set_defaults_and_check_section!","page":"input_structs","title":"moment_kinetics.input_structs.set_defaults_and_check_section!","text":"set_defaults_and_check_section!(options::AbstractDict, struct_type::Type,\n name::Union{String,Nothing}=nothing)\n\nAlternative form to be used when the options should be stored in a struct of type struct_type rather than a NamedTuple. struct_type must be defined using @kwdef.\n\nThe returned instance of struct_type is immutable, so if you need to modify the settings\n\ne.g. to apply some logic to set defaults depending on other settings/parameters - then\n\nyou should use the 'standard' version of set_defaults_and_check_section! that returns a Dict that can be modified, and then use that Dict to initialise the struct_type.\n\nThe name of the section in the options that will be read defaults to the name of struct_type, but can be set using the section_name argument.\n\nReturns an instance of struct_type.\n\n\n\n\n\n","category":"function"},{"location":"zz_input_structs/#moment_kinetics.input_structs.set_defaults_and_check_section!-Tuple{AbstractDict, Any}","page":"input_structs","title":"moment_kinetics.input_structs.set_defaults_and_check_section!","text":"Set the defaults for options in a section, and check that there are not any unexpected options (i.e. options that have no default).\n\nModifies the options[section_name]::Dict by adding defaults for any values that are not already present.\n\n\n\n\n\n","category":"method"},{"location":"zz_input_structs/#moment_kinetics.input_structs.set_defaults_and_check_top_level!-Tuple{AbstractDict}","page":"input_structs","title":"moment_kinetics.input_structs.set_defaults_and_check_top_level!","text":"Set the defaults for options in the top level of the input, and check that there are not any unexpected options (i.e. options that have no default).\n\nModifies the options[section_name]::Dict by adding defaults for any values that are not already present.\n\nIgnores any sections, as these will be checked separately.\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#array_allocation","page":"array_allocation","title":"array_allocation","text":"","category":"section"},{"location":"zz_array_allocation/","page":"array_allocation","title":"array_allocation","text":"Modules = [moment_kinetics.array_allocation]","category":"page"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation","page":"array_allocation","title":"moment_kinetics.array_allocation","text":"\n\n\n\n","category":"module"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_bool-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_bool","text":"allocate array with dimensions given by dims and entries of type Bool\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_complex-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_complex","text":"allocate 1d array with dimensions given by dims and entries of type Complex{mk_float}\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_float-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_float","text":"allocate array with dimensions given by dims and entries of type mk_float\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_int-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_int","text":"allocate 1d array with dimensions given by dims and entries of type mk_int\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_shared_bool-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_shared_bool","text":"variant where array is in shared memory for all processors in the 'block'\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_shared_complex-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_shared_complex","text":"variant where array is in shared memory for all processors in the 'block'\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_shared_float-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_shared_float","text":"variant where array is in shared memory for all processors in the 'block'\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_shared_int-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_shared_int","text":"variant where array is in shared memory for all processors in the 'block'\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#vpa_advection","page":"vpa_advection","title":"vpa_advection","text":"","category":"section"},{"location":"zz_vpa_advection/","page":"vpa_advection","title":"vpa_advection","text":"Modules = [moment_kinetics.vpa_advection]","category":"page"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection","page":"vpa_advection","title":"moment_kinetics.vpa_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.implicit_vpa_advection!-NTuple{24, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.implicit_vpa_advection!","text":"\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_constant!-NTuple{5, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_constant!","text":"update the advection speed dvpa/dt = constant\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_default!-NTuple{13, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_default!","text":"\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_linear-NTuple{5, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_linear","text":"update the advection speed dvpa/dt = const*(vpa + L/2)\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_n_p_evolution!-NTuple{10, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_n_p_evolution!","text":"update the advection speed in the parallel velocity coordinate for the case where density and pressure are evolved independently from the pdf; in this case, the parallel velocity coordinate is the normalized velocity vpahat = vpa/vth\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_n_u_evolution!-NTuple{9, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_n_u_evolution!","text":"update the advection speed in the parallel velocity coordinate for the case where density and flow are evolved independently from the pdf; in this case, the parallel velocity coordinate is the peculiar velocity wpa = vpa-upar\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_n_u_p_evolution!-NTuple{9, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_n_u_p_evolution!","text":"update the advection speed in the parallel velocity coordinate for the case where density, flow and pressure are evolved independently from the pdf; in this case, the parallel velocity coordinate is the normalized peculiar velocity wpahat = (vpa - upar)/vth\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_vpa!-NTuple{13, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_vpa!","text":"calculate the advection speed in the vpa-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.vpa_advection!-NTuple{16, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.vpa_advection!","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#interpolation","page":"interpolation","title":"interpolation","text":"","category":"section"},{"location":"zz_interpolation/","page":"interpolation","title":"interpolation","text":"Modules = [moment_kinetics.interpolation]","category":"page"},{"location":"zz_interpolation/#moment_kinetics.interpolation","page":"interpolation","title":"moment_kinetics.interpolation","text":"Interpolation routines intended for post-processing.\n\nNote these are not guaranteed to be highly optimized!\n\n\n\n\n\n","category":"module"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_1d!","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_1d!","text":"Interpolation from a regular grid to a 1d grid with arbitrary spacing\n\nArguments\n\nresult : Array{mkfloat, 1} Array to be overwritten with the result of the interpolation newgrid : Array{mkfloat, 1} Grid of points to interpolate coord to f : Array{mkfloat} Field to be interpolated coord : coordinate coordinate struct giving the coordinate along which f varies spectral : discretization_info struct containing information for discretization, whose type determines which method is used.\n\n\n\n\n\n","category":"function"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_1d-Tuple{Any, Vararg{Any}}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_1d","text":"Interpolation from a regular grid to a 1d grid with arbitrary spacing\n\nThis version allocates a new array for the result, which is returned.\n\nArguments\n\nnewgrid : Array{mkfloat, 1} Grid of points to interpolate coord to f : Array{mkfloat} Field to be interpolated coord : coordinate coordinate struct giving the coordinate along which f varies spectral : Bool or chebyshevinfo struct containing information for discretization, whose type determines which method is used.\n\nReturns\n\nresult : Array Array with the values of f interpolated to the points in new_grid.\n\n\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_vpa!-Tuple{AbstractVector{Float64}, Any, AbstractVector{Float64}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_vpa!","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_vpa!-Tuple{Array{Float64, 3}, Any, Array{Float64, 3}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_vpa!","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_vpa-Tuple{Any, AbstractVector{Float64}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_vpa","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_vpa-Tuple{Any, Array{Float64, 3}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_vpa","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_z!-Tuple{Array{Float64, 3}, Any, Array{Float64, 3}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_z!","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_z!-Tuple{Matrix{Float64}, Any, Matrix{Float64}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_z!","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_z!-Tuple{Vector{Float64}, Any, Vector{Float64}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_z!","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_z-Tuple{Any, Array{Float64, 3}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_z","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_z-Tuple{Any, Matrix{Float64}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_z","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_z-Tuple{Any, Vector{Float64}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_z","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.single_element_interpolate!","page":"interpolation","title":"moment_kinetics.interpolation.single_element_interpolate!","text":"single_element_interpolate!(result, newgrid, f, imin, imax, coord, spectral)\n\nInterpolation within a single element.\n\nf is an array with the values of the input variable in the element to be interpolated. imin and imax give the start and end points of the element in the grid (used to calculate shift and scale factors to a normalised grid).\n\nnewgrid gives the points within the element where output is required. result is filled with the interpolated values at those points.\n\ncoord is the coordinate struct for the dimension along which interpolation is being done. spectral is the corresponding discretization_info.\n\n\n\n\n\n","category":"function"},{"location":"zz_initial_conditions/#initial_conditions","page":"initial_conditions","title":"initial_conditions","text":"","category":"section"},{"location":"zz_initial_conditions/","page":"initial_conditions","title":"initial_conditions","text":"Modules = [moment_kinetics.initial_conditions]","category":"page"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions","page":"initial_conditions","title":"moment_kinetics.initial_conditions","text":"\n\n\n\n","category":"module"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.allocate_pdf_and_moments-NTuple{13, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.allocate_pdf_and_moments","text":"Creates the structs for the pdf and the velocity-space moments\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.convert_full_f_ion_to_normalised!-NTuple{11, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.convert_full_f_ion_to_normalised!","text":"Take the full ion distribution function, calculate the moments, then normalise and shift to the moment-kinetic grid.\n\nUses input value of f and modifies in place to the normalised distribution functions. Input density, upar, ppar, and vth are not used, the values are overwritten with the moments of f.\n\nInputs/outputs depend on z, vperp, and vpa (should be inside loops over species, r)\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.convert_full_f_neutral_to_normalised!-NTuple{13, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.convert_full_f_neutral_to_normalised!","text":"Take the full neutral-particle distribution function, calculate the moments, then normalise and shift to the moment-kinetic grid.\n\nUses input value of f and modifies in place to the normalised distribution functions. Input density, upar, ppar, and vth are not used, the values are overwritten with the moments of f.\n\nInputs/outputs depend on z, vzeta, vr and vz (should be inside loops over species, r)\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.create_boundary_distributions-NTuple{7, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.create_boundary_distributions","text":"Allocate arrays for distributions to be applied as boundary conditions to the pdf at various boundaries. Also initialise the Knudsen cosine distribution here so it can be used when initialising the neutral pdf.\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.create_pdf-NTuple{8, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.create_pdf","text":"Allocate arrays for pdfs\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_density!-NTuple{5, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_density!","text":"\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_electron_density!-Tuple{Any, Any, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_electron_density!","text":"initialise the electron density\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_electron_pdf_over_density_and_boundary_phi!-NTuple{15, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_electron_pdf_over_density_and_boundary_phi!","text":"initelectronpdfoverdensityandboundaryphi initialises the normalised electron pdf = pdfe * vthe / dense and the boundary values of the electrostatic potential phi; care is taken to ensure that the parallel boundary condition is satisfied; NB: as the electron pdf is obtained via a time-independent equation, this 'initital' value for the electron will just be the first guess in an iterative solution\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_electron_upar!-NTuple{8, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_electron_upar!","text":"initialise the electron parallel flow density\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_electron_vth!-NTuple{4, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_electron_vth!","text":"initialise the electron thermal speed profile. for now the only initialisation option for the temperature is constant in z. returns vth0 = sqrt(2*Ts/Te)\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_ion_pdf_over_density!-NTuple{15, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_ion_pdf_over_density!","text":"\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_neutral_pdf_over_density!-NTuple{19, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_neutral_pdf_over_density!","text":"\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_pdf_and_moments!-NTuple{27, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_pdf_and_moments!","text":"creates the normalised pdfs and the velocity-space moments and populates them with a self-consistent initial condition\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_upar!-NTuple{5, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_upar!","text":"\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_uz!-NTuple{5, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_uz!","text":"\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_vth!-NTuple{5, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_vth!","text":"for now the only initialisation option for the temperature is constant in z returns vth0 = sqrt(2Ts/ms) / sqrt(2Te/ms) = sqrt(Ts/Te)\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.initialize_pdf!-NTuple{14, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.initialize_pdf!","text":"\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing","page":"makie_post_processing","title":"makie_post_processing","text":"","category":"section"},{"location":"zz_makie_post_processing/","page":"makie_post_processing","title":"makie_post_processing","text":"Modules = [makie_post_processing, makie_post_processing.shared_utils]","category":"page"},{"location":"zz_makie_post_processing/#makie_post_processing.makie_post_processing","page":"makie_post_processing","title":"makie_post_processing.makie_post_processing","text":"Post processing functions using Makie.jl\n\nOptions are read by default from a file post_processing_input.toml, if it exists.\n\nThe plots can be generated from the command line by running\n\njulia --project run_makie_post_processing.jl dir1 [dir2 [dir3 ...]]\n\n\n\n\n\n","category":"module"},{"location":"zz_makie_post_processing/#makie_post_processing.input_dict","page":"makie_post_processing","title":"makie_post_processing.input_dict","text":"Global dict containing settings for makiepostprocessing. Can be re-loaded at any time to change settings.\n\nIs an OrderedDict so the order of sections is nicer if input_dict is written out as a TOML file.\n\n\n\n\n\n","category":"constant"},{"location":"zz_makie_post_processing/#makie_post_processing.input_dict_dfns","page":"makie_post_processing","title":"makie_post_processing.input_dict_dfns","text":"Global dict containing settings for makiepostprocessing for files with distribution function output. Can be re-loaded at any time to change settings.\n\nIs an OrderedDict so the order of sections is nicer if input_dict_dfns is written out as a TOML file.\n\n\n\n\n\n","category":"constant"},{"location":"zz_makie_post_processing/#makie_post_processing.Chodura_condition_plots","page":"makie_post_processing","title":"makie_post_processing.Chodura_condition_plots","text":"Chodura_condition_plots(run_info::Tuple; plot_prefix)\nChodura_condition_plots(run_info; plot_prefix=nothing, axes=nothing)\n\nPlot the criterion from the Chodura condition at the sheath boundaries.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots from the different runs are overlayed on the same axis, and heatmap plots are displayed in a horizontal row.\n\nSettings are read from the [Chodura_condition] section of the input.\n\nWhen run_info is a Tuple, plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf. When run_info is not a Tuple, plot_prefix is optional - plots will be saved only if it is passed.\n\nWhen run_info is not a Tuple, a Vector of Axis objects can be passed to axes, and each plot will be added to one of axes.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing._MMS_pdf_plots-NTuple{10, Any}","page":"makie_post_processing","title":"makie_post_processing._MMS_pdf_plots","text":"_MMS_pdf_plots(run_info, input, variable_name, plot_prefix, field_label,\n field_sym_label, norm_label, plot_dims, animate_dims)\n\nUtility function for making plots to avoid duplicated code in compare_ion_pdf_symbolic_test and compare_neutral_pdf_symbolic_test.\n\nThe information for the run to analyse is passed in run_info (as returned by get_run_info).\n\ninput is a NamedTuple of settings to use.\n\nvariable_name is the name of the variable being plotted.\n\nplot_prefix gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nfield_label is the label for the computed variable that will be used in plots/animations, field_sym_label is the label for the manufactured solution, and norm_label is the label for the error.\n\nplot_dims are the dimensions of the variable, and animate_dims are the same but omitting :t.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing._get_steady_state_residual_fig_axes-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing._get_steady_state_residual_fig_axes","text":" _get_steady_state_residual_fig_axes(n_runs)\n\nUtility method to avoid code duplication when creating the figaxes OrderedDict for calculatesteadystateresidual.\n\nn_runs sets the number of axes to create in each entry.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_1d-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.animate_1d","text":"animate_1d(xcoord, data; frame_index=nothing, ax=nothing, fig=nothing,\n xlabel=nothing, ylabel=nothing, title=nothing, yscale=nothing,\n transform=identity, outfile=nothing, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), kwargs...)\n\nMake a 1d animation of data vs xcoord.\n\nxlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\nIf ax is passed, the animation will be added to that existing Axis, otherwise a new Figure and Axis will be created. If ax is passed, you should also pass an Observable{mk_int} to frame_index so that the data for this animation can be updated when frame_index is changed.\n\nIf outfile is passed the animation will be saved to a file with that name. The suffix determines the file type. If ax is passed at the same time as outfile then the Figure containing ax must also be passed (to the fig argument) so that the animation can be saved.\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nOther kwargs are passed to Makie's lines!() function.\n\nIf ax is not passed, returns the Figure, otherwise returns the object returned by lines!().\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_2d-Tuple{Any, Any, Any}","page":"makie_post_processing","title":"makie_post_processing.animate_2d","text":"animate_2d(xcoord, ycoord, data; frame_index=nothing, ax=nothing, fig=nothing,\n colorbar_place=nothing, xlabel=nothing, ylabel=nothing, title=nothing,\n outfile=nothing, colormap=\"reverse_deep\", colorscale=nothing,\n transform=identity, axis_args=Dict{Symbol,Any}(), kwargs...)\n\nMake a 2d animation of data vs xcoord and ycoord.\n\nxlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\nIf ax is passed, the animation will be added to that existing Axis, otherwise a new Figure and Axis will be created. If ax is passed, you should also pass an Observable{mk_int} to frame_index so that the data for this animation can be updated when frame_index is changed.\n\nIf outfile is passed the animation will be saved to a file with that name. The suffix determines the file type. If ax is passed at the same time as outfile then the Figure containing ax must also be passed (to the fig argument) so that the animation can be saved.\n\ncolormap is included explicitly because we do some special handling so that extra Makie functionality can be specified by a prefix to the colormap string, rather than the standard Makie mechanism of creating a struct that modifies the colormap. For example Reverse(\"deep\") can be passed as \"reverse_deep\". This is useful so that these extra colormaps can be specified in an input file, but is not needed for interactive use.\n\nWhen xcoord and ycoord are both one-dimensional, uses Makie's heatmap!() function for the plot. If either or both of xcoord and ycoord are two-dimensional, instead uses irregular_heatmap!.\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nOther kwargs are passed to Makie's heatmap!() function.\n\nIf ax is not passed, returns the Figure, otherwise returns the object returned by heatmap!().\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_f_unnorm_vs_vpa","page":"makie_post_processing","title":"makie_post_processing.animate_f_unnorm_vs_vpa","text":"animate_f_unnorm_vs_vpa(run_info; input=nothing, electron=false, neutral=false, is=1,\n iz=nothing, fig=nothing, ax=nothing, frame_index=nothing,\n outfile=nothing, yscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), kwargs...)\n\nPlot an unnormalized distribution function against v_parallel at a fixed z.\n\nThis function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.\n\nThe information for the runs to animate is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are overlayed on the same axis.\n\nBy default animates the ion distribution function. If electron=true is passed, animates the electron distribution function instead. If neutral=true is passed, animates the neutral distribution function instead.\n\nis selects which species to analyse.\n\nit and iz specify the indices of the time- and z-points to choose. By default they are taken from input.\n\nIf input is not passed, it is taken from input_dict_dfns[\"f\"].\n\nThe data needed will be loaded from file.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen run_info is not a Tuple, an Axis can be passed to ax to have the plot added to ax. When ax is passed, if outfile is passed to save the plot, then the Figure containing ax must be passed to fig.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nAny extra kwargs are passed to lines!() (which is used to create the plot, as we have to handle time-varying coordinates so cannot use animate_1d).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_f_unnorm_vs_vpa_z","page":"makie_post_processing","title":"makie_post_processing.animate_f_unnorm_vs_vpa_z","text":"animate_f_unnorm_vs_vpa_z(run_info; input=nothing, electron=false, neutral=false,\n is=1, fig=nothing, ax=nothing, frame_index=nothing,\n outfile=nothing, yscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), kwargs...)\n\nAnimate an unnormalized distribution function against v_parallel and z.\n\nThis function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are displayed in a horizontal row.\n\nBy default animates the ion distribution function. If electron=true is passed, animates the electron distribution function instead. If neutral=true is passed, animates the neutral distribution function instead.\n\nis selects which species to analyse.\n\nIf input is not passed, it is taken from input_dict_dfns[\"f\"].\n\nThe data needed will be loaded from file.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen run_info is not a Tuple, an Axis can be passed to ax to have the animation created in ax. When ax is passed, if outfile is passed to save the animation, then the Figure containing ax must be passed to fig.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nAny extra kwargs are passed to plot_2d (which is used to create the plot, as we have to handle time-varying coordinates so cannot use animate_2d).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_r","text":"animate_vs_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vpa","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vpa","text":"animate_vs_vpa(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_vpa(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vpa.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vpa_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vpa_r","text":"animate_vs_vpa_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vpa_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vpa.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vpa_vperp","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vpa_vperp","text":"animate_vs_vpa_vperp(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vpa_vperp(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vperp and vpa.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vpa_z","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vpa_z","text":"animate_vs_vpa_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vpa_z(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vpa.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vperp","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vperp","text":"animate_vs_vperp(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_vperp(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vperp.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vperp_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vperp_r","text":"animate_vs_vperp_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vperp_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vperp.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vperp_z","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vperp_z","text":"animate_vs_vperp_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vperp_z(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vperp.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vr","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vr","text":"animate_vs_vr(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_vr(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vr.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vr_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vr_r","text":"animate_vs_vr_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vr_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vr.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vr_vzeta","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vr_vzeta","text":"animate_vs_vr_vzeta(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vr_vzeta(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vr.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vr_z","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vr_z","text":"animate_vs_vr_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vr_z(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vr.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vz","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vz","text":"animate_vs_vz(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_vz(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vz.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vz_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vz_r","text":"animate_vs_vz_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vz_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vz.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vz_vr","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vz_vr","text":"animate_vs_vz_vr(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vz_vr(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vr and vz.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vz_vzeta","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vz_vzeta","text":"animate_vs_vz_vzeta(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vz_vzeta(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vz.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vz_z","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vz_z","text":"animate_vs_vz_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vz_z(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vz.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vzeta","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vzeta","text":"animate_vs_vzeta(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_vzeta(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vzeta_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vzeta_r","text":"animate_vs_vzeta_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vzeta_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vzeta.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vzeta_z","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vzeta_z","text":"animate_vs_vzeta_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vzeta_z(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vzeta.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_z","page":"makie_post_processing","title":"makie_post_processing.animate_vs_z","text":"animate_vs_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_z(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_z_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_z_r","text":"animate_vs_z_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_z_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and z.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.calculate_steady_state_residual","page":"makie_post_processing","title":"makie_post_processing.calculate_steady_state_residual","text":"calculatesteadystateresidual(runinfo, variablename; is=1, data=nothing, plotprefix=nothing, figaxes=nothing, irun=1)\n\nCalculate and plot the 'residuals' for variable_name.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are displayed in a horizontal row.\n\nIf the variable has a species dimension, is selects which species to analyse.\n\nBy default the variable will be loaded from file. If the data has already been loaded, it can be passed to data instead. data should be a Tuple of the same length as run_info if run_info is a Tuple.\n\nIf plot_prefix is passed, it gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf.\n\nfig_axes can be passed an OrderedDict of Tuples as returned by _get_steady_state_residual_fig_axes - each tuple contains the Figure fig and Axis or Tuple{Axis} ax to which to add the plot corresponding to its key. If run_info is a Tuple, ax for each entry must be a Tuple of the same length.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.clear_Dict!-Tuple{AbstractDict}","page":"makie_post_processing","title":"makie_post_processing.clear_Dict!","text":"clear_Dict!(d::AbstractDict)\n\nRemove all entries from an AbstractDict, leaving it empty\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.compare_ion_pdf_symbolic_test-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.compare_ion_pdf_symbolic_test","text":"compare_ion_pdf_symbolic_test(run_info, plot_prefix; io=nothing,\n input=nothing)\n\nCompare the computed and manufactured solutions for the ion distribution function.\n\nThe information for the run to analyse is passed in run_info (as returned by get_run_info).\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nIf io is passed then error norms will be written to that file.\n\ninput is a NamedTuple of settings to use. If not given it will be read from the [manufactured_solns] section of [input_dict_dfns][@ref].\n\nNote: when calculating error norms, data is loaded only for 1 time point and for an r-z chunk that is the same size as computed by 1 block of the simulation at run time. This should prevent excessive memory requirements for this function.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.compare_moment_symbolic_test-NTuple{6, Any}","page":"makie_post_processing","title":"makie_post_processing.compare_moment_symbolic_test","text":"compare_moment_symbolic_test(run_info, plot_prefix, field_label, field_sym_label,\n norm_label, variable_name; io=nothing)\n\nCompare the computed and manufactured solutions for a field or moment variable variable_name.\n\nThe information for the run to analyse is passed in run_info (as returned by get_run_info).\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nfield_label is the label that will be used for the name of the computed variable in plots, field_sym_label is the label for the manufactured solution, and norm_label is the label for the error (the difference between the computed and manufactured solutions).\n\nIf io is passed then error norms will be written to that file.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.compare_neutral_pdf_symbolic_test-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.compare_neutral_pdf_symbolic_test","text":"compare_neutral_pdf_symbolic_test(run_info, plot_prefix; io=nothing,\n input=nothing)\n\nCompare the computed and manufactured solutions for the neutral distribution function.\n\nThe information for the run to analyse is passed in run_info (as returned by get_run_info).\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nIf io is passed then error norms will be written to that file.\n\ninput is a NamedTuple of settings to use. If not given it will be read from the [manufactured_solns] section of [input_dict_dfns][@ref].\n\nNote: when calculating error norms, data is loaded only for 1 time point and for an r-z chunk that is the same size as computed by 1 block of the simulation at run time. This should prevent excessive memory requirements for this function.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.constraints_plots-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing.constraints_plots","text":"constraints_plots(run_info; plot_prefix=plot_prefix)\n\nPlot and/or animate the coefficients used to correct the normalised distribution function(s) (aka shape functions) to obey the moment constraints.\n\nIf there were no discretisation errors, we would have A=1, B=0, C=0. The plots/animations show (A-1) so that all three coefficients can be shown nicely on the same axes.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.convert_to_OrderedDicts!-Tuple{AbstractDict}","page":"makie_post_processing","title":"makie_post_processing.convert_to_OrderedDicts!","text":"convert_to_OrderedDicts!(d::AbstractDict)\n\nRecursively convert an AbstractDict to OrderedDict.\n\nAny nested AbstractDicts are also converted to OrderedDict.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.curvilinear_grid_mesh-NTuple{4, Any}","page":"makie_post_processing","title":"makie_post_processing.curvilinear_grid_mesh","text":"curvilinear_grid_mesh(xs, ys, zs, colors)\n\nTesselates the grid defined by xs and ys in order to form a mesh with per-face coloring given by colors.\n\nThe grid defined by xs and ys must have dimensions (nx, ny) == size(colors) .+ 1, as is the case for heatmap/image.\n\nCode from: https://github.com/MakieOrg/Makie.jl/issues/742#issuecomment-1415809653\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.generate_example_input_Dict-Tuple{}","page":"makie_post_processing","title":"makie_post_processing.generate_example_input_Dict","text":"generate_example_input_Dict()\n\nCreate a Dict containing all the makie-post-processing options with default values\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.generate_example_input_file","page":"makie_post_processing","title":"makie_post_processing.generate_example_input_file","text":"generate_example_input_file(filename::String=post_processing_input.toml;\n overwrite::Bool=false)\n\nCreate an example makie-post-processing input file.\n\nEvery option is commented out, but filled with the default value.\n\nPass filename to choose the name of the example file (defaults to the default input file name used by makie_post_process()).\n\nPass overwrite=true to overwrite any existing file at filename.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.get_1d_ax","page":"makie_post_processing","title":"makie_post_processing.get_1d_ax","text":"get_1d_ax(n=nothing; title=nothing, subtitles=nothing, yscale=nothing,\n get_legend_place=nothing, size=nothing, kwargs...)\n\nCreate a new Figure fig and Axis ax intended for 1d plots.\n\ntitle gives an overall title to the Figure.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10.\n\nBy default creates a single Axis, and returns (fig, ax). If a number of axes n is passed, then ax is a Vector{Axis} of length n (even if n is 1). The axes are created in a horizontal row, and the width of the figure is increased in proportion to n.\n\nget_legend_place can be set to one of (:left, :right, :above, :below) to create a GridPosition for a legend in the corresponding place relative to each Axis. If get_legend_place is set, (fig, ax, legend_place) is returned where legend_place is a GridPosition (if n=nothing) or a Tuple of n GridPositions.\n\nWhen n is passed, subtitles can be passed a Tuple of length n which will be used to set a subtitle for each Axis in ax.\n\nsize is passed through to the Figure constructor. Its default value is (600, 400) if n is not passed, or (600*n, 400) if n is passed.\n\nExtra kwargs are passed to the Axis() constructor.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.get_2d_ax","page":"makie_post_processing","title":"makie_post_processing.get_2d_ax","text":"get_2d_ax(n=nothing; title=nothing, subtitles=nothing, size=nothing, kwargs...)\n\nCreate a new Figure fig and Axis ax intended for 2d plots.\n\ntitle gives an overall title to the Figure.\n\nBy default creates a single Axis, and returns (fig, ax, colorbar_place), where colorbar_place is a location in the grid layout that can be passed to Colorbar() located immediately to the right of ax. If a number of axes n is passed, then ax is a Vector{Axis} and colorbar_place is a Vector{GridPosition} of length n (even if n is 1). The axes are created in a horizontal row, and the width of the figure is increased in proportion to n.\n\nWhen n is passed, subtitles can be passed a Tuple of length n which will be used to set a subtitle for each Axis in ax.\n\nsize is passed through to the Figure constructor. Its default value is (600, 400) if n is not passed, or (600*n, 400) if n is passed.\n\nExtra kwargs are passed to the Axis() constructor.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.get_dimension_slice_indices-Tuple","page":"makie_post_processing","title":"makie_post_processing.get_dimension_slice_indices","text":"getdimensionsliceindices(keepdims...; input, it=nothing, is=nothing, ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing)\n\nGet indices for dimensions to slice\n\nThe indices are taken from input, unless they are passed as keyword arguments\n\nThe dimensions in keep_dims are not given a slice (those are the dimensions we want in the variable after slicing).\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.get_run_info-Tuple","page":"makie_post_processing","title":"makie_post_processing.get_run_info","text":"get_run_info(run_dir...; itime_min=1, itime_max=0,\n itime_skip=1, dfns=false, initial_electron=false, do_setup=true,\n setup_input_file=nothing)\nget_run_info((run_dir, restart_index)...; itime_min=1, itime_max=0,\n itime_skip=1, dfns=false, initial_electron=false, do_setup=true,\n setup_input_file=nothing)\n\nGet file handles and other info for a single run\n\nrun_dir is either the directory to read output from (whose name should be the run_name), or a momentkinetics binary output file. If a file is passed, it is only used to infer the directory and `runname, so it is possible for example to pass a.moments.h5output file and alsodfns=trueand the.dfns.h5` file will be the one actually opened (as long as it exists).\n\nrestart_index can be given by passing a Tuple, e.g. (\"runs/example\", 42) as the positional argument. It specifies which restart to read if there are multiple restarts. If no restart_index is given or if nothing is passed, read all restarts and concatenate them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index).\n\nSeveral runs can be loaded at the same time by passing multiple positional arguments. Each argument can be a String run_dir giving a directory to read output from or a Tuple (run_dir, restart_index) giving both a directory and a restart index (it is allowed to mix Strings and Tuples in a call).\n\nBy default load data from moments files, pass dfns=true to load from distribution functions files, or initial_electron=true and dfns=true to load from initial electron state files.\n\nThe itime_min, itime_max and itime_skip options can be used to select only a slice of time points when loading data. In makie_post_process these options are read from the input (if they are set) before get_run_info() is called, so that the run_info returned can be passed to setup_makie_post_processing_input!, to be used for defaults for the remaining options. If either itime_min or itime_max are ≤0, their values are used as offsets from the final time index of the run.\n\nsetup_makie_post_processing_input!() is called at the end of get_run_info(), for convenience when working interactively. Use moment_kinetics.load_data.get_run_info_no_setup if you do not want this. A post-processing input file can be passed to setup_input_file that will be passed to setup_makie_post_processing_input!() if you do not want to use the default input file.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.get_variable_symbol-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing.get_variable_symbol","text":"get_variable_symbol(variable_name)\n\nGet a symbol corresponding to a variable_name\n\nFor example get_variable_symbol(\"phi\") returns \"ϕ\".\n\nIf the symbol has not been defined, just return variable_name.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.grid_points_to_faces","page":"makie_post_processing","title":"makie_post_processing.grid_points_to_faces","text":"grid_points_to_faces(coord::AbstractVector)\ngrid_points_to_faces(coord::Observable{T} where T <: AbstractVector)\ngrid_points_to_faces(coord::AbstractMatrix)\ngrid_points_to_faces(coord::Observable{T} where T <: AbstractMatrix)\n\nTurn grid points in coord into 'cell faces'.\n\nReturns faces, which has a length one greater than coord. The first and last values of faces are the first and last values of coord. The intermediate values are the mid points between grid points.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.instability2D_plots","page":"makie_post_processing","title":"makie_post_processing.instability2D_plots","text":"instability2D_plots(run_info::Tuple, variable_name; plot_prefix, zind=nothing)\ninstability2D_plots(run_info, variable_name; plot_prefix, zind=nothing,\n axes_and_observables=nothing)\n\nMake plots of variable_name for analysis of 2D instability.\n\nThe information for the runs to analyse and plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, make plots comparing the runs, shown in a horizontal row..\n\nSettings are read from the [instability2D] section of the input.\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nWhen run_info is not a Tuple, axes_and_observables can be passed to add plots and animations to existing figures, although this is not very convenient - see the use of this argument when called from the run_info::Tuple method.\n\nIf zind is not passed, it is calculated as the z-index where the mode seems to have the maximum growth rate for this variable. Returns zind.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.irregular_heatmap!-NTuple{4, Any}","page":"makie_post_processing","title":"makie_post_processing.irregular_heatmap!","text":"irregular_heatmap!(ax, xs, ys, zs; kwargs...)\n\nPlot a heatmap onto the Axis ax where xs and ys are allowed to define irregularly spaced, 2d grids. zs gives the value in each cell of the grid.\n\nThe grid defined by xs and ys must have dimensions (nx, ny) == size(zs) .+ 1, as is the case for heatmap/image.\n\nxs be an array of size (nx,ny) or a vector of size (nx).\n\nys be an array of size (nx,ny) or a vector of size (ny).\n\nkwargs are passed to Makie's mesh() function.\n\nCode adapted from: https://github.com/MakieOrg/Makie.jl/issues/742#issuecomment-1415809653\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.irregular_heatmap-Tuple{Any, Any, Any}","page":"makie_post_processing","title":"makie_post_processing.irregular_heatmap","text":"irregular_heatmap(xs, ys, zs; kwargs...)\n\nPlot a heatmap where xs and ys are allowed to define irregularly spaced, 2d grids. zs gives the value in each cell of the grid.\n\nThe grid defined by xs and ys must have dimensions (nx, ny) == size(zs) .+ 1, as is the case for heatmap/image.\n\nxs be an array of size (nx,ny) or a vector of size (nx).\n\nys be an array of size (nx,ny) or a vector of size (ny).\n\nkwargs are passed to Makie's mesh() function.\n\nCode adapted from: https://github.com/MakieOrg/Makie.jl/issues/742#issuecomment-1415809653\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.makie_post_process-Tuple","page":"makie_post_processing","title":"makie_post_processing.makie_post_process","text":"makie_post_process(run_dir...;\n input_file::String=default_input_file_name,\n restart_index::Union{Nothing,mk_int,Tuple}=nothing,\n plot_prefix::Union{Nothing,AbstractString}=nothing)\n\nRun post processing with input read from a TOML file\n\nrun_dir... is the path to the directory to plot from. If more than one run_dir is given, plots comparing the runs in run_dir... are made. A momentkinetics binary output file can also be passed as `rundir, in which case the filename is only used to infer the directory andrun_name, so it is possible for example to pass a.moments.h5output file and still make distribution function plots (as long as the corresponding.dfns.h5` file exists).\n\nrestart_index specifies which restart to read if there are multiple restarts. The default (nothing) reads all restarts and concatenates them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index). A tuple with the same length as run_dir can also be passed to give a different restart_index for each run.\n\nplot_prefix can be specified to give the prefix (directory and first part of file name) to use when saving plots/animations. By default the run directory and run name are used if there is only one run, and \"comparisonplots/compare\" is used if there are multiple runs.\n\nIf input_file does not exist, prints warning and uses default options.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.makie_post_process-Tuple{Union{String, Tuple}, AbstractDict{String, Any}}","page":"makie_post_processing","title":"makie_post_processing.makie_post_process","text":"makie_post_process(run_dir::Union{String,Tuple},\n new_input_dict::Dict{String,Any};\n restart_index::Union{Nothing,mk_int,Tuple}=nothing,\n plot_prefix::Union{Nothing,AbstractString}=nothing)\n\nRun post prossing, with (non-default) input given in a Dict\n\nrun_dir... is the path to the directory to plot from. If more than one run_dir is given, plots comparing the runs in run_dir... are made. A momentkinetics binary output file can also be passed as `rundir, in which case the filename is only used to infer the directory andrun_name, so it is possible for example to pass a.moments.h5output file and still make distribution function plots (as long as the corresponding.dfns.h5` file exists).\n\ninput_dict is a dictionary containing settings for the post-processing.\n\nrestart_index specifies which restart to read if there are multiple restarts. The default (nothing) reads all restarts and concatenates them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index). A tuple with the same length as run_dir can also be passed to give a different restart_index for each run.\n\nplot_prefix can be specified to give the prefix (directory and first part of file name) to use when saving plots/animations. By default the run directory and run name are used if there is only one run, and \"comparisonplots/compare\" is used if there are multiple runs.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.manufactured_solutions_analysis","page":"makie_post_processing","title":"makie_post_processing.manufactured_solutions_analysis","text":"manufactured_solutions_analysis(run_info; plot_prefix)\nmanufactured_solutions_analysis(run_info::Tuple; plot_prefix)\n\nCompare computed and manufactured solutions for field and moment variables for a 'method of manufactured solutions' (MMS) test.\n\nThe information for the run to analyse is passed in run_info (as returned by get_run_info).\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nSettings are read from the [manufactured_solns] section of the input.\n\nWhile a Tuple of run_info can be passed for compatibility with makie_post_process(), at present comparison of multiple runs is not supported - passing a Tuple of length greater than one will result in an error.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.manufactured_solutions_analysis_dfns","page":"makie_post_processing","title":"makie_post_processing.manufactured_solutions_analysis_dfns","text":"manufactured_solutions_analysis_dfns(run_info; plot_prefix)\nmanufactured_solutions_analysis_dfns(run_info::Tuple; plot_prefix)\n\nCompare computed and manufactured solutions for distribution function variables for a 'method of manufactured solutions' (MMS) test.\n\nThe information for the run to analyse is passed in run_info (as returned by get_run_info).\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nSettings are read from the [manufactured_solns] section of the input.\n\nWhile a Tuple of run_info can be passed for compatibility with makie_post_process(), at present comparison of multiple runs is not supported - passing a Tuple of length greater than one will result in an error.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.manufactured_solutions_get_field_and_field_sym-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.manufactured_solutions_get_field_and_field_sym","text":" manufactured_solutions_get_field_and_field_sym(run_info, variable_name;\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing)\n\nGet the data variable for variable_name from the output, and calculate the manufactured solution variable_sym.\n\nThe information for the runs to analyse and plot is passed in run_info (as returned by get_run_info).\n\nit, ir, iz, ivperp, ivpa, ivzeta, ivr, ivz can be used to select a subset of the grid by passing an integer or range for any dimension.\n\nReturns variable, variable_sym.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.parse_colormap-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing.parse_colormap","text":"parse_colormap(colormap)\n\nParse a colormap option\n\nAllows us to have a string option which can be set in the input file and still use Reverse, etc. conveniently.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_1d-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.plot_1d","text":"plot_1d(xcoord, data; ax=nothing, xlabel=nothing, ylabel=nothing, title=nothing,\n yscale=nothing, transform=identity, axis_args=Dict{Symbol,Any}(),\n kwargs...)\n\nMake a 1d plot of data vs xcoord.\n\nxlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\nIf ax is passed, the plot will be added to that existing Axis, otherwise a new Figure and Axis will be created.\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nOther kwargs are passed to Makie's lines!() function.\n\nIf ax is not passed, returns the Figure, otherwise returns the object returned by lines!().\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_2d-Tuple{Any, Any, Any}","page":"makie_post_processing","title":"makie_post_processing.plot_2d","text":"plot_2d(xcoord, ycoord, data; ax=nothing, colorbar_place=nothing, xlabel=nothing,\n ylabel=nothing, title=nothing, colormap=\"reverse_deep\",\n colorscale=nothing, transform=identity, axis_args=Dict{Symbol,Any}(),\n kwargs...)\n\nMake a 2d plot of data vs xcoord and ycoord.\n\nxlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\nIf ax is passed, the plot will be added to that existing Axis, otherwise a new Figure and Axis will be created.\n\ncolormap is included explicitly because we do some special handling so that extra Makie functionality can be specified by a prefix to the colormap string, rather than the standard Makie mechanism of creating a struct that modifies the colormap. For example Reverse(\"deep\") can be passed as \"reverse_deep\". This is useful so that these extra colormaps can be specified in an input file, but is not needed for interactive use.\n\nWhen xcoord and ycoord are both one-dimensional, uses Makie's heatmap!() function for the plot. If either or both of xcoord and ycoord are two-dimensional, instead uses irregular_heatmap!.\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nOther kwargs are passed to Makie's heatmap!() function.\n\nIf ax is not passed, returns the Figure, otherwise returns the object returned by heatmap!().\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_charged_pdf_2D_at_wall-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing.plot_charged_pdf_2D_at_wall","text":"plot_charged_pdf_2D_at_wall(run_info; plot_prefix, electron=false)\n\nMake plots/animations of the ion distribution function at wall boundaries.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots/animations from the different runs are overlayed on the same axis, and heatmap plots/animations are displayed in a horizontal row.\n\nSettings are read from the [wall_pdf] section of the input.\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf. When run_info is not a Tuple, plot_prefix is optional - plots/animations will be saved only if it is passed.\n\nIf electron=true is passed, plot electron distribution function instead of ion distribution function.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_f_unnorm_vs_vpa","page":"makie_post_processing","title":"makie_post_processing.plot_f_unnorm_vs_vpa","text":"plot_f_unnorm_vs_vpa(run_info; input=nothing, electron=false, neutral=false,\n it=nothing, is=1, iz=nothing, fig=nothing, ax=nothing,\n outfile=nothing, yscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), kwargs...)\n\nPlot an unnormalized distribution function against v_parallel at a fixed z.\n\nThis function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are overlayed on the same axis.\n\nBy default plots the ion distribution function. If electron=true is passed, plots the electron distribution function instead. If neutral=true is passed, plots the neutral distribution function instead.\n\nis selects which species to analyse.\n\nit and iz specify the indices of the time- and z-points to choose. By default they are taken from input.\n\nIf input is not passed, it is taken from input_dict_dfns[\"f\"].\n\nThe data needed will be loaded from file.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nWhen run_info is not a Tuple, an Axis can be passed to ax to have the plot added to ax. When ax is passed, if outfile is passed to save the plot, then the Figure containing ax must be passed to fig.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nAny extra kwargs are passed to plot_1d.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_f_unnorm_vs_vpa_z","page":"makie_post_processing","title":"makie_post_processing.plot_f_unnorm_vs_vpa_z","text":"plot_f_unnorm_vs_vpa_z(run_info; input=nothing, electron=false, neutral=false,\n it=nothing, is=1, fig=nothing, ax=nothing, outfile=nothing,\n yscale=identity, transform=identity, rasterize=true,\n subtitles=nothing, axis_args=Dict{Symbol,Any}(), kwargs...)\n\nPlot unnormalized distribution function against v_parallel and z.\n\nThis function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are displayed in a horizontal row.\n\nBy default plots the ion distribution function. If electron=true is passed, plots the electron distribution function instead. If neutral=true is passed, plots the neutral distribution function instead.\n\nis selects which species to analyse.\n\nit specifies the time-index to choose. By default it is taken from input.\n\nIf input is not passed, it is taken from input_dict_dfns[\"f\"].\n\nThe data needed will be loaded from file.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nWhen run_info is not a Tuple, an Axis can be passed to ax to have the plot created in ax. When ax is passed, if outfile is passed to save the plot, then the Figure containing ax must be passed to fig.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\nrasterize is passed through to Makie's mesh!() function. The default is to rasterize plots as vectorized plots from mesh!() have a very large file size. Pass false to keep plots vectorized. Pass a number to increase the resolution of the rasterized plot by that factor.\n\nWhen run_info is a Tuple, subtitles can be passed a Tuple (with the same length as run_info) to set the subtitle for each subplot.\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nAny extra kwargs are passed to plot_2d.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_neutral_pdf_2D_at_wall-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing.plot_neutral_pdf_2D_at_wall","text":"plot_neutral_pdf_2D_at_wall(run_info; plot_prefix)\n\nMake plots/animations of the neutral particle distribution function at wall boundaries.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots/animations from the different runs are overlayed on the same axis, and heatmap plots/animations are displayed in a horizontal row.\n\nSettings are read from the [wall_pdf_neutral] section of the input.\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf. When run_info is not a Tuple, plot_prefix is optional - plots/animations will be saved only if it is passed.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_r","text":"plot_vs_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs r.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_r_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_r_t","text":"plot_vs_r_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_r_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and r.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_t","text":"plot_vs_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs t.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vpa","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vpa","text":"plot_vs_vpa(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_vpa(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vpa.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vpa_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vpa_r","text":"plot_vs_vpa_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vpa_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vpa.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vpa_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vpa_t","text":"plot_vs_vpa_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vpa_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vpa.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vpa_vperp","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vpa_vperp","text":"plot_vs_vpa_vperp(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vpa_vperp(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vperp and vpa.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vpa_z","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vpa_z","text":"plot_vs_vpa_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vpa_z(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vpa.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vperp","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vperp","text":"plot_vs_vperp(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_vperp(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vperp.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vperp_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vperp_r","text":"plot_vs_vperp_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vperp_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vperp.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vperp_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vperp_t","text":"plot_vs_vperp_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vperp_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vperp.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vperp_z","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vperp_z","text":"plot_vs_vperp_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vperp_z(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vperp.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vr","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vr","text":"plot_vs_vr(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_vr(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vr.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vr_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vr_r","text":"plot_vs_vr_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vr_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vr.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vr_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vr_t","text":"plot_vs_vr_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vr_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vr.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vr_vzeta","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vr_vzeta","text":"plot_vs_vr_vzeta(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vr_vzeta(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vr.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vr_z","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vr_z","text":"plot_vs_vr_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vr_z(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vr.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vz","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vz","text":"plot_vs_vz(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_vz(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vz.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vz_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vz_r","text":"plot_vs_vz_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vz_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vz.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vz_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vz_t","text":"plot_vs_vz_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vz_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vz.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vz_vr","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vz_vr","text":"plot_vs_vz_vr(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vz_vr(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vr and vz.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vz_vzeta","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vz_vzeta","text":"plot_vs_vz_vzeta(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vz_vzeta(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vz.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vz_z","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vz_z","text":"plot_vs_vz_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vz_z(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vz.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vzeta","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vzeta","text":"plot_vs_vzeta(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_vzeta(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vzeta.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vzeta_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vzeta_r","text":"plot_vs_vzeta_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vzeta_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vzeta.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vzeta_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vzeta_t","text":"plot_vs_vzeta_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vzeta_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vzeta.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vzeta_z","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vzeta_z","text":"plot_vs_vzeta_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vzeta_z(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vzeta.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_z","page":"makie_post_processing","title":"makie_post_processing.plot_vs_z","text":"plot_vs_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_z(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs z.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_z_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_z_r","text":"plot_vs_z_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_z_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and z.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_z_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_z_t","text":"plot_vs_z_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_z_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and z.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plots_for_dfn_variable-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.plots_for_dfn_variable","text":"plots_for_dfn_variable(run_info, variable_name; plot_prefix, has_rdim=true,\n has_zdim=true, is_1V=false)\n\nMake plots for the distribution function variable variable_name.\n\nWhich plots to make are determined by the settings in the section of the input whose heading is the variable name.\n\nrun_info is the information returned by get_run_info(). The dfns=true keyword argument must have been passed to get_run_info() so that output files containing the distribution functions are being read.\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nhas_rdim, has_zdim and/or is_1V can be passed to allow the function to skip some plots that do not make sense for 0D/1D or 1V simulations (regardless of the settings).\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.plots_for_variable-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.plots_for_variable","text":"plots_for_variable(run_info, variable_name; plot_prefix, has_rdim=true,\n has_zdim=true, is_1V=false,\n steady_state_residual_fig_axes=nothing)\n\nMake plots for the EM field or moment variable variable_name.\n\nWhich plots to make are determined by the settings in the section of the input whose heading is the variable name.\n\nrun_info is the information returned by get_run_info.\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nhas_rdim, has_zdim and/or is_1V can be passed to allow the function to skip some plots that do not make sense for 0D/1D or 1V simulations (regardless of the settings).\n\nsteady_state_residual_fig_axes contains the figure, axes and legend places for steady state residual plots.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.positive_or_nan-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing.positive_or_nan","text":"positive_or_nan(x; epsilon=0)\n\nIf the argument x is zero or negative, replace it with NaN, otherwise return x.\n\nepsilon can be passed if the number should be forced to be above some value (typically we would assume epsilon is small and positive, but nothing about this function forces it to be).\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.println_to_stdout_and_file-Tuple{Any, Vararg{Any}}","page":"makie_post_processing","title":"makie_post_processing.println_to_stdout_and_file","text":"println_to_stdout_and_file(io, stuff...)\n\nPrint stuff both to stdout and to a file io.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.put_legend_above-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.put_legend_above","text":"putlegendabove(fig, ax; kwargs...)\n\nAdd a legend corresponding to the plot in ax to fig on the left of a new row at the top of the figure layout.\n\nAdditional kwargs are passed to the Legend() constructor.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.put_legend_below-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.put_legend_below","text":"putlegendbelow(fig, ax; kwargs...)\n\nAdd a legend corresponding to the plot in ax to fig on the left of a new row at the bottom of the figure layout.\n\nAdditional kwargs are passed to the Legend() constructor.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.put_legend_left-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.put_legend_left","text":"putlegendleft(fig, ax; kwargs...)\n\nAdd a legend corresponding to the plot in ax to fig on the bottom of a new column at the left of the figure layout.\n\nAdditional kwargs are passed to the Legend() constructor.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.put_legend_right-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.put_legend_right","text":"putlegendright(fig, ax; kwargs...)\n\nAdd a legend corresponding to the plot in ax to fig on the bottom of a new column at the right of the figure layout.\n\nAdditional kwargs are passed to the Legend() constructor.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.save_animation-NTuple{4, Any}","page":"makie_post_processing","title":"makie_post_processing.save_animation","text":"save_animation(fig, frame_index, nt, outfile)\n\nAnimate fig and save the result in outfile.\n\nframe_index is the Observable{mk_int} that updates the data used to make fig to a new time point. nt is the total number of time points to create.\n\nThe suffix of outfile determines the file type.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.select_slice","page":"makie_post_processing","title":"makie_post_processing.select_slice","text":"select_slice(variable::AbstractArray, dims::Symbol...; input=nothing, it=nothing,\n is=1, ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing)\n\nReturns a slice of variable that includes only the dimensions given in dims..., e.g.\n\nselect_slice(variable, :t, :r)\n\nto get a two dimensional slice with t- and r-dimensions.\n\nAny other dimensions present in variable have a single point selected. By default this point is set by the options in input (which must be a NamedTuple) (or the final point for time or the size of the dimension divided by 3 if input is not given). These defaults can be overridden using the keyword arguments it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, ivz. Ranges can also be passed to these keyword arguments for the 'kept dimensions' in dims to select a subset of those dimensions.\n\nThis function only recognises what the dimensions of variable are by the number of dimensions in the array. It assumes that either the variable has already been sliced to the correct dimensions (if ndims(variable) == length(dims) it just returns variable) or that variable has the full number of dimensions it could have (i.e. 'field' variables have 3 dimensions, 'moment' variables 4, 'ion distribution function' variables 6 and 'neutral distribution function' variables 7).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.setup_makie_post_processing_input!","page":"makie_post_processing","title":"makie_post_processing.setup_makie_post_processing_input!","text":"setup_makie_post_processing_input!(input_file::Union{AbstractString,Nothing}=nothing;\n run_info_moments=nothing, run_info_dfns=nothing,\n allow_missing_input_file=false)\nsetup_makie_post_processing_input!(new_input_dict::AbstractDict{String,Any};\n run_info_moments=nothing,\n run_info_dfns=nothing)\n\nPass input_file to read the input from an input file other than post_processing_input.toml. You can also pass a Dict{String,Any} of options.\n\nSet up input, storing in the global input_dict and input_dict_dfns to be used in the various plotting and analysis functions.\n\nThe run_info that you are using (as returned by get_run_info) should be passed to run_info_moments (if it contains only the moments), or run_info_dfns (if it also contains the distributions functions), or both (if you have loaded both sets of output). This allows default values to be set based on the grid sizes and number of time points read from the output files. Note that setup_makie_post_processing_input!() is called by default at the end of get_run_info(), for conveinence in interactive use.\n\nBy default an error is raised if input_file does not exist. To continue anyway, using default options, pass allow_missing_input_file=true.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.sound_wave_plots","page":"makie_post_processing","title":"makie_post_processing.sound_wave_plots","text":"sound_wave_plots(run_info::Tuple; plot_prefix)\nsound_wave_plots(run_info; outfile=nothing, ax=nothing, phi=nothing)\n\nCalculate decay rate and frequency for the damped 'sound wave' in a 1D1V simulation in a periodic box. Plot the mode amplitude vs. time along with the fitted decay rate.\n\nThe information for the runs to analyse and plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots from the different runs are overlayed on the same axis.\n\nSettings are read from the [sound_wave] section of the input.\n\nWhen run_info is a Tuple, plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf. When run_info is not a Tuple, outfile can be passed, to save the plot to outfile.\n\nWhen run_info is not a Tuple, ax can be passed to add the plot to an existing Axis.\n\nWhen run_info is not a Tuple, the array containing data for phi can be passed to phi - by default this data is loaded from the output file.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.timestep_diagnostics-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.timestep_diagnostics","text":"timestep_diagnostics(run_info, run_info_dfns; plot_prefix=nothing, it=nothing)\n\nPlot a time-trace of some adaptive-timestep diagnostics: steps per output, timestep failures per output, how many times per output each variable caused a timestep failure, and which factor limited the length of successful timesteps (CFL, accuracy, max_timestep).\n\nIf plot_prefix is passed, it gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix_timestep_diagnostics.pdf.\n\nit can be used to select a subset of the time points by passing a range.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.shared_utils.calculate_and_write_frequencies-NTuple{9, Any}","page":"makie_post_processing","title":"makie_post_processing.shared_utils.calculate_and_write_frequencies","text":"\n\n\n\n","category":"method"},{"location":"zz_z_advection/#z_advection","page":"z_advection","title":"z_advection","text":"","category":"section"},{"location":"zz_z_advection/","page":"z_advection","title":"z_advection","text":"Modules = [moment_kinetics.z_advection]","category":"page"},{"location":"zz_z_advection/#moment_kinetics.z_advection","page":"z_advection","title":"moment_kinetics.z_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_z_advection/#moment_kinetics.z_advection.adjust_advection_speed!-NTuple{5, Any}","page":"z_advection","title":"moment_kinetics.z_advection.adjust_advection_speed!","text":"\n\n\n\n","category":"method"},{"location":"zz_z_advection/#moment_kinetics.z_advection.unnormalize_pdf!-NTuple{6, Any}","page":"z_advection","title":"moment_kinetics.z_advection.unnormalize_pdf!","text":"\n\n\n\n","category":"method"},{"location":"zz_z_advection/#moment_kinetics.z_advection.update_speed_z!-NTuple{13, Any}","page":"z_advection","title":"moment_kinetics.z_advection.update_speed_z!","text":"calculate the advection speed in the z-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"zz_z_advection/#moment_kinetics.z_advection.z_advection!-NTuple{15, Any}","page":"z_advection","title":"moment_kinetics.z_advection.z_advection!","text":"do a single stage time advance (potentially as part of a multi-stage RK scheme)\n\n\n\n\n\n","category":"method"},{"location":"zz_species_input/#species_input","page":"species_input","title":"species_input","text":"","category":"section"},{"location":"zz_species_input/","page":"species_input","title":"species_input","text":"Modules = [moment_kinetics.species_input]","category":"page"},{"location":"zz_species_input/#moment_kinetics.species_input","page":"species_input","title":"moment_kinetics.species_input","text":"Module for handling i/o for species specific input parameters which are hosted in the composition and species structs for passing to functions\n\n\n\n\n\n","category":"module"},{"location":"zz_gyroaverages/#gyroaverages","page":"gyroaverages","title":"gyroaverages","text":"","category":"section"},{"location":"zz_gyroaverages/","page":"gyroaverages","title":"gyroaverages","text":"Modules = [moment_kinetics.gyroaverages]","category":"page"},{"location":"zz_gyroaverages/#moment_kinetics.gyroaverages","page":"gyroaverages","title":"moment_kinetics.gyroaverages","text":"module for supporting gyroaverages at fixed guiding centre R and fixed position r\n\n\n\n\n\n","category":"module"},{"location":"zz_gyroaverages/#moment_kinetics.gyroaverages.elementlist!-Tuple{Any, Any, Any}","page":"gyroaverages","title":"moment_kinetics.gyroaverages.elementlist!","text":"for a given list of coordinate values, determine in which elements they are found -1 indicates that the required element would be outside of the existing grid\n\n– assume here that the coordinates are fully local in memory\n\n\n\n\n\n","category":"method"},{"location":"zz_gyroaverages/#moment_kinetics.gyroaverages.gyroaverage_field!-NTuple{7, Any}","page":"gyroaverages","title":"moment_kinetics.gyroaverages.gyroaverage_field!","text":"function for gyroaveraging a field of shape (z,r) and filling the result into an array of shape (vperp,z,r,s)\n\n\n\n\n\n","category":"method"},{"location":"zz_gyroaverages/#moment_kinetics.gyroaverages.gyroaverage_pdf!-NTuple{8, Any}","page":"gyroaverages","title":"moment_kinetics.gyroaverages.gyroaverage_pdf!","text":"function for gyroaveraging a charge particle pdf of shape (vpa,vperp,z,r,s) and filling the result into an of the same shape\n\n\n\n\n\n","category":"method"},{"location":"zz_derivatives/#derivatives","page":"derivatives","title":"derivatives","text":"","category":"section"},{"location":"zz_derivatives/","page":"derivatives","title":"derivatives","text":"Modules = [moment_kinetics.derivatives]","category":"page"},{"location":"zz_derivatives/#moment_kinetics.derivatives","page":"derivatives","title":"moment_kinetics.derivatives","text":"This module contains all the necessary derivatives needed to carry out distributed memory differential operations on the arrays in moment kinetics. We provide separate derivative functions for each (i) distributed dimension and (ii) array shape. We do not need to provide derivatives for non-distributed dimensions as these can by handled by the derivative! function from calculus.jl\n\n\n\n\n\n","category":"module"},{"location":"zz_calculus/#calculus","page":"calculus","title":"calculus","text":"","category":"section"},{"location":"zz_calculus/","page":"calculus","title":"calculus","text":"Modules = [moment_kinetics.calculus]","category":"page"},{"location":"zz_calculus/#moment_kinetics.calculus","page":"calculus","title":"moment_kinetics.calculus","text":"\n\n\n\n","category":"module"},{"location":"zz_calculus/#moment_kinetics.calculus.derivative!-NTuple{4, Any}","page":"calculus","title":"moment_kinetics.calculus.derivative!","text":"derivative!(df, f, coord, spectral)\n\nNon-upwinding derivative.\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.derivative!-Tuple{Any, Any, Any, Any, moment_kinetics.moment_kinetics_structs.discretization_info}","page":"calculus","title":"moment_kinetics.calculus.derivative!","text":"derivative!(df, f, coord, adv_fac, spectral)\n\nUpwinding derivative.\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.derivative_elements_to_full_grid!-Tuple{Any, Any, Any, AbstractVector{Float64}}","page":"calculus","title":"moment_kinetics.calculus.derivative_elements_to_full_grid!","text":"\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.derivative_elements_to_full_grid!-Tuple{Any, Any, Any}","page":"calculus","title":"moment_kinetics.calculus.derivative_elements_to_full_grid!","text":"\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.elements_to_full_grid_interior_pts!-Tuple{Any, Any, Any}","page":"calculus","title":"moment_kinetics.calculus.elements_to_full_grid_interior_pts!","text":"maps the derivative at points away from element boundaries from the grid/element representation to the full grid representation\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.elementwise_derivative!","page":"calculus","title":"moment_kinetics.calculus.elementwise_derivative!","text":"elementwise_derivative!(coord, f, adv_fac, spectral)\nelementwise_derivative!(coord, f, spectral)\n\nGeneric function for element-by-element derivatives\n\nFirst signature, with adv_fac, calculates an upwind derivative, the second signature calculates a derivative without upwinding information.\n\nResult is stored in coord.scratch_2d.\n\n\n\n\n\n","category":"function"},{"location":"zz_calculus/#moment_kinetics.calculus.integral-NTuple{10, Any}","page":"calculus","title":"moment_kinetics.calculus.integral","text":"Computes the integral of the 3D integrand, using the input wgts\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.integral-NTuple{4, Any}","page":"calculus","title":"moment_kinetics.calculus.integral","text":"Computes the integral of the integrand multiplied by v^n, using the input wgts\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.integral-NTuple{7, Any}","page":"calculus","title":"moment_kinetics.calculus.integral","text":"Computes the integral of the 2D integrand, using the input wgts\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.integral-Tuple{Any, Any, Any}","page":"calculus","title":"moment_kinetics.calculus.integral","text":"Computes the integral of the integrand multiplied by v, using the input wgts\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.integral-Tuple{Any, Any}","page":"calculus","title":"moment_kinetics.calculus.integral","text":"Computes the integral of the integrand, using the input wgts\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.mass_matrix_solve!","page":"calculus","title":"moment_kinetics.calculus.mass_matrix_solve!","text":"mass_matrix_solve!(f, b, spectral::weak_discretization_info)\n\nSolve\n\nMf = b\n\nfor a, where M is the mass matrix of a weak-form finite element method and b is an input.\n\n\n\n\n\n","category":"function"},{"location":"zz_calculus/#moment_kinetics.calculus.reconcile_element_boundaries_upwind!-Tuple{Any, Any, Any, AbstractVector{Float64}}","page":"calculus","title":"moment_kinetics.calculus.reconcile_element_boundaries_upwind!","text":"if at the boundary point within the element, must carefully choose which value of df to use; this is because df is multi-valued at the overlapping point at the boundary between neighboring elements. here we choose to use the value of df from the upwind element.\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_vpa_advection/#electron_vpa_advection","page":"electron_vpa_advection","title":"electron_vpa_advection","text":"","category":"section"},{"location":"zz_electron_vpa_advection/","page":"electron_vpa_advection","title":"electron_vpa_advection","text":"Modules = [moment_kinetics.electron_vpa_advection]","category":"page"},{"location":"zz_electron_vpa_advection/#moment_kinetics.electron_vpa_advection","page":"electron_vpa_advection","title":"moment_kinetics.electron_vpa_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_electron_vpa_advection/#moment_kinetics.electron_vpa_advection.electron_vpa_advection!-NTuple{13, Any}","page":"electron_vpa_advection","title":"moment_kinetics.electron_vpa_advection.electron_vpa_advection!","text":"calculate the wpa-advection term for the electron kinetic equation = (vthe / 2 ppare * dppare/dz + wpa / 2 ppare * dqpare/dz - wpa^2 * dvthe/dz) * df/dwpa\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_vpa_advection/#moment_kinetics.electron_vpa_advection.update_electron_speed_vpa!-NTuple{8, Any}","page":"electron_vpa_advection","title":"moment_kinetics.electron_vpa_advection.update_electron_speed_vpa!","text":"calculate the electron advection speed in the wpa-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#numerical_dissipation","page":"numerical_dissipation","title":"numerical_dissipation","text":"","category":"section"},{"location":"zz_numerical_dissipation/","page":"numerical_dissipation","title":"numerical_dissipation","text":"Modules = [moment_kinetics.numerical_dissipation]","category":"page"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation","text":"\n\n\n\n","category":"module"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.force_minimum_pdf_value!-Tuple{Any, Any}","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.force_minimum_pdf_value!","text":"force_minimum_pdf_value!(f, minval)\n\nSet a minimum value for the pdf-sized array f. Any points less than the minimum are set to the minimum. By default, no minimum is applied. The minimum value can be set by\n\n[ion_numerical_dissipation]\nforce_minimum_pdf_value = 0.0\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.force_minimum_pdf_value_neutral!-Tuple{Any, Any}","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.force_minimum_pdf_value_neutral!","text":"force_minimum_pdf_value_neutral!(f, minval)\n\nSet a minimum value for the neutral-pdf-sized array f. Any points less than the minimum are set to the minimum. By default, no minimum is applied. The minimum value can be set by\n\n[neutral_numerical_dissipation]\nforce_minimum_pdf_value = 0.0\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.r_dissipation!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.r_dissipation!","text":"Add diffusion in the r direction to suppress oscillations\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[ion_numerical_dissipation]\nr_dissipation_coefficient = 0.1\n\n\nNote that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.r_dissipation_neutral!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.r_dissipation_neutral!","text":"Add diffusion in the r direction to suppress oscillations for neutrals\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[neutral_numerical_dissipation]\nr_dissipation_coefficient = 0.1\n\n\nNote that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.setup_numerical_dissipation-Tuple{Any}","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.setup_numerical_dissipation","text":"Define the dissipation parameters for each species, which means there need to be three sections in each input file that specify the parameters required of each species, as follows:\n\n[ion_numerical_dissipation]\nvpa_dissipation_coefficient\n...\n\n[electron_numerical_dissipation]\nvpa_dissipation_coefficient\n...\n\n[neutral_numerical_dissipation]\nvz_dissipation_coefficient\n...\n\nThere will still be the -1.0 default parameters.\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.vpa_boundary_buffer_decay!-NTuple{6, Any}","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.vpa_boundary_buffer_decay!","text":"Suppress the distribution function by damping towards a Maxwellian in the last element before the vpa boundaries, to avoid numerical instabilities there.\n\nDisabled by default.\n\nThe damping rate is set in the input TOML file by the parameter\n\n[ion_numerical_dissipation]\nvpa_boundary_buffer_damping_rate = 0.1\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.vpa_boundary_buffer_diffusion!-NTuple{6, Any}","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.vpa_boundary_buffer_diffusion!","text":"Suppress the distribution function by applying diffusion in the last element before the vpa boundaries, to avoid numerical instabilities there.\n\nDisabled by default.\n\nThe maximum diffusion rate in the buffer is set in the input TOML file by the parameter\n\n[ion_numerical_dissipation]\nvpa_boundary_buffer_diffusion_coefficient = 0.1\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.vpa_boundary_force_decreasing!-Tuple{Any, Any}","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.vpa_boundary_force_decreasing!","text":"Try to suppress oscillations near the boundary by ensuring that every point in the final element is ≤ the innermost value. The distribution function should be decreasing near the boundaries, so this should be an OK thing to force.\n\nNote: not currently used.\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.vpa_dissipation!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.vpa_dissipation!","text":"Add diffusion in the vpa direction to suppress oscillations\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[ion_numerical_dissipation]\nvpa_dissipation_coefficient = 0.1\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.vperp_dissipation!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.vperp_dissipation!","text":"Add diffusion in the vperp direction to suppress oscillations\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[ion_numerical_dissipation]\nvperp_dissipation_coefficient = 0.1\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.vz_dissipation_neutral!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.vz_dissipation_neutral!","text":"Add diffusion in the vz direction to suppress oscillations for neutrals\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[neutral_numerical_dissipation]\nvz_dissipation_coefficient = 0.1\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.z_dissipation!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.z_dissipation!","text":"Add diffusion in the z direction to suppress oscillations\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[ion_numerical_dissipation]\nz_dissipation_coefficient = 0.1\n\nNote that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.z_dissipation_neutral!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.z_dissipation_neutral!","text":"Add diffusion in the z direction to suppress oscillations for neutrals\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[neutral_numerical_dissipation]\nz_dissipation_coefficient = 0.1\n\nNote that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries\n\n\n\n\n\n","category":"method"},{"location":"input_options/#Input-Options","page":"Input Options","title":"Input Options","text":"","category":"section"},{"location":"input_options/","page":"Input Options","title":"Input Options","text":"This page describes the input options that can be specified in .toml input files. The input variable name is given first, followed by its default value and a brief description.","category":"page"},{"location":"input_options/#File-I/O","page":"Input Options","title":"File I/O","text":"","category":"section"},{"location":"input_options/","page":"Input Options","title":"Input Options","text":"Option name Default value Description\nrun_name name of the input .toml file with the .toml suffix removed prefix for all output files associated with this run\nbase_directory \"runs\" directory where the simulation data will be stored","category":"page"},{"location":"input_options/#Model-Options","page":"Input Options","title":"Model Options","text":"","category":"section"},{"location":"input_options/#Timestepping-Options","page":"Input Options","title":"Timestepping Options","text":"","category":"section"},{"location":"input_options/","page":"Input Options","title":"Input Options","text":"See timestepping-input-parameters.","category":"page"},{"location":"input_options/#Special-cases","page":"Input Options","title":"Special cases","text":"","category":"section"},{"location":"input_options/","page":"Input Options","title":"Input Options","text":"Some options apply only for certain types of run, etc. These special cases are described in the following subsections.","category":"page"},{"location":"zz_gauss_legendre/#gauss_legendre","page":"gauss_legendre","title":"gauss_legendre","text":"","category":"section"},{"location":"zz_gauss_legendre/","page":"gauss_legendre","title":"gauss_legendre","text":"Modules = [moment_kinetics.gauss_legendre]","category":"page"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre","text":"module for Gauss-Legendre-Lobatto and Gauss-Legendre-Radau spectral element grids\n\n\n\n\n\n","category":"module"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.gausslegendre_base_info","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.gausslegendre_base_info","text":"structs for passing around matrices for taking the derivatives on Gauss-Legendre points in 1D\n\n\n\n\n\n","category":"type"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.GaussLegendre_derivative_vector!-NTuple{5, Any}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.GaussLegendre_derivative_vector!","text":"Gauss-Legendre derivative at arbitrary x values, for boundary condition on radau points D0 – the vector xj – the x location where the derivative is evaluated ngrid – number of points in x x – the grid from -1, 1 Note that D0 is not scaled to the physical grid\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.GaussLegendre_weak_product_matrix!-Tuple{Array{Float64, 3}, Vararg{Any, 4}}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.GaussLegendre_weak_product_matrix!","text":"assign abitrary weak inner product matrix Q on a 1D line with Jacobian = 1 matrix Q acts on two vectors x1 and x2 such that the quadratic form y = x1 * Q * x2 is also a vector\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.GaussLegendre_weak_product_matrix!-Tuple{Matrix{Float64}, Vararg{Any, 4}}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.GaussLegendre_weak_product_matrix!","text":"assign abitrary weak inner product matrix Q on a 1D line with Jacobian = 1 matrix Q acts on a single vector x such that y = Q * x is also a vector\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.Legendre_h_n-Tuple{Any}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.Legendre_h_n","text":"result of the inner product of Legendre polys of order k\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.gausslobattolegendre_differentiation_matrix!-Tuple{Matrix{Float64}, Vector{Float64}, Int64}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.gausslobattolegendre_differentiation_matrix!","text":"Formula for differentiation matrix taken from p196 of Chpt The Spectral Elemtent Method' ofComputational Seismology'. Heiner Igel First Edition. Published in 2017 by Oxford University Press. Or https://doc.nektar.info/tutorials/latest/fundamentals/differentiation/fundamentals-differentiationch2.html\n\nD – differentiation matrix x – Gauss-Legendre-Lobatto points in [-1,1] ngrid – number of points per element (incl. boundary points)\n\nNote that D has does not include a scaling factor\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.gaussradaulegendre_differentiation_matrix!-Tuple{Matrix{Float64}, Vector{Float64}, Int64}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.gaussradaulegendre_differentiation_matrix!","text":"From https://doc.nektar.info/tutorials/latest/fundamentals/differentiation/fundamentals-differentiationch2.html\n\nD – differentiation matrix x – Gauss-Legendre-Radau points in [-1,1) ngrid – number of points per element (incl. boundary points)\n\nNote that D has does not include a scaling factor\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.scaled_gauss_legendre_lobatto_grid-NTuple{7, Any}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.scaled_gauss_legendre_lobatto_grid","text":"function for setting up the full Gauss-Legendre-Lobatto grid and collocation point weights\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.scaled_gauss_legendre_radau_grid-NTuple{8, Any}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.scaled_gauss_legendre_radau_grid","text":"function for setting up the full Gauss-Legendre-Radau grid and collocation point weights see comments of Gauss-Legendre-Lobatto routine above\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.setup_global_strong_form_matrix!-Tuple{Matrix{Float64}, moment_kinetics.gauss_legendre.gausslegendre_base_info, moment_kinetics.gauss_legendre.gausslegendre_base_info, Any, Any}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.setup_global_strong_form_matrix!","text":"A function that assigns the local matrices to a global array QQ_global for later evaluating strong form of required 1D equation.\n\nThe 'option' variable is a flag for choosing the type of matrix to be constructed. Currently the function is set up to assemble the elemental matrices without imposing boundary conditions on the first and final rows of the matrix. This means that the operators constructed from this function can only be used for differentiation, and not solving 1D ODEs. The shared points in the element assembly are averaged (instead of simply added) to be consistent with the derivativeelementstofullgrid!() function in calculus.jl.\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.setup_global_weak_form_matrix!-Tuple{Matrix{Float64}, moment_kinetics.gauss_legendre.gausslegendre_base_info, moment_kinetics.gauss_legendre.gausslegendre_base_info, Any, Any}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.setup_global_weak_form_matrix!","text":"A function that assigns the local weak-form matrices to a global array QQ_global for later solving weak form of required 1D equation.\n\nThe 'option' variable is a flag for choosing the type of matrix to be constructed. Currently the function is set up to assemble the elemental matrices without imposing boundary conditions on the first and final rows of the matrix by default. This means that the operators constructed from this function can only be used for differentiation, and not solving 1D ODEs. This assembly function assumes that the coordinate is not distributed. To extend this function to support distributed-memory MPI, addition of off-memory matrix elements to the exterior points would be required.\n\nThe typical use of this function is to assemble matrixes M and K in\n\nM * d2f = K * f \n\nwhere M is the mass matrix and K is the stiffness matrix, and we wish to solve for d2f given f. To solve 1D ODEs\n\nK * f = b = M * d2f \n\nfor f given boundary data on f with periodic or dirichlet boundary conditions, set \n\nperiodic_bc = true, b[end] = 0\n\nor \n\ndirichlet_bc = true, b[1] = f[1] (except for cylindrical coordinates), b[end] = f[end]\n\nin the function call, and create new matrices for this purpose in the gausslegendre_info struct. Currently the Laplacian matrix is supported with boundary conditions.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#fokker_planck_calculus","page":"fokker_planck_calculus","title":"fokker_planck_calculus","text":"","category":"section"},{"location":"zz_fokker_planck_calculus/","page":"fokker_planck_calculus","title":"fokker_planck_calculus","text":"Modules = [moment_kinetics.fokker_planck_calculus]","category":"page"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus","text":"module for functions used in calculating the integrals and doing the numerical differentiation for the implementation of the the Full-F Fokker-Planck Collision Operator moment_kinetics.fokker_planck.\n\nParallelisation of the collision operator uses a special 'anyv' region type, see Collision operator and anyv region.\n\n\n\n\n\n","category":"module"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.boundary_integration_weights_struct","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.boundary_integration_weights_struct","text":"a struct to contain the integration weights for the boundary points in the (vpa,vperp) domain\n\n\n\n\n\n","category":"type"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.fokkerplanck_boundary_data_arrays_struct","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.fokkerplanck_boundary_data_arrays_struct","text":"a struct used for calculating the integration weights for the boundary of the velocity space domain in (vpa,vperp) coordinates\n\n\n\n\n\n","category":"type"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.fokkerplanck_weakform_arrays_struct","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.fokkerplanck_weakform_arrays_struct","text":"a struct of dummy arrays and precalculated coefficients for the weak-form Fokker-Planck collision operator \n\n\n\n\n\n","category":"type"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.calculate_rosenbluth_integrals!-NTuple{20, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.calculate_rosenbluth_integrals!","text":"Function to carry out the integration of the revelant distribution functions to form the required coefficients for the full-F operator. We assume that the weights are precalculated. The function takes as arguments the arrays of coefficients (which we fill), the required distributions, the precomputed weights, the indicies of the `field' velocities, and the sizes of the primed vpa and vperp coordinates arrays.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.enforce_vpavperp_BCs!-NTuple{5, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.enforce_vpavperp_BCs!","text":"function to enforce boundary conditions on the collision operator result to be consistent with the boundary conditions imposed on the the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.get_element_limit_indices-NTuple{4, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.get_element_limit_indices","text":"function for getting the indices used to choose the integration quadrature \n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.get_global_compound_index-NTuple{6, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.get_global_compound_index","text":"get_global_compound_index(vpa,vperp,ielement_vpa,ielement_vperp,ivpa_local,ivperp_local)\n\nFor local (within the single element specified by ielement_vpa and ielement_vperp) indices ivpa_local and ivperp_local, get the global index in the 'linear-indexed' 2d space of size (vperp.n, vpa.n) (as returned by ic_func).\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.ic_func-Tuple{Int64, Int64, Int64}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.ic_func","text":"ic_func(ivpa::mk_int,ivperp::mk_int,nvpa::mk_int)\n\nGet the 'linear index' corresponding to ivpa and ivperp. Defined so that the linear index corresponds to the underlying layout in memory of a 2d array indexed by [ivpa,ivperp], i.e. for a 2d array f2d:\n\nsize(f2d) == (vpa.n, vperp.n)\nFor a reference to f2d that is reshaped to a vector (a 1d array) f1d = vec(f2d) than for any ivpa and ivperp it is true that f1d[ic_func(ivpa,ivperp)] == f2d[ivpa,ivperp].\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.ielement_loopup-Tuple{Any, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.ielement_loopup","text":"function to find the element in which x sits\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.init_Rosenbluth_potential_boundary_integration_weights!-NTuple{8, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.init_Rosenbluth_potential_boundary_integration_weights!","text":"function that precomputes the required integration weights only along the velocity space boundaries\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.init_Rosenbluth_potential_integration_weights!-NTuple{8, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.init_Rosenbluth_potential_integration_weights!","text":"function that precomputes the required integration weights\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.interpolate_2D_vspace!-NTuple{5, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.interpolate_2D_vspace!","text":"function to interpolate f(vpa,vperp) from one velocity grid to another, assuming that both grids are represented by vpa, vperp in normalised units, but have different normalisation factors defining the meaning of these grids in physical units.\n\nE.g. vpai, vperpi = ci * vpa, ci * vperp vpae, vperpe = ce * vpa, ce * vperp\n\nwith ci = sqrt(Ti/mi), ce = sqrt(Te/mi)\n\nscalefac = ci / ce is the ratio of the two reference speeds\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.ivpa_func-Tuple{Int64, Int64}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.ivpa_func","text":"ivpa_func(ic::mk_int,nvpa::mk_int)\n\nGet the vpa index ivpa that corresponds to a 'linear index' ic that spans a 2d velocity space.\n\nDefined so that ivpa_func(inc_func(ivpa,ivperp,nvpa), nvpa) == ivpa.\n\nSee also ic_func, ivperp_func.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.ivperp_func-Tuple{Int64, Int64}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.ivperp_func","text":"ivperp_func(ic::mk_int,nvpa::mk_int)\n\nGet the vperp index ivperp that corresponds to a 'linear index' ic that spans a 2d velocity space.\n\nDefined so that ivperp_func(inc_func(ivpa,ivperp,nvpa), nvpa) == ivperp.\n\nSee also ic_func, ivpa_func.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.setup_basic_quadratures-Tuple{Any, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.setup_basic_quadratures","text":"function for getting the basic quadratures used for the numerical integration of the Lagrange polynomials and the Green's function.\n\n\n\n\n\n","category":"method"},{"location":"zz_maxwell_diffusion/#maxwell_diffusion","page":"maxwell_diffusion","title":"maxwell_diffusion","text":"","category":"section"},{"location":"zz_maxwell_diffusion/","page":"maxwell_diffusion","title":"maxwell_diffusion","text":"Modules = [moment_kinetics.maxwell_diffusion]","category":"page"},{"location":"zz_maxwell_diffusion/#moment_kinetics.maxwell_diffusion.ion_vpa_maxwell_diffusion!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, Any, Any, T_spectral, Any, Any}} where T_spectral","page":"maxwell_diffusion","title":"moment_kinetics.maxwell_diffusion.ion_vpa_maxwell_diffusion!","text":"Calculate the Maxwellian associated with the current ion pdf moments, and then subtract this from current pdf. Then take second derivative of this function to act as the diffusion operator. \n\n\n\n\n\n","category":"method"},{"location":"zz_maxwell_diffusion/#moment_kinetics.maxwell_diffusion.neutral_vz_maxwell_diffusion!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, Any, Any, Any, T_spectral, Any, Any}} where T_spectral","page":"maxwell_diffusion","title":"moment_kinetics.maxwell_diffusion.neutral_vz_maxwell_diffusion!","text":"Calculate the Maxwellian associated with the current neutral pdf moments, and then subtract this from current pdf. Then take second derivative of this function to act as the diffusion operator. \n\n\n\n\n\n","category":"method"},{"location":"zz_maxwell_diffusion/#moment_kinetics.maxwell_diffusion.setup_mxwl_diff_collisions_input-Tuple{Dict}","page":"maxwell_diffusion","title":"moment_kinetics.maxwell_diffusion.setup_mxwl_diff_collisions_input","text":"Function for reading Maxwell diffusion operator input parameters. Structure the namelist as follows.\n\n[maxwelldiffusioncollisions] usemaxwelldiffusion = true Dii = 1.0 diffusioncoefficient_option = \"manual\"\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#load_data","page":"load_data","title":"load_data","text":"","category":"section"},{"location":"zz_load_data/","page":"load_data","title":"load_data","text":"Modules = [moment_kinetics.load_data]","category":"page"},{"location":"zz_load_data/#moment_kinetics.load_data","page":"load_data","title":"moment_kinetics.load_data","text":"\n\n\n\n","category":"module"},{"location":"zz_load_data/#moment_kinetics.load_data.close_run_info-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.close_run_info","text":"close_run_info(run_info)\n\nClose all the files in a run_info NamedTuple.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.construct_global_zr_coords-Tuple{Any, Any}","page":"load_data","title":"moment_kinetics.load_data.construct_global_zr_coords","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.get_run_info_no_setup-Tuple{Vararg{Union{AbstractString, Tuple{AbstractString, Union{Nothing, Int64}}}}}","page":"load_data","title":"moment_kinetics.load_data.get_run_info_no_setup","text":"get_run_info_no_setup(run_dir...; itime_min=1, itime_max=0, itime_skip=1, dfns=false,\n initial_electron=false)\nget_run_info_no_setup((run_dir, restart_index)...; itime_min=1, itime_max=0,\n itime_skip=1, dfns=false, initial_electron=false)\n\nGet file handles and other info for a single run\n\nrun_dir is either the directory to read output from (whose name should be the run_name), or a momentkinetics binary output file. If a file is passed, it is only used to infer the directory and `runname, so it is possible for example to pass a.moments.h5output file and alsodfns=trueand the.dfns.h5` file will be the one actually opened (as long as it exists).\n\nrestart_index can be given by passing a Tuple, e.g. (\"runs/example\", 42) as the positional argument. It specifies which restart to read if there are multiple restarts. If no restart_index is given or if nothing is passed, read all restarts and concatenate them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index).\n\nSeveral runs can be loaded at the same time by passing multiple positional arguments. Each argument can be a String run_dir giving a directory to read output from or a Tuple (run_dir, restart_index) giving both a directory and a restart index (it is allowed to mix Strings and Tuples in a call).\n\nBy default load data from moments files, pass dfns=true to load from distribution functions files, or initial_electron=true and dfns=true to load from initial electron state files.\n\nThe itime_min, itime_max and itime_skip options can be used to select only a slice of time points when loading data. In makie_post_process these options are read from the input (if they are set) before get_run_info_no_setup() is called, so that the run_info returned can be passed to makie_post_processing.setup_makie_post_processing_input!(), to be used for defaults for the remaining options. If either itime_min or itime_max are ≤0, their values are used as offsets from the final time index of the run.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.get_variable","page":"load_data","title":"moment_kinetics.load_data.get_variable","text":"get_variable(run_info::Tuple, variable_name; kwargs...)\nget_variable(run_info, variable_name; kwargs...)\n\nGet an array (or Tuple of arrays, if run_info is a Tuple) of the data for variable_name from run_info.\n\nSome derived variables need to be calculated from the saved output, not just loaded from file (with postproc_load_variable). This function takes care of that calculation, and handles the case where run_info is a Tuple (which postproc_load_data does not handle).\n\nkwargs... are passed through to postproc_load_variable().\n\n\n\n\n\n","category":"function"},{"location":"zz_load_data/#moment_kinetics.load_data.get_z_derivative-Tuple{Any, Any}","page":"load_data","title":"moment_kinetics.load_data.get_z_derivative","text":"get_z_derivative(run_info, variable_name; kwargs...)\n\nGet (i.e. load or calculate) variable_name from run_info and calculate its z-derivative. Returns the z-derivative\n\nkwargs... are passed through to get_variable().\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_block_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_block_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_coordinate_data-Tuple{Any, Any}","page":"load_data","title":"moment_kinetics.load_data.load_coordinate_data","text":"load_coordinate_data(fid, name; printout=false, irank=nothing, nrank=nothing,\n run_directory=nothing, ignore_MPI=true)\n\nLoad data for the coordinate name from a file-handle fid.\n\nReturns (coord, spectral, chunk_size). coord is a coordinate object. spectral is the object used to implement the discretization in this coordinate. chunk_size is the size of chunks in this coordinate that was used when writing to the output file.\n\nIf printout is set to true a message will be printed when this function is called.\n\nIf irank and nrank are passed, then the coord and spectral objects returned will be set up for the parallelisation specified by irank and nrank, rather than the one implied by the output file.\n\nUnless ignore_MPI=false is passed, the returned coordinates will be created without shared memory scratch arrays (ignore_MPI=true will be passed through to define_coordinate).\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_distributed_electron_pdf_slice-Tuple{Tuple, Tuple, Any, Int64, Vararg{moment_kinetics.coordinates.coordinate, 4}}","page":"load_data","title":"moment_kinetics.load_data.load_distributed_electron_pdf_slice","text":"Read a slice of an electron distribution function\n\nrun_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.\n\nThe slice to take is specified by the keyword arguments.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_distributed_ion_pdf_slice-Tuple{Tuple, Tuple, Any, Int64, Vararg{moment_kinetics.coordinates.coordinate, 4}}","page":"load_data","title":"moment_kinetics.load_data.load_distributed_ion_pdf_slice","text":"Read a slice of an ion distribution function\n\nrun_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.\n\nThe slice to take is specified by the keyword arguments.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_distributed_neutral_pdf_slice-Tuple{Tuple, Tuple, Any, Int64, Vararg{moment_kinetics.coordinates.coordinate, 5}}","page":"load_data","title":"moment_kinetics.load_data.load_distributed_neutral_pdf_slice","text":"Read a slice of a neutral distribution function\n\nrun_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.\n\nThe slice to take is specified by the keyword arguments.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_electron_moments_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_electron_moments_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_fields_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_fields_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_input-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_input","text":"Load saved input settings\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_ion_moments_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_ion_moments_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_mk_options-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_mk_options","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_neutral_pdf_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_neutral_pdf_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_pdf_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_pdf_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_rank_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_rank_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_slice","page":"load_data","title":"moment_kinetics.load_data.load_slice","text":"Load a slice of a single variable from a file\n\n\n\n\n\n","category":"function"},{"location":"zz_load_data/#moment_kinetics.load_data.load_species_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_species_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_time_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_time_data","text":"If a tuple is given for fid, concatenate the \"time\" output from each file in the tuple\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_variable","page":"load_data","title":"moment_kinetics.load_data.load_variable","text":"Load a single variable from a file\n\n\n\n\n\n","category":"function"},{"location":"zz_load_data/#moment_kinetics.load_data.open_readonly_output_file-Tuple{Any, Any}","page":"load_data","title":"moment_kinetics.load_data.open_readonly_output_file","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.postproc_load_variable-Tuple{Any, Any}","page":"load_data","title":"moment_kinetics.load_data.postproc_load_variable","text":"postproc_load_variable(run_info, variable_name; it=nothing, is=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing)\n\nLoad a variable\n\nrun_info is the information about a run returned by makie_post_processing.get_run_info().\n\nvariable_name is the name of the variable to load.\n\nThe keyword arguments it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be set to an integer or a range (e.g. 3:8 or 3:2:8) to select subsets of the data. Only the data for the subset requested will be loaded from the output file (mostly - when loading fields or moments from runs which used parallel_io = false, the full array will be loaded and then sliced).\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.read_Dict_from_section-Tuple{Any, Any}","page":"load_data","title":"moment_kinetics.load_data.read_Dict_from_section","text":"read_Dict_from_section(file_or_group, section_name; ignore_subsections=false)\n\nRead information from section_name in file_or_group, returning a Dict.\n\nBy default, any subsections are included as nested Dicts. If ignore_subsections=true they are ignored.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.read_distributed_zr_data!-Union{Tuple{N}, Tuple{Array{Float64, N}, String, Tuple, String, Tuple, Int64, Int64, Int64}} where N","page":"load_data","title":"moment_kinetics.load_data.read_distributed_zr_data!","text":"Read data which is a function of (z,r,t) or (z,r,species,t)\n\nrun_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.reload_electron_data!-NTuple{13, Any}","page":"load_data","title":"moment_kinetics.load_data.reload_electron_data!","text":"Reload electron pdf and moments from an existing output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.reload_evolving_fields!-NTuple{15, Any}","page":"load_data","title":"moment_kinetics.load_data.reload_evolving_fields!","text":"Reload pdf and moments from an existing output file.\n\n\n\n\n\n","category":"method"},{"location":"post_processing_notes/#Post-processing","page":"Post processing","title":"Post processing","text":"","category":"section"},{"location":"post_processing_notes/#How-to","page":"Post processing","title":"How to","text":"","category":"section"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"Post processing functionality is provided by the makie_post_processing.makie_post_processing module. To run the post processing, call makie_post_processing.makie_post_process e.g.","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> using makie_post_processing\njulia> makie_post_process(\"runs/example-run/\")","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"or","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> makie_post_process(\"runs/example-run1/\", \"runs/example-run2/\", \"runs/example-run3/\")","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"What this function does is controlled by the settings in an input file, by default post_processing_input.toml.","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"To run from the command line","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia --project run_makie_post_processing.jl dir1 [dir2 [dir3 ...]]","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"If multiple directories are passed, comparison plots will be made. This usually means that for line plots and animations the output for all the runs will be drawn on the same plot. For heatmap plots, the runs will be plotted side by side.","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"If there is output from several restarts of the same run in a directory, by default they will all be read and plotted. A single restart can be started by passing the restart_id argument to makie_post_process().","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"It is also possible to pass an output file (*.moments.h5 or *.dfns.h5) instead of a directory. The file name is just used to find the directory and run_name (which is the prefix of the file name), so for example you can pass a *.moments.h5 file and ask for distribution function plots (as long as the corresponding *.dfns.h5 file exists). This is useful if some output files were moved to a different directory, or the run directory was renamed (e.g. for backup, or to compare some different input options or code versions).","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"To see all the options that can be set, makie_post_processing.generate_example_input_file can be used to create an example file containing all the options with their default values. The options are all commented out when the file is created.","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"note: Viewing animations\nAnimations are produced in .gif format. Most utilities just play gifs, but provide no options to pause them, etc. One that provides a few more features is multigifview (developed by @johnomotani).","category":"page"},{"location":"post_processing_notes/#Interactive-use","page":"Post processing","title":"Interactive use","text":"","category":"section"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"The functions in makie_post_processing.makie_post_processing can be used interactively (or in standalone scripts). To do so, first get the 'info' for a run (file names, metadata, etc.) using makie_post_processing.get_run_info","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> using makie_post_processing\njulia> run_info = get_run_info(\"runs/example-run/\")","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"or to load from the distribution functions output file .dfns.h5","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> run_info_dfns = get_run_info(\"runs/example-run/\"; dfns=true)","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"Settings for post-processing are read from an input file, by default post_processing_input.toml (you can select a different one using the setup_input_file argument to get_run_info()). The relevant settings for interactive use are the default indices (iz0, ivpa0, etc.) that are used to select slices for 1D/2D plots and animations. The settings are read by setup_makie_post_processing!() which is called by default as part of get_run_info(). You might want to call it directly if you load both 'moments' and 'distribution functions' data, to get sensible settings for both at the same time.","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"Then you can make 1d or 2d plots, e.g.","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> fig1 = plot_vs_z(run_info, \"phi\")\njulia> fig2 = plot_vs_r_t(run_info, \"density\"; outfile=\"density_vs_r_t.pdf\")","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"using makie_post_processing.plot_vs_t, etc. for 1d and makie_post_processing.plot_vs_r_t, etc. for 2d plots. The outfile argument can be used to save the plot. You can also change the default values used to select from the other dimensions","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> plot_vs_z(run_info, \"phi\"; outfile=\"phi_vs_z.pdf\", it=42, ir=7)","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"You can make animations in a similar way","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> fig1 = animate_vs_z(run_info, \"phi\"; outfile=\"phi_vs_z.gif\", it=8:12, ir=1)\njulia> fig2 = animate_vs_z_r(run_info, \"density\"; outfile=\"density_vs_z_r.mp4\")","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"using makie_post_processing.animate_vs_r, etc. for 1d and makie_post_processing.animate_vs_z_r, etc. for 2d animations. Note that outfile is required for animations.","category":"page"},{"location":"post_processing_notes/#API","page":"Post processing","title":"API","text":"","category":"section"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"See makie_post_processing.","category":"page"},{"location":"zz_chebyshev/#chebyshev","page":"chebyshev","title":"chebyshev","text":"","category":"section"},{"location":"zz_chebyshev/","page":"chebyshev","title":"chebyshev","text":"Modules = [moment_kinetics.chebyshev]","category":"page"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev","page":"chebyshev","title":"moment_kinetics.chebyshev","text":"\n\n\n\n","category":"module"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshev_base_info","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshev_base_info","text":"Chebyshev pseudospectral discretization\n\n\n\n\n\n","category":"type"},{"location":"zz_chebyshev/#moment_kinetics.calculus.elementwise_derivative!-Tuple{Any, Any, Any, moment_kinetics.chebyshev.chebyshev_info}","page":"chebyshev","title":"moment_kinetics.calculus.elementwise_derivative!","text":"elementwise_derivative!(coord, ff, adv_fac, spectral::chebyshev_info)\n\nChebyshev transform f to get Chebyshev spectral coefficients and use them to calculate f'.\n\nNote: Chebyshev derivative does not make use of upwinding information within each element.\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.calculus.elementwise_derivative!-Tuple{Any, Any, moment_kinetics.chebyshev.chebyshev_info}","page":"chebyshev","title":"moment_kinetics.calculus.elementwise_derivative!","text":"elementwise_derivative!(coord, ff, chebyshev::chebyshev_info)\n\nChebyshev transform f to get Chebyshev spectral coefficients and use them to calculate f'.\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.cheb_derivative_matrix_elementwise!-Tuple{Matrix{Float64}, Int64}","page":"chebyshev","title":"moment_kinetics.chebyshev.cheb_derivative_matrix_elementwise!","text":"derivative matrix for Gauss-Lobatto points using the analytical specification from Chapter 8.2 from Trefethen 1994 https://people.maths.ox.ac.uk/trefethen/8all.pdf full list of Chapters may be obtained here https://people.maths.ox.ac.uk/trefethen/pdetext.html\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.cheb_derivative_matrix_elementwise_radau_by_FFT!-Tuple{Matrix{Float64}, Vararg{Any, 5}}","page":"chebyshev","title":"moment_kinetics.chebyshev.cheb_derivative_matrix_elementwise_radau_by_FFT!","text":"Derivative matrix for Chebyshev-Radau grid using the FFT. Note that a similar function could be constructed for the Chebyshev-Lobatto grid, if desired.\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshev_backward_transform!-NTuple{5, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshev_backward_transform!","text":"\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshev_derivative_single_element!-NTuple{7, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshev_derivative_single_element!","text":"\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshev_forward_transform!-NTuple{5, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshev_forward_transform!","text":"takes the real function ff on a Chebyshev grid in z (domain [-1, 1]), which corresponds to the domain [π, 2π] in variable theta = ArcCos(z). interested in functions of form f(z) = sumn cn Tn(z) using Tn(cos(theta)) = cos(ntheta) and z = cos(theta) gives f(z) = sumn cn cos(ntheta) thus a Chebyshev transform is equivalent to a discrete cosine transform doing this directly turns out to be slower than extending the domain from [0, 2pi] and using the fact that f(z) must be even (as cosines are all even) on this extended domain, can do a standard complex-to-complex fft fext is an array used to store f(theta) on the extended grid theta ∈ [0,2π) ff is f(theta) on the grid [π,2π] the Chebyshev coefficients of ff are calculated and stored in chebyf n is the number of grid points on the Chebyshev-Gauss-Lobatto grid transform is the plan for the complex-to-complex, in-place fft\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshev_radau_backward_transform!-NTuple{5, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshev_radau_backward_transform!","text":"\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshev_spectral_derivative!-Tuple{Any, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshev_spectral_derivative!","text":"use Chebyshev basis to compute the first derivative of f\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshevmoments-Tuple{Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshevmoments","text":"compute and return modified Chebyshev moments of the first kind: ∫dx Tᵢ(x) over range [-1,1]\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshevpoints-Tuple{Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshevpoints","text":"returns the Chebyshev-Gauss-Lobatto grid points on an n point grid\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.clenshaw_curtis_weights-NTuple{6, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.clenshaw_curtis_weights","text":"returns wgts array containing the integration weights associated with all grid points for Clenshaw-Curtis quadrature\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.scaled_chebyshev_grid-NTuple{7, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.scaled_chebyshev_grid","text":"initialize chebyshev grid scaled to interval [-boxlength/2, boxlength/2] we no longer pass the boxlength to this function, but instead pass precomputed arrays elementscale and element_shift that are needed to compute the grid.\n\nngrid – number of points per element (including boundary points) nelementlocal – number of elements in the local (distributed memory MPI) grid n – total number of points in the local grid (excluding duplicate points) elementscale – the scale factor in the transform from the coordinates where the element limits are -1, 1 to the coordinate where the limits are Aj = coord.grid[imin[j]-1] and Bj = coord.grid[imax[j]] elementscale = 0.5*(Bj - Aj) elementshift – the centre of the element in the extended grid coordinate element_shift = 0.5*(Aj + Bj) imin – the array of minimum indices of each element on the extended grid. By convention, the duplicated points are not included, so for element index j > 1 the lower boundary point is actually imin[j] - 1 imax – the array of maximum indices of each element on the extended grid.\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.setup_chebyshev_pseudospectral-Tuple{Any, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.setup_chebyshev_pseudospectral","text":"create arrays needed for explicit Chebyshev pseudospectral treatment and create the plans for the forward and backward fast Fourier transforms\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.update_df_chebyshev!-Tuple{Any, Any, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.update_df_chebyshev!","text":"compute the Chebyshev spectral coefficients of the spatial derivative of f\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.update_fcheby!-Tuple{Any, Any, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.update_fcheby!","text":"Chebyshev transform f to get Chebyshev spectral coefficients\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_constraints/#moment_constraints","page":"moment_constraints","title":"moment_constraints","text":"","category":"section"},{"location":"zz_moment_constraints/","page":"moment_constraints","title":"moment_constraints","text":"Modules = [moment_kinetics.moment_constraints]","category":"page"},{"location":"zz_moment_constraints/#moment_kinetics.moment_constraints","page":"moment_constraints","title":"moment_kinetics.moment_constraints","text":"Functions for enforcing integral constraints on the normalised distribution function. Ensures consistency of evolution split into moments and normalised distribution function.\n\n\n\n\n\n","category":"module"},{"location":"zz_moment_constraints/#moment_kinetics.moment_constraints.add_electron_implicit_constraint_forcing_to_Jacobian!-NTuple{9, Any}","page":"moment_constraints","title":"moment_kinetics.moment_constraints.add_electron_implicit_constraint_forcing_to_Jacobian!","text":"add_electron_implicit_constraint_forcing_to_Jacobian!(jacobian_matrix, f,\n z_speed, z, vperp, vpa,\n constraint_forcing_rate,\n dt, ir; f_offset=0)\n\nAdd the contributions corresponding to electron_implicit_constraint_forcing! to jacobian_matrix.\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_constraints/#moment_kinetics.moment_constraints.electron_implicit_constraint_forcing!-NTuple{6, Any}","page":"moment_constraints","title":"moment_kinetics.moment_constraints.electron_implicit_constraint_forcing!","text":"electron_implicit_constraint_forcing!(f_out, f_in, constraint_forcing_rate, vpa,\n dt, ir)\n\nAdd terms to the electron kinetic equation that force the moment constraints to be approximately satisfied. Needed to avoid large errors when taking large, implicit timesteps that do not guarantee accurate time evolution.\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_constraints/#moment_kinetics.moment_constraints.hard_force_moment_constraints!-Tuple{Any, Any, Any}","page":"moment_constraints","title":"moment_kinetics.moment_constraints.hard_force_moment_constraints!","text":"hard_force_moment_constraints!(f, moments, vpa)\n\nForce the moment constraints needed for the system being evolved to be applied to f. Not guaranteed to be a small correction, if f does not approximately obey the constraints to start with, but can be useful at initialisation to ensure a consistent initial state, and when applying boundary conditions.\n\nNote this function assumes the input is given at a single spatial position.\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_constraints/#moment_kinetics.moment_constraints.hard_force_moment_constraints_neutral!-Tuple{Any, Any, Any}","page":"moment_constraints","title":"moment_kinetics.moment_constraints.hard_force_moment_constraints_neutral!","text":"hard_force_moment_constraints_neutral!(f, moments, vz)\n\nForce the moment constraints needed for the system being evolved to be applied to f. Not guaranteed to be a small correction, if f does not approximately obey the constraints to start with, but can be useful at initialisation to ensure a consistent initial state, and when applying boundary conditions.\n\nNotes:\n\nthis function assumes the input is given at a single spatial position.\ncurrently only works with '1V' runs, where vz is the only velocity-space dimension\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_constraints/#moment_kinetics.moment_constraints.moment_constraints_on_residual!-Union{Tuple{N}, Tuple{T}, Tuple{AbstractArray{T, N}, AbstractArray{T, N}, Any, Any}} where {T, N}","page":"moment_constraints","title":"moment_kinetics.moment_constraints.moment_constraints_on_residual!","text":"moment_constraints_on_residual!(residual, f, moments, vpa)\n\nA 'residual' (used in implicit timestepping) is an update to the distribution function f_mathrmnew = f_mathrmold + mathttresidual. f_mathrmnew should obey the moment constraints (Constraints on normalized distribution function), and f_mathrmold already obeys the constraints, which means that the first 3 moments of residual should be zero. We impose this constraint by adding corrections proportional to f.\n\nr = hatr + (A + B w_ + C w_^2) f\n\nNote this function assumes the input is given at a single spatial position.\n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#source_terms","page":"source_terms","title":"source_terms","text":"","category":"section"},{"location":"zz_source_terms/","page":"source_terms","title":"source_terms","text":"Modules = [moment_kinetics.source_terms]","category":"page"},{"location":"zz_source_terms/#moment_kinetics.source_terms","page":"source_terms","title":"moment_kinetics.source_terms","text":"\n\n\n\n","category":"module"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms!-NTuple{11, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms!","text":"calculate the source terms due to redefinition of the pdf to split off density, flow and/or pressure, and use them to update the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_evolve_density!-NTuple{12, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_evolve_density!","text":"\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_evolve_density_neutral!-NTuple{12, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_evolve_density_neutral!","text":"\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_evolve_ppar_collisions!-NTuple{13, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_evolve_ppar_collisions!","text":"update the evolved pdf to account for the charge exchange and ionization source terms in the kinetic equation arising due to the re-normalization of the pdf as g = f * vth / n\n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_evolve_ppar_collisions_neutral!-NTuple{13, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_evolve_ppar_collisions_neutral!","text":"update the evolved pdf to account for the charge exchange and ionization source terms in the kinetic equation arising due to the re-normalization of the pdf as g = f * vth / n\n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_evolve_ppar_no_collisions!-NTuple{16, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_evolve_ppar_no_collisions!","text":"update the evolved pdf to account for the collisionless source terms in the kinetic equation arising due to the re-normalization of the pdf as g = f * vth / n\n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_evolve_ppar_no_collisions_neutral!-NTuple{16, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_evolve_ppar_no_collisions_neutral!","text":"update the evolved pdf to account for the collisionless source terms in the kinetic equation arising due to the re-normalization of the pdf as g = f * vth / n\n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_manufactured!-NTuple{13, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_manufactured!","text":"advance the dfn with an arbitrary source function \n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_neutral!-NTuple{11, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_neutral!","text":"calculate the source terms due to redefinition of the pdf to split off density, flow and/or pressure, and use them to update the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_constants/#constants","page":"constants","title":"constants","text":"","category":"section"},{"location":"zz_constants/","page":"constants","title":"constants","text":"Modules = [moment_kinetics.constants]","category":"page"},{"location":"zz_constants/#moment_kinetics.constants","page":"constants","title":"moment_kinetics.constants","text":"Some physical constants\n\n\n\n\n\n","category":"module"},{"location":"zz_force_balance/#force_balance","page":"force_balance","title":"force_balance","text":"","category":"section"},{"location":"zz_force_balance/","page":"force_balance","title":"force_balance","text":"Modules = [moment_kinetics.force_balance]","category":"page"},{"location":"zz_force_balance/#moment_kinetics.force_balance","page":"force_balance","title":"moment_kinetics.force_balance","text":"\n\n\n\n","category":"module"},{"location":"zz_force_balance/#moment_kinetics.force_balance.force_balance!-NTuple{12, Any}","page":"force_balance","title":"moment_kinetics.force_balance.force_balance!","text":"use the force balance equation d(nu)/dt + d(ppar + nuparupar)/dz = -(dens/2)dphi/dz + Rdensi*densn(uparn-upari) to update the parallel particle flux densupar for each species\n\n\n\n\n\n","category":"method"},{"location":"zz_krook_collisions/#krook_collisions","page":"krook_collisions","title":"krook_collisions","text":"","category":"section"},{"location":"zz_krook_collisions/","page":"krook_collisions","title":"krook_collisions","text":"Modules = [moment_kinetics.krook_collisions]","category":"page"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions","page":"krook_collisions","title":"moment_kinetics.krook_collisions","text":"\n\n\n\n","category":"module"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions.electron_krook_collisions!-NTuple{10, Any}","page":"krook_collisions","title":"moment_kinetics.krook_collisions.electron_krook_collisions!","text":"Add Krook collision operator for electrons\n\nNote that this function operates on a single point in r, so pdf_out, pdf_in, dens_in, upar_in, upar_ion_in, and vth_in should have no r-dimension.\n\n\n\n\n\n","category":"method"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions.get_collision_frequency_ee-Tuple{Any, Any, Any}","page":"krook_collisions","title":"moment_kinetics.krook_collisions.get_collision_frequency_ee","text":"get_collision_frequency_ee(collisions, n, vthe)\n\nCalculate the electron-electron collision frequency, depending on the settings/parameters in collisions, for the given density n and electron thermal speed vthe.\n\nn and vthe may be scalars or arrays, but should have shapes that can be broadcasted together.\n\n\n\n\n\n","category":"method"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions.get_collision_frequency_ei-Tuple{Any, Any, Any}","page":"krook_collisions","title":"moment_kinetics.krook_collisions.get_collision_frequency_ei","text":"get_collision_frequency_ei(collisions, n, vthe)\n\nCalculate the electron-electron collision frequency, depending on the settings/parameters in collisions, for the given density n and electron thermal speed vthe.\n\nn and vthe may be scalars or arrays, but should have shapes that can be broadcasted together.\n\n\n\n\n\n","category":"method"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions.get_collision_frequency_ii-Tuple{Any, Any, Any}","page":"krook_collisions","title":"moment_kinetics.krook_collisions.get_collision_frequency_ii","text":"get_collision_frequency_ii(collisions, n, vth)\n\nCalculate the ion-ion collision frequency, depending on the settings/parameters in collisions, for the given density n and thermal speed vth.\n\nn and vth may be scalars or arrays, but should have shapes that can be broadcasted together.\n\n\n\n\n\n","category":"method"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions.krook_collisions!-NTuple{8, Any}","page":"krook_collisions","title":"moment_kinetics.krook_collisions.krook_collisions!","text":"Add collision operator\n\nCurrently Krook collisions\n\n\n\n\n\n","category":"method"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions.setup_krook_collisions_input-Tuple{Dict}","page":"krook_collisions","title":"moment_kinetics.krook_collisions.setup_krook_collisions_input","text":"Function for reading Krook collision operator input parameters. Structure the namelist as follows.\n\n[krookcollisions] usekrook = true nuii0 = 1.0 frequency_option = \"manual\"\n\n\n\n\n\n","category":"method"},{"location":"zz_plot_MMS_sequence/#plot_MMS_sequence","page":"plot_MMS_sequence","title":"plot_MMS_sequence","text":"","category":"section"},{"location":"zz_plot_MMS_sequence/","page":"plot_MMS_sequence","title":"plot_MMS_sequence","text":"Modules = [plots_post_processing.plot_MMS_sequence]","category":"page"},{"location":"zz_plot_MMS_sequence/#plots_post_processing.plot_MMS_sequence","page":"plot_MMS_sequence","title":"plots_post_processing.plot_MMS_sequence","text":"\n\n\n\n","category":"module"},{"location":"zz_external_sources/#external_sources","page":"external_sources","title":"external_sources","text":"","category":"section"},{"location":"zz_external_sources/","page":"external_sources","title":"external_sources","text":"Modules = [moment_kinetics.external_sources]","category":"page"},{"location":"zz_external_sources/#moment_kinetics.external_sources","page":"external_sources","title":"moment_kinetics.external_sources","text":"Maxwellian source terms with spatially varying parameters representing external sources of particles and energy.\n\nNote there is no parallel momentum input from the external sources.\n\nThe sources can be controlled by a PI controller to set density to a target value or profile. Note that the PI controller should not be used with operator splitting - implementing it in a way that would be compatible with splitting is complicated because the source contributes to several terms.\n\n\n\n\n\n","category":"module"},{"location":"zz_external_sources/#moment_kinetics.external_sources.external_electron_source!-NTuple{12, Any}","page":"external_sources","title":"moment_kinetics.external_sources.external_electron_source!","text":"external_electron_source!(pdf_out, pdf_in, electron_density, electron_upar,\n moments, composition, electron_source, index, vperp,\n vpa, dt, ir)\n\nAdd external source term to the electron kinetic equation.\n\nNote that this function operates on a single point in r, given by ir, and pdf_out, pdf_in, electron_density, and electron_upar should have no r-dimension.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.external_electron_source_controller!-NTuple{5, Any}","page":"external_sources","title":"moment_kinetics.external_sources.external_electron_source_controller!","text":"external_electron_source_controller!(fvec_in, moments, electron_source_settings, dt)\n\nCalculate the amplitude, e.g. when using a PI controller for the density to set the external source amplitude.\n\nAs the electron density source must be equal to the ion density source in order not to inject charge into the simulation, the electron source (at least in some modes of operation) depends on the ion source, so external_ion_source_controller! must be called before this function is called so that moments.ion.external_source_amplitude is up to date.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.external_ion_source!-NTuple{9, Any}","page":"external_sources","title":"moment_kinetics.external_sources.external_ion_source!","text":"external_ion_source!(pdf, fvec, moments, ion_source_settings, vperp, vpa, dt)\n\nAdd external source term to the ion kinetic equation.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.external_ion_source_controller!-NTuple{5, Any}","page":"external_sources","title":"moment_kinetics.external_sources.external_ion_source_controller!","text":"external_ion_source_controller!(fvec_in, moments, ion_source_settings, dt)\n\nCalculate the amplitude when using a PI controller for the density to set the external source amplitude.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.external_neutral_source!-NTuple{9, Any}","page":"external_sources","title":"moment_kinetics.external_sources.external_neutral_source!","text":"external_neutral_source!(pdf, fvec, moments, neutral_source_settings, vzeta, vr,\n vz, dt)\n\nAdd external source term to the neutral kinetic equation.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.external_neutral_source_controller!-NTuple{7, Any}","page":"external_sources","title":"moment_kinetics.external_sources.external_neutral_source_controller!","text":"external_neutral_source_controller!(fvec_in, moments, neutral_source_settings, r,\n z, dt)\n\nCalculate the amplitude when using a PI controller for the density to set the external source amplitude.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.get_source_profile-NTuple{4, Any}","page":"external_sources","title":"moment_kinetics.external_sources.get_source_profile","text":"get_source_profile(profile_type, width, min_val, coord)\n\nCreate a profile of type profile_type with width width for coordinate coord.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.initialize_external_source_amplitude!-NTuple{6, Any}","page":"external_sources","title":"moment_kinetics.external_sources.initialize_external_source_amplitude!","text":"initialize_external_source_amplitude!(moments, external_source_settings, vperp,\n vzeta, vr, n_neutral_species)\n\nInitialize the arrays moments.ion.external_source_amplitude, moments.ion.external_source_density_amplitude, moments.ion.external_source_momentum_amplitude, moments.ion.external_source_pressure_amplitude, moments.electron.external_source_amplitude, moments.electron.external_source_density_amplitude, moments.electron.external_source_momentum_amplitude, moments.electron.external_source_pressure_amplitude, moments.neutral.external_source_amplitude, moments.neutral.external_source_density_amplitude, moments.neutral.external_source_momentum_amplitude, and moments.neutral.external_source_pressure_amplitude, using the settings in external_source_settings\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.initialize_external_source_controller_integral!-Tuple{Any, Any, Any}","page":"external_sources","title":"moment_kinetics.external_sources.initialize_external_source_controller_integral!","text":"function initializeexternalsourcecontrollerintegral!( moments, externalsourcesettings, nneutralspecies)\n\nInitialize the arrays moments.ion.external_source_controller_integral and moments.neutral.external_source_controller_integral, using the settings in external_source_settings\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.setup_external_sources!-NTuple{4, Any}","page":"external_sources","title":"moment_kinetics.external_sources.setup_external_sources!","text":"setup_external_sources!(input_dict, r, z)\n\nSet up parameters for the external sources using settings in input_dict.\n\nUpdates input_dict with defaults for unset parameters.\n\nr and z are the coordinates.coordinate objects for the r- and z-coordinates.\n\nReturns a NamedTuple (ion=ion_source_settings, neutral=neutral_source_settings) containing two NamedTuples of settings.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.total_external_electron_source_controllers!-NTuple{4, Any}","page":"external_sources","title":"moment_kinetics.external_sources.total_external_electron_source_controllers!","text":"total_external_electron_source_controllers!(fvec_in, moments, electron_sources, dt)\n\nContribute all of the electron source controllers to fvec_in, one by one.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.total_external_electron_sources!-NTuple{11, Any}","page":"external_sources","title":"moment_kinetics.external_sources.total_external_electron_sources!","text":"total_external_electron_sources!(pdf_out, pdf_in, electron_density, electron_upar,\n moments, composition, electron_sources, vperp,\n vpa, dt, ir)\n\nContribute all of the electron sources to the electron pdf, one by one.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.total_external_ion_source_controllers!-NTuple{4, Any}","page":"external_sources","title":"moment_kinetics.external_sources.total_external_ion_source_controllers!","text":"total_external_ion_source_controllers!(fvec_in, moments, ion_sources, dt)\n\nContribute all of the ion source controllers to fvec_in, one by one.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.total_external_ion_sources!-NTuple{8, Any}","page":"external_sources","title":"moment_kinetics.external_sources.total_external_ion_sources!","text":"total_external_ion_sources!(pdf, fvec, moments, ion_sources, vperp, vpa, dt, scratch_dummy)\n\nContribute all of the ion sources to the ion pdf, one by one.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.total_external_neutral_source_controllers!-NTuple{6, Any}","page":"external_sources","title":"moment_kinetics.external_sources.total_external_neutral_source_controllers!","text":"total_external_neutral_source_controllers!(fvec_in, moments, neutral_sources, dt)\n\nContribute all of the neutral source controllers to fvec_in, one by one.\n\n\n\n\n\n","category":"method"},{"location":"zz_clenshaw_curtis/#clenshaw_curtis","page":"clenshaw_curtis","title":"clenshaw_curtis","text":"","category":"section"},{"location":"zz_clenshaw_curtis/","page":"clenshaw_curtis","title":"clenshaw_curtis","text":"Modules = [moment_kinetics.clenshaw_curtis]","category":"page"},{"location":"zz_clenshaw_curtis/#moment_kinetics.clenshaw_curtis","page":"clenshaw_curtis","title":"moment_kinetics.clenshaw_curtis","text":"\n\n\n\n","category":"module"},{"location":"zz_clenshaw_curtis/#moment_kinetics.clenshaw_curtis.chebyshevpoints-Tuple{Any}","page":"clenshaw_curtis","title":"moment_kinetics.clenshaw_curtis.chebyshevpoints","text":"\n\n\n\n","category":"method"},{"location":"zz_clenshaw_curtis/#moment_kinetics.clenshaw_curtis.clenshawcurtisnodes-Union{Tuple{T}, Tuple{Type{T}, Int64}} where T","page":"clenshaw_curtis","title":"moment_kinetics.clenshaw_curtis.clenshawcurtisnodes","text":"Compute nodes of the Clenshaw—Curtis quadrature rule.\n\n\n\n\n\n","category":"method"},{"location":"zz_clenshaw_curtis/#moment_kinetics.clenshaw_curtis.clenshawcurtisweights-Tuple{}","page":"clenshaw_curtis","title":"moment_kinetics.clenshaw_curtis.clenshawcurtisweights","text":"Compute weights of the Clenshaw—Curtis quadrature rule with modified Chebyshev moments of the first kind (μ)\n\n\n\n\n\n","category":"method"},{"location":"zz_clenshaw_curtis/#moment_kinetics.clenshaw_curtis.plan_clenshawcurtis-Tuple{Any}","page":"clenshaw_curtis","title":"moment_kinetics.clenshaw_curtis.plan_clenshawcurtis","text":"\n\n\n\n","category":"method"},{"location":"zz_lagrange_polynomials/#lagrange_polynomials","page":"lagrange_polynomials","title":"lagrange_polynomials","text":"","category":"section"},{"location":"zz_lagrange_polynomials/","page":"lagrange_polynomials","title":"lagrange_polynomials","text":"Modules = [moment_kinetics.lagrange_polynomials]","category":"page"},{"location":"zz_lagrange_polynomials/#moment_kinetics.lagrange_polynomials","page":"lagrange_polynomials","title":"moment_kinetics.lagrange_polynomials","text":"Lagrange polynomials can be useful for finite element methods on any set of basis points, as they give a representation of the interpolating function within an element whose coefficients are just the function values at the grid points.\n\nThis module collects some functions related to the use of Lagrange polynomials, to avoid their being scattered (and possibly duplicated) in other modules.\n\n\n\n\n\n","category":"module"},{"location":"zz_lagrange_polynomials/#moment_kinetics.lagrange_polynomials.lagrange_poly-Tuple{Any, Any, Any}","page":"lagrange_polynomials","title":"moment_kinetics.lagrange_polynomials.lagrange_poly","text":"Lagrange polynomial args: j - index of lj from list of nodes xnodes - array of x node values x - point where interpolated value is returned\n\n\n\n\n\n","category":"method"},{"location":"zz_lagrange_polynomials/#moment_kinetics.lagrange_polynomials.lagrange_poly_optimised-Tuple{Any, Any, Any}","page":"lagrange_polynomials","title":"moment_kinetics.lagrange_polynomials.lagrange_poly_optimised","text":"lagrange_poly_optimised(other_nodes, one_over_denominator, x)\n\nOptimised version of Lagrange polynomial calculation, making use of pre-calculated quantities.\n\nother_nodes is a vector of the grid points in this element where this Lagrange polynomial is zero (the other nodes than the one where it is 1).\n\none_over_denominator is 1/prod(x0 - n for n ∈ other_nodes) where x0 is the grid point where this Lagrange polynomial is 1.\n\nx is the point to evaluate the Lagrange polynomial at.\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing","page":"plots_post_processing","title":"plots_post_processing","text":"","category":"section"},{"location":"zz_plots_post_processing/","page":"plots_post_processing","title":"plots_post_processing","text":"Modules = [plots_post_processing, plots_post_processing.post_processing_input, plots_post_processing.shared_utils]","category":"page"},{"location":"zz_plots_post_processing/#plots_post_processing.plots_post_processing","page":"plots_post_processing","title":"plots_post_processing.plots_post_processing","text":"\n\n\n\n","category":"module"},{"location":"zz_plots_post_processing/#plots_post_processing.allocate_global_zr_fields-Tuple{Any, Any, Any}","page":"plots_post_processing","title":"plots_post_processing.allocate_global_zr_fields","text":"functions to allocate arrays that are used at run-time to postprocess data that is stored in the netcdf files\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.analyze_and_plot_data-Tuple","page":"plots_post_processing","title":"plots_post_processing.analyze_and_plot_data","text":"analyze_and_plot_data(prefix...; run_index=nothing)\n\nMake some plots for the simulation at prefix. If more than one argument is passed to prefix, plot all the simulations together.\n\nThe strings passed to prefix should be either a directory (which contains run output) or the prefix of output files, like / where the output files are /.moments.h5 and /.dfns.h5.\n\nIf a single value is passed for prefix the plots/movies are created in the same directory as the run, and given names based on the name of the run. If multiple values are passed, the plots/movies are given names beginning with compare_ and are created in the comparison_plots/ subdirectory.\n\nBy default plots output from all restarts in a directory. To select a single run, pass the run_index argument - the value corresponds to the _ suffix given to output files when restarting. run_index can be an integer (which is applied to all directories in prefix...), or a tuple of integers (which should have the same length as the number of directories passed to prefix...). Use run_index=-1 to get the most recent run (which does not have a _ suffix). Note that run_index is only used when a directory (rather than the prefix of a specific output file) is passed to prefix...\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.calculate_differences-Tuple","page":"plots_post_processing","title":"plots_post_processing.calculate_differences","text":"Find the maximum difference, as a function of time, between two or more outputs for each variable.\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.compare_fields_symbolic_test-NTuple{13, Any}","page":"plots_post_processing","title":"plots_post_processing.compare_fields_symbolic_test","text":"\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.draw_v_parallel_zero!-Tuple{Plots.Plot, AbstractVector, Any, Any, Bool, Bool}","page":"plots_post_processing","title":"plots_post_processing.draw_v_parallel_zero!","text":"Add a thin, red, dashed line showing vparallel=(vth*wparallel+upar)=0 to a 2d plot with axes (z,vpa).\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.get_tuple_of_return_values-Tuple{Any, Vararg{Any}}","page":"plots_post_processing","title":"plots_post_processing.get_tuple_of_return_values","text":"get_tuple_of_return_values(func, arg_tuples...)\n\nSuppose func(args...) returns a tuple of return values, then get_tuple_of_return_values(func, arg_tuples...) returns a tuple (with an entry for each return value of func) of tuples (one for each argument in each of arg_tuples...) of return values.\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.init_postprocessing_options-NTuple{10, Any}","page":"plots_post_processing","title":"plots_post_processing.init_postprocessing_options","text":"\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_1D_1V_diagnostics-NTuple{52, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_1D_1V_diagnostics","text":"\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_dfns-NTuple{21, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_dfns","text":"\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_fields-NTuple{11, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_fields","text":"\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_ion_pdf-NTuple{21, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_ion_pdf","text":"plots various slices of the ion pdf (1d and 2d, stills and animations)\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_moments-NTuple{25, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_moments","text":"\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_neutral_pdf-NTuple{23, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_neutral_pdf","text":"plots various slices of the neutral pdf (1d and 2d, stills and animations)\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_unnormalised_f2d-Tuple{Any, Any, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_unnormalised_f2d","text":"Make a 2d plot of an unnormalised f on unnormalised coordinates, as returned from getunnormalisedf_coords()\n\nNote this function requires using the PyPlot backend to support 2d coordinates being passed to heatmap().\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.read_distributed_zwallr_data!-Union{Tuple{N}, Tuple{Array{Float64, N}, String, Tuple, String, Tuple, Int64, Int64, String}} where N","page":"plots_post_processing","title":"plots_post_processing.read_distributed_zwallr_data!","text":"Read data which is a function of (r,t) or (r,species,t) and associated to one of the wall boundaries\n\nrun_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.trygif-Tuple{Any, Any}","page":"plots_post_processing","title":"plots_post_processing.trygif","text":"Call gif, but catch the exception if there is an error\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.trysavefig-Tuple{Any}","page":"plots_post_processing","title":"plots_post_processing.trysavefig","text":"Call savefig, but catch the exception if there is an error\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.post_processing_input","page":"plots_post_processing","title":"plots_post_processing.post_processing_input","text":"\n\n\n\n","category":"module"},{"location":"zz_plots_post_processing/#plots_post_processing.shared_utils.calculate_and_write_frequencies-NTuple{9, Any}","page":"plots_post_processing","title":"plots_post_processing.shared_utils.calculate_and_write_frequencies","text":"\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#fokker_planck","page":"fokker_planck","title":"fokker_planck","text":"","category":"section"},{"location":"zz_fokker_planck/","page":"fokker_planck","title":"fokker_planck","text":"Modules = [moment_kinetics.fokker_planck]","category":"page"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck","page":"fokker_planck","title":"moment_kinetics.fokker_planck","text":"module for including the Full-F Fokker-Planck Collision Operator\n\nThe functions in this module are split into two groups. \n\nThe first set of functions implement the weak-form Collision operator using the Rosenbluth-MacDonald-Judd formulation in a divergence form. The Green's functions for the Rosenbluth potentials are used to obtain the Rosenbluth potentials at the boundaries. To find the potentials everywhere else elliptic solves of the PDEs for the Rosenbluth potentials are performed with Dirichlet boundary conditions. These routines provide the default collision operator used in the code.\n\nThe second set of functions are used to set up the necessary arrays to compute the Rosenbluth potentials everywhere in vpa, vperp by direct integration of the Green's functions. These functions are supported for the purposes of testing and debugging.\n\nLower-level routines are provided by functions from moment_kinetics.fokker_planck_calculus.\n\nParallelisation of the collision operator uses a special 'anyv' region type, see Collision operator and anyv region.\n\n\n\n\n\n","category":"module"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.allocate_fokkerplanck_arrays_direct_integration-Tuple{Any, Any}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.allocate_fokkerplanck_arrays_direct_integration","text":"allocate the required ancilliary arrays \n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.explicit_fokker_planck_collisions_weak_form!-Tuple{Any, Any, Any, Any, Any, Any, moment_kinetics.fokker_planck_calculus.fokkerplanck_weakform_arrays_struct, Vararg{Any, 7}}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.explicit_fokker_planck_collisions_weak_form!","text":"Function for advancing with the explicit, weak-form, self-collision operator\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.explicit_fp_collisions_weak_form_Maxwellian_cross_species!-Tuple{Any, Any, Any, Any, Any, Any, moment_kinetics.fokker_planck_calculus.fokkerplanck_weakform_arrays_struct, Vararg{Any, 6}}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.explicit_fp_collisions_weak_form_Maxwellian_cross_species!","text":"Function for advancing with the explicit, weak-form, self-collision operator using the existing method for computing the Rosenbluth potentials, with the addition of cross-species collisions against fixed Maxwellian distribution functions\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.fokker_planck_collision_operator_weak_form!-Tuple{Any, Any, Any, Any, Any, moment_kinetics.fokker_planck_calculus.fokkerplanck_weakform_arrays_struct, Vararg{Any, 4}}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.fokker_planck_collision_operator_weak_form!","text":"Function for evaluating C_ss = C_ssF_sF_s\n\nThe result is stored in the array fkpl_arrays.CC.\n\nThe normalised collision frequency for collisions between species s and s' is defined by\n\ntildenu_ss = fracL_mathrmrefc_mathrmreffracgamma_ss n_mathrmrefm_s^2 c_mathrmref^3\n\nwith gamma_ss = 2 pi (Z_s Z_s)^2 e^4 ln Lambda_ss (4 pi epsilon_0)^2. The input parameter to this code is \n\ntildenu_ii = fracL_mathrmrefc_mathrmreffracgamma_mathrmref n_mathrmrefm_mathrmref^2 c_mathrmref^3\n\nwith gamma_mathrmref = 2 pi e^4 ln Lambda_ii (4 pi epsilon_0)^2. This means that tildenu_ss = (Z_s Z_s)^2tildenu_mathrmref and this conversion is handled explicitly in the code with the charge number input provided by the user.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.fokker_planck_collision_operator_weak_form_Maxwellian_Fsp!-Tuple{Any, Float64, Float64, Float64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, moment_kinetics.fokker_planck_calculus.fokkerplanck_weakform_arrays_struct, Vararg{Any, 4}}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.fokker_planck_collision_operator_weak_form_Maxwellian_Fsp!","text":"Function for computing the collision operator\n\nsum_s^prime CF_sF_s^prime\n\nwhen \n\nF_s^prime\n\nis an analytically specified Maxwellian distribution\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.init_fokker_planck_collisions_direct_integration-Tuple{Any, Any}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.init_fokker_planck_collisions_direct_integration","text":"function that initialises the arrays needed to calculate the Rosenbluth potentials by direct integration. As this function is only supported to keep the testing of the direct integration method, the struct 'fka' created here does not contain all of the arrays necessary to compute the weak-form operator. This functionality could be ported if necessary.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.init_fokker_planck_collisions_weak_form-NTuple{4, Any}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.init_fokker_planck_collisions_weak_form","text":"function that initialises the arrays needed for Fokker Planck collisions using numerical integration to compute the Rosenbluth potentials only at the boundary and using an elliptic solve to obtain the potentials in the rest of the velocity space domain.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.setup_fkpl_collisions_input-Tuple{Dict}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.setup_fkpl_collisions_input","text":"Function for reading Fokker Planck collision operator input parameters. Structure the namelist as follows.\n\n[fokkerplanckcollisions] usefokkerplanck = true nuii = 1.0 frequency_option = \"manual\"\n\n\n\n\n\n","category":"method"},{"location":"zz_reference_parameters/#reference_parameters","page":"reference_parameters","title":"reference_parameters","text":"","category":"section"},{"location":"zz_reference_parameters/","page":"reference_parameters","title":"reference_parameters","text":"Modules = [moment_kinetics.reference_parameters]","category":"page"},{"location":"zz_reference_parameters/#moment_kinetics.reference_parameters","page":"reference_parameters","title":"moment_kinetics.reference_parameters","text":"Reference parameters\n\nReference parameters are not needed or used by the main part of the code, but define the physical units of the simulation, and are needed for a few specific steps during setup (e.g. calculation of normalised collision frequency).\n\n\n\n\n\n","category":"module"},{"location":"zz_reference_parameters/#moment_kinetics.reference_parameters.get_reference_collision_frequency_ee-Tuple{Any}","page":"reference_parameters","title":"moment_kinetics.reference_parameters.get_reference_collision_frequency_ee","text":"Calculate normalized electron-electron collision frequency at reference parameters for Coulomb collisions.\n\n\n\n\n\n","category":"method"},{"location":"zz_reference_parameters/#moment_kinetics.reference_parameters.get_reference_collision_frequency_ei-Tuple{Any}","page":"reference_parameters","title":"moment_kinetics.reference_parameters.get_reference_collision_frequency_ei","text":"Calculate normalized electron-ion collision frequency at reference parameters for Coulomb collisions.\n\nCurrently valid only for hydrogenic ions (Z=1)\n\n\n\n\n\n","category":"method"},{"location":"zz_reference_parameters/#moment_kinetics.reference_parameters.get_reference_collision_frequency_ii-Tuple{Any}","page":"reference_parameters","title":"moment_kinetics.reference_parameters.get_reference_collision_frequency_ii","text":"Calculate normalized ion-ion collision frequency at reference parameters for Coulomb collisions.\n\nCurrently valid only for hydrogenic ions (Z=1)\n\n\n\n\n\n","category":"method"},{"location":"zz_reference_parameters/#moment_kinetics.reference_parameters.setup_reference_parameters-Tuple{Any}","page":"reference_parameters","title":"moment_kinetics.reference_parameters.setup_reference_parameters","text":"\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#electron_fluid_equations","page":"electron_fluid_equations","title":"electron_fluid_equations","text":"","category":"section"},{"location":"zz_electron_fluid_equations/","page":"electron_fluid_equations","title":"electron_fluid_equations","text":"Modules = [moment_kinetics.electron_fluid_equations]","category":"page"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.calculate_Epar_from_electron_force_balance!-NTuple{11, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.calculate_Epar_from_electron_force_balance!","text":"solve the electron force balance (parallel momentum) equation for the parallel electric field, Epar: Epar = -dphi/dz = (2/ne) * (-dppare/dz + frictionforce + ne * me * nn * Ren * (un - ue)) NB: in 1D only Epar is needed for update of ion pdf, so boundary phi is irrelevant inputs: dense = electron density dppardz = zed derivative of electron parallel pressure nuei = electron-ion collision frequency friction = electron-ion parallel friction force nneutralspecies = number of evolved neutral species chargeexchange = electron-neutral charge exchange frequency meovermi = electron-ion mass ratio densn = neutral density uparn = neutral parallel flow upare = electron parallel flow output: Epar = parallel electric field\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.calculate_electron_density!-Tuple{Any, Any, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.calculate_electron_density!","text":"use quasineutrality to obtain the electron density from the initial densities of the various ion species: sumi densi = dense inputs: dense = electron density at previous time level updated = flag indicating if the electron density is updated densi = updated ion density output: dense = updated electron density updated = flag indicating that the electron density has been updated\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.calculate_electron_parallel_friction_force!-NTuple{8, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.calculate_electron_parallel_friction_force!","text":"\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.calculate_electron_qpar!-NTuple{9, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.calculate_electron_qpar!","text":"calculate the parallel component of the electron heat flux. there are currently two supported options for the parallel heat flux: Braginskii collisional closure - qpare = -3.16*ppare/(me*nuei)dT/dz - 0.71ppare*(upari-upare) collisionless closure - d(qpare)/dz = 0 ==> qpare = constant inputs: qpare = parallel electron heat flux at the previous time level qparupdated = flag indicating whether qpar is updated already pdf = electron pdf ppare = electron parallel pressure upare = electron parallel flow vthe = electron thermal speed dTedz = zed derivative of electron temperature upari = ion parallel flow nuei = electron-ion collision frequency meovermi = electron-to-ion mass ratio electronmodel = choice of model for electron physics vpa = struct containing information about the vpa coordinate output: qpare = updated parallel electron heat flux qparupdated = flag indicating that the parallel electron heat flux is updated\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.calculate_electron_qpar_from_pdf!-NTuple{5, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.calculate_electron_qpar_from_pdf!","text":"calculate the parallel component of the electron heat flux, defined as qpar = 2 * ppar * vth * int dwpa (pdf * wpa^3)\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.calculate_electron_qpar_from_pdf_no_r!-NTuple{6, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.calculate_electron_qpar_from_pdf_no_r!","text":"Calculate the parallel component of the electron heat flux, defined as qpar = 2 * ppar * vth * int dwpa (pdf * wpa^3). This version of the function does not loop over r. pdf should have no r-dimension, while the moment variables are indexed at ir.\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.calculate_electron_upar_from_charge_conservation!-NTuple{8, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.calculate_electron_upar_from_charge_conservation!","text":"use charge conservation equation to solve for the electron parallel flow density: d/dz(sumi ni upari - ne upare) = 0 ==> {sumi ni upari}(z) - {sumi ni upari}(zbound) = {ne upare}(z) - {ne upare}(zbound) inputs: upare = should contain updated electron parallel flow at boundaries in zed updated = flag indicating whether the electron parallel flow is already updated dense = electron particle density upari = ion parallel flow density densi = ion particle density output: upare = contains the updated electron parallel flow\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.electron_braginskii_conduction!-Tuple{AbstractVector{Float64}, AbstractVector{Float64}, AbstractVector{Float64}, AbstractVector{Float64}, AbstractVector{Float64}, Vararg{Any, 8}}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.electron_braginskii_conduction!","text":"Add just the braginskii conduction contribution to the electron pressure, and assume that we have to calculate qpar and dqpar_dz from ppar within this function (they are not pre-calculated).\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.electron_energy_equation!-NTuple{18, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.electron_energy_equation!","text":"use the electron energy or temperature equation to evolve the electron temperature via an explicit time advance. NB: so far, this is only set up for 1D problem, where we can assume an isotropic distribution in fe so that pe = ne Te = ppar_e\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.electron_energy_residual!-NTuple{13, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.electron_energy_residual!","text":"electron_energy_residual!(residual, electron_ppar_out, electron_ppar, in,\n fvec_in, moments, collisions, composition,\n external_source_settings, num_diss_params, z, dt, ir)\n\nThe residual is a function whose input is electron_ppar, so that when it's output residual is zero, electronppar is the result of a backward-Euler timestep: (fout - fin) / dt = RHS(fout) ⇒ (fout - fin) - dt*RHS(f_out) = 0\n\nThis function assumes any needed moment derivatives are already calculated using electron_ppar_out and stored in moments.electron.\n\nNote that this function operates on a single point in r, given by ir, and residual, electron_ppar_out, and electron_ppar_in should have no r-dimension.\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.electron_fluid_qpar_boundary_condition!-NTuple{5, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.electron_fluid_qpar_boundary_condition!","text":"electron_fluid_qpar_boundary_condition!(electron_moments, z)\n\nImpose fluid approximation to electron sheath boundary condition on the parallel heat flux. See Stangeby textbook, equations (2.89) and (2.90).\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_z_advection/#neutral_z_advection","page":"neutral_z_advection","title":"neutral_z_advection","text":"","category":"section"},{"location":"zz_neutral_z_advection/","page":"neutral_z_advection","title":"neutral_z_advection","text":"Modules = [moment_kinetics.neutral_z_advection]","category":"page"},{"location":"zz_neutral_z_advection/#moment_kinetics.neutral_z_advection","page":"neutral_z_advection","title":"moment_kinetics.neutral_z_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_neutral_z_advection/#moment_kinetics.neutral_z_advection.adjust_advection_speed!-NTuple{5, Any}","page":"neutral_z_advection","title":"moment_kinetics.neutral_z_advection.adjust_advection_speed!","text":"\n\n\n\n","category":"method"},{"location":"zz_neutral_z_advection/#moment_kinetics.neutral_z_advection.neutral_advection_z!-NTuple{14, Any}","page":"neutral_z_advection","title":"moment_kinetics.neutral_z_advection.neutral_advection_z!","text":"do a single stage time advance (potentially as part of a multi-stage RK scheme)\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_z_advection/#moment_kinetics.neutral_z_advection.unnormalize_pdf!-NTuple{6, Any}","page":"neutral_z_advection","title":"moment_kinetics.neutral_z_advection.unnormalize_pdf!","text":"\n\n\n\n","category":"method"},{"location":"zz_neutral_z_advection/#moment_kinetics.neutral_z_advection.update_speed_neutral_z!-NTuple{11, Any}","page":"neutral_z_advection","title":"moment_kinetics.neutral_z_advection.update_speed_neutral_z!","text":"calculate the advection speed in the z-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_grid_transforms/#velocity_grid_transforms","page":"velocity_grid_transforms","title":"velocity_grid_transforms","text":"","category":"section"},{"location":"zz_velocity_grid_transforms/","page":"velocity_grid_transforms","title":"velocity_grid_transforms","text":"Modules = [moment_kinetics.velocity_grid_transforms]","category":"page"},{"location":"zz_velocity_grid_transforms/#moment_kinetics.velocity_grid_transforms","page":"velocity_grid_transforms","title":"moment_kinetics.velocity_grid_transforms","text":"\n\n\n\n","category":"module"},{"location":"manual_setup/#Manual-setup","page":"Manual setup","title":"Manual setup","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"If you want or need to set up moment_kinetics without using machines/machine_setup.sh, you will need to follow at least the steps in the following sections.","category":"page"},{"location":"manual_setup/#Install-Julia","page":"Manual setup","title":"Install Julia","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"Download Julia from https://julialang.org/downloads/, and add it to your $PATH so you can execute it from the command line.","category":"page"},{"location":"manual_setup/#Add-moment_kinetics-packages","page":"Manual setup","title":"Add moment_kinetics packages","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"Create a 'project' in the top-level directory by creating an empty Project.toml file, e.g.","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"$ touch Project.toml","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"Without this Project.toml file, running julia --project will activate a global project, not one linked specificially to the repo you are in, which is likely to cause confusion if you have more than one copy of the moment_kinetics repo (experience suggests you are likely to end up with multiple copies eventually!).","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"To add the moment_kinetics package to your project, start Julia, enter 'Package mode' by pressing ']' at the prompt and use develop (to exit 'Package mode' and return to the usual julia> prompt, press backspace):","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"$ julia --project\njulia> ]\npkg> develop ./moment_kinetics/","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"To allow post-processing add one or both of the post processing packages","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> develop ./makie_post_processing/makie_post_processing/","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"and/or","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> develop ./plots_post_processing/plots_post_processing/","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"To use the run_moment_kinetics.jl script, you will need to install MPI into the top-level project","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> add MPI","category":"page"},{"location":"manual_setup/#Set-up-MPI","page":"Manual setup","title":"Set up MPI","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"You probably want to use your system's MPI rather than a Julia-provided version. To do this add (in 'Package mode') the MPIPreferences package (documentation here) and then use its use_system_binary() function.","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> add MPIPreferences\npkg> \njulia> using MPIPreferences\njulia> MPIPreferences.use_system_binary()","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"Normally this should 'just work'. Sometimes, for example if the MPI library file is named something other than libmpi.so, you might have to pass some keyword arguments to use_system_binary() - see https://juliaparallel.org/MPI.jl/stable/reference/mpipreferences/#MPIPreferences.use_system_binary.","category":"page"},{"location":"manual_setup/#Link-HDF5","page":"Manual setup","title":"Link HDF5","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"To enable parallel I/O, you need to get HDF5.jl to use the system HDF5 library (which must be MPI-enabled and compiled using the same MPI as you run Julia with). To do this (see the HDF5.jl docs) add the HDF5 package and use its HDF5.API.set_libraries!() function","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> add HDF5\npkg> \njulia> using HDF5\njulia> HDF5.API.set_libraries!(\"/path/to/your/hdf5/directory/libhdf5.so\", \"/path/to/your/hdf5/directory/libhdf5_hl.so\")","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"JTO also found that (on a Linux laptop) it was necessary to compile HDF5 from source. The system-provided, MPI-linked libhdf5 depended on libcurl, and Julia links to an incompatible libcurl, causing an error. When compiled from source (enabling MPI!), HDF5 does not require libcurl (guess it is an optional dependency), avoiding the problem.","category":"page"},{"location":"manual_setup/#Enable-MMS-features","page":"Manual setup","title":"Enable MMS features","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"To enable the \"method of manufactured solutions\" (MMS) features, install the Symbolics package (for more explanation, see Optional dependencies)","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> add Symbolics","category":"page"},{"location":"manual_setup/#Enable-NetCDF-output","page":"Manual setup","title":"Enable NetCDF output","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"If you want the option to output to NetCDF instead of HDF5, install the NCDatasets package (for more explanation, see Optional dependencies)","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> add NCDatasets","category":"page"},{"location":"manual_setup/#Set-up-Plots-based-plotting-routines","page":"Manual setup","title":"Set up Plots-based plotting routines","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"The plots_post_processing package has some functions that have to use PyPlot directly to access features not available through the Plots wrapper. This means that Julia has to be able to access an instance of Python which has matplotlib available. If you are going to use plots_post_processing you may well want to use the same Python that you use outside Julia (e.g. a system-provided Python) - to do so:","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"Check that matplotlib is installed, e.g. check that\n$ python\n>>> import matplotlib\ncompletes without an error. If not, install matplotlib, for example with a command like\npip install --user matplotlib\nSet up Julia to use your chosen Python\n$ which python\n/your/python/location\n$ julia -O3 --project\njulia> ENV[\"PYTHON\"]=\"/your/python/location\"\njulia> using Pkg; Pkg.build(\"PyCall\")","category":"page"},{"location":"zz_electron_z_advection/#electron_z_advection","page":"electron_z_advection","title":"electron_z_advection","text":"","category":"section"},{"location":"zz_electron_z_advection/","page":"electron_z_advection","title":"electron_z_advection","text":"Modules = [moment_kinetics.electron_z_advection]","category":"page"},{"location":"zz_electron_z_advection/#moment_kinetics.electron_z_advection","page":"electron_z_advection","title":"moment_kinetics.electron_z_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_electron_z_advection/#moment_kinetics.electron_z_advection.electron_z_advection!-NTuple{11, Any}","page":"electron_z_advection","title":"moment_kinetics.electron_z_advection.electron_z_advection!","text":"calculate the z-advection term for the electron kinetic equation = wpa * vthe * df/dz\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_z_advection/#moment_kinetics.electron_z_advection.update_electron_speed_z!-NTuple{5, Any}","page":"electron_z_advection","title":"moment_kinetics.electron_z_advection.update_electron_speed_z!","text":"calculate the electron advection speed in the z-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"constraints_on_normalized_distribution_function/#Constraints-on-normalized-distribution-function","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"","category":"section"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"Note: Equation references give the Excalibur/Neptune report number and equation number, e.g. (TN-04;1) is equation (1) from report TN-04.pdf.","category":"page"},{"location":"constraints_on_normalized_distribution_function/#Constraints","page":"Constraints on normalized distribution function","title":"Constraints","text":"","category":"section"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"The normalized particle distribution function that is evolved when using the moment-kinetic approach has to satisfy integral constraints related to particle number, momentum and energy conservation (TN-04;70-72)","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n frac1sqrtpiint dw_tildeg_s =1\n frac1sqrtpiint dw_w_tildeg_s =0\n frac1sqrtpiint dw_w_^2tildeg_s =frac12\nendalign","category":"page"},{"location":"constraints_on_normalized_distribution_function/#Old-algorithm","page":"Constraints on normalized distribution function","title":"Old algorithm","text":"","category":"section"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"The algorithm described in TN-04 used the distribution function from the previous time step and also made use of a symmetrized distribution function tildeg_E(w_)=frac12left(tildeg(w_)+tildeg(-w_)right). These choices caused problems when in combination with the boundary conditions as: applying the boundary condition at the new timestep (with an updated tildeu_) to the old tildeg_s could mean that it no longer satisfied the moment constraints (e.g. if a grid point that was previously non-zero is now set to zero by the ion sheath boundary condition); the symmetrized tildeg_E will be non-zero at places where the boundary condition forces tildeg_s to be zero. It is possible to extend the algorithm to allow the constraints to be enforced using only the initial guess of the distribution function at the new timestep, as described below.","category":"page"},{"location":"constraints_on_normalized_distribution_function/#Current-algorithm","page":"Constraints on normalized distribution function","title":"Current algorithm","text":"","category":"section"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"After the time advance updates the distribution function, it will in general not obey the constraints, but the errors will be small, with the size depending on the accuracy of the spatial and temporal discretizations. We can take this updated value hatg_s as an initial guess, to be corrected to give the actual updated value tildeg_s, which does obey the constraints to machine precision.","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"We define the corrected distribution function as","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n tildeg_s=Ahatg_s+Bw_hatg_s+Cw_^2hatg_s\nendalign","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"and define the moments of hatg_s","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n I_n=frac1sqrtpiint dw_w_^nhatg_s\nendalign","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"Then the moments of tildeg_s are","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n frac1sqrtpiint dw_tildeg_s=1 =frac1sqrtpiint dw_left(Ahatg_s+Bw_hatg_s+Cw_^2hatg_sright)=AI_0+BI_1+CI_2\n frac1sqrtpiint dw_w_tildeg_s=0 =frac1sqrtpiint dw_left(Aw_hatg_s+Bw_^2hatg_s+Cw_^3hatg_sright)=AI_1+BI_2+CI_3\n frac1sqrtpiint dw_w_^2tildeg_s=frac12 =frac1sqrtpiint dw_left(Aw_^2hatg_s+Bw_^3hatg_s+Cw_^4hatg_sright)=AI_2+BI_3+CI_4\nendalign","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"Solving the simultaneous equations for A, B, C gives","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n C =fracfrac12-AI_2-BI_3I_4\n B =fracleft(I_2I_3-I_1I_4right)A-fracI_32I_2I_4-I_3^2\n A =fracI_2I_4-fracI_2^22+I_3left(fracI_12-I_3right)I_0left(I_2I_4-I_3^2right)+I_1left(I_2I_3-I_1I_4right)+I_2left(I_1I_3-I_2^2right)\nendalign","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"Note that there is no guarantee that tildeg_s is geq0 even if hatg_sgeq0, although if the violations of the integral constraints are small, it should be true that Aapprox1 while B and C are small.","category":"page"},{"location":"constraints_on_normalized_distribution_function/#Evolving-u_\\parallel","page":"Constraints on normalized distribution function","title":"Evolving u_parallel","text":"","category":"section"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"When evolving fewer moments separately, the constraints become simpler. When evolving n and u_parallel, only the first two constraints are needed. This corresponds to C=0 so that","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n 1 = AI_0 + BI_1 \n 0 = AI_1 + BI_2 \n Rightarrow B = -fracAI_1I_2 \n AI_0 = 1 - BI_1 = 1 + fracAI_1^2I_2 \n A = frac1I_0 - I_1^2I_2\nendalign","category":"page"},{"location":"constraints_on_normalized_distribution_function/#Evolving-n","page":"Constraints on normalized distribution function","title":"Evolving n","text":"","category":"section"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"When evolving only n separately, we only need one constraint and the correction is just a re-scaling. This corresponds to B=0C=0 so that","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n 1 = AI_0 \n A = frac1I_0\nendalign","category":"page"},{"location":"zz_command_line_options/#command_line_options","page":"command_line_options","title":"command_line_options","text":"","category":"section"},{"location":"zz_command_line_options/","page":"command_line_options","title":"command_line_options","text":"Modules = [moment_kinetics.command_line_options]","category":"page"},{"location":"zz_command_line_options/#moment_kinetics.command_line_options","page":"command_line_options","title":"moment_kinetics.command_line_options","text":"Parse command line arguments\n\nHave to include test options here too, because ArgParse errors on unrecognized options.\n\n\n\n\n\n","category":"module"},{"location":"zz_command_line_options/#moment_kinetics.command_line_options.get_options-Tuple{}","page":"command_line_options","title":"moment_kinetics.command_line_options.get_options","text":"\n\n\n\n","category":"method"},{"location":"zz_em_fields/#em_fields","page":"em_fields","title":"em_fields","text":"","category":"section"},{"location":"zz_em_fields/","page":"em_fields","title":"em_fields","text":"Modules = [moment_kinetics.em_fields]","category":"page"},{"location":"zz_em_fields/#moment_kinetics.em_fields","page":"em_fields","title":"moment_kinetics.em_fields","text":"\n\n\n\n","category":"module"},{"location":"zz_em_fields/#moment_kinetics.em_fields.setup_em_fields-NTuple{5, Any}","page":"em_fields","title":"moment_kinetics.em_fields.setup_em_fields","text":"\n\n\n\n","category":"method"},{"location":"zz_em_fields/#moment_kinetics.em_fields.update_phi!-Tuple{Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, moment_kinetics.gyroaverages.gyro_operators}","page":"em_fields","title":"moment_kinetics.em_fields.update_phi!","text":"update_phi updates the electrostatic potential, phi\n\n\n\n\n\n","category":"method"},{"location":"#Home","page":"Home","title":"Home","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Documentation for moment_kinetics.jl","category":"page"},{"location":"#Contents","page":"Home","title":"Contents","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Pages = [\"getting_started.md\",\n \"input_options.md\",\n \"post_processing_notes.md\",\n \"timestepping.md\",\n \"moment_kinetic_equations.md\",\n \"moment_constraints_notes.md\",\n \"boundary_conditions_notes.md\",\n \"external_sources_notes.md\",\n \"debugging-hints.md\",\n \"developing.md\",\n \"manual_setup.md\",\n \"machine_setup_notes.md\",\n \"parameter_scans.md\",\n \"manufactured_solution_test_examples.md\",\n ]","category":"page"},{"location":"#Modules","page":"Home","title":"Modules","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Order = [:module]","category":"page"},{"location":"zz_manufactured_solns/#manufactured_solns","page":"manufactured_solns","title":"manufactured_solns","text":"","category":"section"},{"location":"zz_manufactured_solns/","page":"manufactured_solns","title":"manufactured_solns","text":"Modules = [moment_kinetics.manufactured_solns]","category":"page"},{"location":"zz_manufactured_solns/#moment_kinetics.manufactured_solns","page":"manufactured_solns","title":"moment_kinetics.manufactured_solns","text":"\n\n\n\n","category":"module"},{"location":"zz_neutral_vz_advection/#neutral_vz_advection","page":"neutral_vz_advection","title":"neutral_vz_advection","text":"","category":"section"},{"location":"zz_neutral_vz_advection/","page":"neutral_vz_advection","title":"neutral_vz_advection","text":"Modules = [moment_kinetics.neutral_vz_advection]","category":"page"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.neutral_advection_vz!-NTuple{15, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.neutral_advection_vz!","text":"\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_constant_neutral!-NTuple{6, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_constant_neutral!","text":"update the advection speed dvpa/dt = constant\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_default_neutral!-NTuple{10, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_default_neutral!","text":"\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_linear_neutral-NTuple{6, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_linear_neutral","text":"update the advection speed dvpa/dt = const*(vpa + L/2)\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_n_p_evolution_neutral!-NTuple{10, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_n_p_evolution_neutral!","text":"update the advection speed in the parallel velocity coordinate for the case where density and pressure are evolved independently from the pdf; in this case, the parallel velocity coordinate is the normalized velocity vpahat = vpa/vth\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_n_u_evolution_neutral!-NTuple{9, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_n_u_evolution_neutral!","text":"update the advection speed in the parallel velocity coordinate for the case where density and flow are evolved independently from the pdf; in this case, the parallel velocity coordinate is the peculiar velocity wpa = vpa-upar\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_n_u_p_evolution_neutral!-NTuple{9, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_n_u_p_evolution_neutral!","text":"update the advection speed (for the neutral distribution function) in the z-velocity coordinate for the case where density, flow and pressure are evolved independently from the pdf; in this case, the parallel velocity coordinate is the normalized peculiar velocity wpahat = (vpa - upar)/vth\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_neutral_vz!-NTuple{12, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_neutral_vz!","text":"calculate the advection speed in the vz-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#nonlinear_solvers","page":"nonlinear_solvers","title":"nonlinear_solvers","text":"","category":"section"},{"location":"zz_nonlinear_solvers/","page":"nonlinear_solvers","title":"nonlinear_solvers","text":"Modules = [moment_kinetics.nonlinear_solvers]","category":"page"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers","text":"Nonlinear solvers, using Jacobian-free Newton-Krylov methods.\n\nThese solvers use an outer Newton iteration. Each step of the Newton iteration requires a linear solve of the Jacobian. An 'inexact Jacobian' method is used, and the GMRES method (GMRES is a type of Krylov solver) is used to (approximately) solve the (approximate) linear system.\n\nwarning: parallelisation\nThis module uses shared- and distributed-memory parallelism, so the functions in it should not be called inside any kind of parallelised loop. This restriction should be lifted somehow in future...\n\nparallel_map() is used to apply elementwise functions to arbitrary numbers of arguments using shared-memory parallelism. We do this rather than writing the loops out explicitly so that newton_solve!() and linear_solve!() can work for arrays with any combination of dimensions.\n\nUseful references: [1] V.A. Mousseau and D.A. Knoll, \"Fully Implicit Kinetic Solution of Collisional Plasmas\", Journal of Computational Physics 136, 308–323 (1997), https://doi.org/10.1006/jcph.1997.5736. [2] V.A. Mousseau, \"Fully Implicit Kinetic Modelling of Collisional Plasmas\", PhD thesis, Idaho National Engineering Laboratory (1996), https://inis.iaea.org/collection/NCLCollectionStore/Public/27/067/27067141.pdf. [3] https://en.wikipedia.org/wiki/Generalizedminimalresidualmethod [4] https://www.rikvoorhaar.com/blog/gmres [5] E. Carson , J. Liesen, Z. Strakoš, \"Towards understanding CG and GMRES through examples\", Linear Algebra and its Applications 692, 241–291 (2024), https://doi.org/10.1016/j.laa.2024.04.003. [6] Q. Zou, \"GMRES algorithms over 35 years\", Applied Mathematics and Computation 445, 127869 (2023), https://doi.org/10.1016/j.amc.2023.127869\n\n\n\n\n\n","category":"module"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.gather_nonlinear_solver_counters!-Tuple{Any}","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.gather_nonlinear_solver_counters!","text":"gather_nonlinear_solver_counters!(nl_solver_params)\n\nWhere necessary, gather the iteration counters for the nonlinear solvers.\n\nWhere each solve runs in parallel using all processes, this is unnecessary as the count on each process already represents the global count. Where each solve uses only a subset of processes, the counters from different solves need to be added together to get the global total.\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.linear_solve!-Tuple{Any, Any, Any, Any, Any, Any, Val, Any}","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.linear_solve!","text":"Apply the GMRES algorithm to solve the 'linear problem' J.δx^n = R(x^n), which is needed at each step of the outer Newton iteration (in newton_solve!()).\n\nUses Givens rotations to reduce the upper Hessenberg matrix to an upper triangular form, which allows conveniently finding the residual at each step, and computing the final solution, without calculating a least-squares minimisation at each step. See 'algorithm 2 MGS-GMRES' in Zou (2023) [https://doi.org/10.1016/j.amc.2023.127869].\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.newton_solve!-NTuple{8, Any}","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.newton_solve!","text":"newton_solve!(x, rhs_func!, residual, delta_x, rhs_delta, w, nl_solver_params;\n left_preconditioner=nothing, right_preconditioner=nothing, coords)\n\nx is the initial guess at the solution, and is overwritten by the result of the Newton solve.\n\nrhs_func!(residual, x) is the function we are trying to find a solution of. It calculates\n\nmathttresidual = F(mathttx)\n\nwhere we are trying to solve F(x)=0.\n\nresidual, delta_x, rhs_delta and w are buffer arrays, with the same size as x, used internally.\n\nleft_preconditioner or right_preconditioner apply preconditioning. They should be passed a function that solves Px = b where P is the preconditioner matrix, b is given by the values passed to the function as the argument, and the result x is returned by overwriting the argument.\n\ncoords is a NamedTuple containing the coordinate structs corresponding to each dimension in x.\n\nTolerances\n\nNote that the meaning of the relative tolerance rtol and absolute tolerance atol is very different for the outer Newton iteration and the inner GMRES iteration.\n\nFor the outer Newton iteration the residual R(x^n) measures the departure of the system from the solution (at each grid point). Its size can be compared to the size of the solution x, so it makes sense to define an `error norm' for R(x^n) as\n\nE(x^n) = leftlVert fracR(x^n)mathttrtol x^n mathttatol rightrVert_2\n\nwhere leftlVert cdot rightrVert is the 'L2 norm' (square-root of sum of squares). We can further try to define a grid-size independent error norm by dividing out the number of grid points to get a root-mean-square (RMS) error rather than an L2 norm.\n\nE_mathrmRMS(x^n) = sqrt frac1N sum_i fracR(x^n)_imathttrtol x^n_i mathttatol \n\nwhere N is the total number of grid points.\n\nIn contrast, GMRES is constructed to minimise the L2 norm of r_k = b - Acdot x_k where GMRES is solving the linear system Acdot x = b, x_k is the approximation to the solution x at the k'th iteration and r_k is the residual at the k'th iteration. There is no flexibility to measure error relative to x in any sense. For GMRES, a `relative tolerance' is relative to the residual of the right-hand-side b, which is the first iterate x_0 (when no initial guess is given). [Where a non-zero initial guess is given it might be better to use a different stopping criterion, see Carson et al. section 3.8.]. The stopping criterion for the GMRES iteration is therefore\n\n\\left\\lVert r_k \\right\\rVert < \\max(\\mathtt{linear\\_rtol} \\left\\lVert r_0 \\right\\rVert, \\mathtt{linear\\_atol}) = \\max(\\mathtt{linear\\_rtol} \\left\\lVert b \\right\\rVert, \\mathtt{linear\\_atol})\n\nAs the GMRES solve is only used to get the right direction' for the next Newton step, it is not necessary to have a very tightlinear_rtol` for the GMRES solve.\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.reset_nonlinear_per_stage_counters!-Tuple{Union{Nothing, moment_kinetics.nonlinear_solvers.nl_solver_info}}","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.reset_nonlinear_per_stage_counters!","text":"reset_nonlinear_per_stage_counters!(nl_solver_params::Union{nl_solver_info,Nothing})\n\nReset the counters that hold per-step totals or maximums in nl_solver_params.\n\nAlso increment nl_solver_params.stage_counter[].\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.setup_nonlinear_solve","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.setup_nonlinear_solve","text":"coords is a NamedTuple of coordinates corresponding to the dimensions of the variable that will be solved. The entries in coords should be ordered the same as the memory layout of the variable to be solved (i.e. fastest-varying first).\n\nThe nonlinear solver will be called inside a loop over outer_coords, so we might need for example a preconditioner object for each point in that outer loop.\n\n\n\n\n\n","category":"function"},{"location":"zz_advection/#advection","page":"advection","title":"advection","text":"","category":"section"},{"location":"zz_advection/","page":"advection","title":"advection","text":"Modules = [moment_kinetics.advection]","category":"page"},{"location":"zz_advection/#moment_kinetics.advection","page":"advection","title":"moment_kinetics.advection","text":"\n\n\n\n","category":"module"},{"location":"zz_advection/#moment_kinetics.advection.advection_info","page":"advection","title":"moment_kinetics.advection.advection_info","text":"structure containing the basic arrays associated with the advection terms appearing in the advection equation for each coordinate\n\n\n\n\n\n","category":"type"},{"location":"zz_advection/#moment_kinetics.advection.advance_f_local!-NTuple{9, Any}","page":"advection","title":"moment_kinetics.advection.advance_f_local!","text":"do all the work needed to update f(coord) at a single value of other coords\n\n\n\n\n\n","category":"method"},{"location":"zz_advection/#moment_kinetics.advection.calculate_explicit_advection!-NTuple{4, Any}","page":"advection","title":"moment_kinetics.advection.calculate_explicit_advection!","text":"calculate the explicit advection terms on the rhs of the equation; i.e., -Δt⋅δv⋅f'\n\n\n\n\n\n","category":"method"},{"location":"zz_advection/#moment_kinetics.advection.setup_advection-Tuple{Any, Vararg{Any}}","page":"advection","title":"moment_kinetics.advection.setup_advection","text":"create arrays needed to compute the advection term(s) for a 1D problem\n\n\n\n\n\n","category":"method"},{"location":"zz_advection/#moment_kinetics.advection.setup_advection_per_species-Tuple","page":"advection","title":"moment_kinetics.advection.setup_advection_per_species","text":"create arrays needed to compute the advection term(s)\n\n\n\n\n\n","category":"method"},{"location":"zz_advection/#moment_kinetics.advection.update_advection_factor!-NTuple{4, Any}","page":"advection","title":"moment_kinetics.advection.update_advection_factor!","text":"calculate the factor appearing in front of f' in the advection term at time level n in the frame moving with the approximate characteristic\n\n\n\n\n\n","category":"method"},{"location":"zz_advection/#moment_kinetics.advection.update_f!-Tuple{Any, Any, Any}","page":"advection","title":"moment_kinetics.advection.update_f!","text":"\n\n\n\n","category":"method"},{"location":"zz_advection/#moment_kinetics.advection.update_rhs!-NTuple{8, Any}","page":"advection","title":"moment_kinetics.advection.update_rhs!","text":"update the righthand side of the equation to account for 1d advection in this coordinate\n\n\n\n\n\n","category":"method"},{"location":"debugging-hints/#Debugging","page":"Debugging","title":"Debugging","text":"","category":"section"},{"location":"debugging-hints/#Shared-memory-parallelism","page":"Debugging","title":"Shared-memory parallelism","text":"","category":"section"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"For information on race conditions and debugging, see Shared memory debugging.","category":"page"},{"location":"debugging-hints/#Dumping-state-of-physics-variables","page":"Debugging","title":"Dumping state of physics variables","text":"","category":"section"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"There is a function moment_kinetics.file_io.debug_dump provided in the moment_kinetics.file_io module that can be inserted to save the distribution function, moments, etc. These can include a label so that if there are several 'dumps' within a timestep, they can be easily identified.","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"To use, first import the function","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"using ..file_io: debug_dump","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"then insert calls at the point where you want to save the variables, e.g.","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"debug_dump(f, density, upar, ppar, phi, t, istage=istage, label=\"foo\")","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"where f, density, upar, ppar, and phi are arrays and t is an mk_float. istage is an optional mk_int, and can be used to identify the stage in the ssp_rk!() function. label is optional and can be any string, intended to distinguish different calls to debug_dump().","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"There is an alternative method (implementation) of the function that takes moment_kinetics.moment_kinetics_structs.scratch_pdf and moment_kinetics.moment_kinetics_structs.em_fields_struct arguments. This can be convenient within the functions in moment_kinetics.time_advance, e.g.","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"debug_dump(fvec_out, fields, t, istage=istage, label=\"bar\")","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"Any of the positional arguments can be replaced by nothing if they are not available in a certain place, or just not needed. If nothing is passed, then arrays filled with 0.0 are written into the output.","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"The output is written into a NetCDF file debug_output.cdf in the current directory (the filename is currently hard-coded because that was simpler than adding more command line arguments, etc.).","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"For debugging, a script util/compare_debug_files.jl is provided to compare two output files, assumed to have similar structure (i.e. the same set of debug_dump() calls). An example workflow could be:","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"Checkout master branch.\nCreate new branch, git checkout -b newfeature.\nWork on newfeature...\nAt some point, a bug is introduced which breaks some test or example - i.e. changes its output. Commit the current state of the code.\nAdd debug_dump() calls before and after locations where the bug is likely to be.\nRun the broken case.\nmv debug_output.cdf debug_after.cdf, so the file does not get overwritten.\ngit stash to 'save' the debug_dump() statements.\ngit checkout a commit where the test/example was working.\ngit stash pop to add the debug_dump() statements on top of the working commit (fingers crossed there are no merge conflicts).\nRun the test example again.\nmv debug_output.cdf debug_before.cdf\nRun the comparison script julia util/compare_debug_files.jl debug_before.cdf debug_after.cdf\nThe script identifies the first point (by t, istage and label) where any variable in the two output files has a maximum difference that is larger than some very tight (1.e-14) absolute and relative tolerances, and reports which variables were different and their maximum difference.","category":"page"},{"location":"zz_file_io/#file_io","page":"file_io","title":"file_io","text":"","category":"section"},{"location":"zz_file_io/","page":"file_io","title":"file_io","text":"Modules = [moment_kinetics.file_io]","category":"page"},{"location":"zz_file_io/#moment_kinetics.file_io","page":"file_io","title":"moment_kinetics.file_io","text":"\n\n\n\n","category":"module"},{"location":"zz_file_io/#moment_kinetics.file_io.debug_output_counter","page":"file_io","title":"moment_kinetics.file_io.debug_output_counter","text":"Global counter for calls to debug_dump\n\n\n\n\n\n","category":"constant"},{"location":"zz_file_io/#moment_kinetics.file_io.debug_output_file","page":"file_io","title":"moment_kinetics.file_io.debug_output_file","text":"An nc_info instance that may be initialised for writing debug output\n\nThis is a non-const module variable, so does cause type instability, but it is only used for debugging (from debug_dump()) so performance is not critical.\n\n\n\n\n\n","category":"constant"},{"location":"zz_file_io/#moment_kinetics.file_io.ascii_ios","page":"file_io","title":"moment_kinetics.file_io.ascii_ios","text":"structure containing the various input/output streams\n\n\n\n\n\n","category":"type"},{"location":"zz_file_io/#moment_kinetics.file_io.io_dfns_info","page":"file_io","title":"moment_kinetics.file_io.io_dfns_info","text":"structure containing the data/metadata needed for binary file i/o distribution function data only\n\n\n\n\n\n","category":"type"},{"location":"zz_file_io/#moment_kinetics.file_io.io_initial_electron_info","page":"file_io","title":"moment_kinetics.file_io.io_initial_electron_info","text":"structure containing the data/metadata needed for binary file i/o for electron initialization\n\n\n\n\n\n","category":"type"},{"location":"zz_file_io/#moment_kinetics.file_io.io_input_struct","page":"file_io","title":"moment_kinetics.file_io.io_input_struct","text":"Container for I/O settings\n\n\n\n\n\n","category":"type"},{"location":"zz_file_io/#moment_kinetics.file_io.io_moments_info","page":"file_io","title":"moment_kinetics.file_io.io_moments_info","text":"structure containing the data/metadata needed for binary file i/o moments & fields only\n\n\n\n\n\n","category":"type"},{"location":"zz_file_io/#moment_kinetics.file_io.add_attribute!","page":"file_io","title":"moment_kinetics.file_io.add_attribute!","text":"Add an attribute to a file, group or variable\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.append_to_dynamic_var","page":"file_io","title":"moment_kinetics.file_io.append_to_dynamic_var","text":"append_to_dynamic_var(io_var, data, t_idx, parallel_io, coords...; only_root=false)\n\nAppend data to the dynamic variable io_var. The time-index of the data being appended is t_idx. parallel_io indicates whether parallel I/O is being used. coords... is used to get the ranges to write from/to (needed for parallel I/O) - the entries in the coords tuple can be either coordinate instances or integers (for an integer n the range is 1:n).\n\nIf only_root=true is passed, the data is only written once - from the global root process if parallel I/O is being used (if parallel I/O is not used, this has no effect as each file is only written by one process).\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.check_io_implementation-Tuple{Any}","page":"file_io","title":"moment_kinetics.file_io.check_io_implementation","text":"check_io_implementation(binary_format)\n\nCheck that an implementation is available for binary_format, raising an error if not.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.create_dynamic_variable!","page":"file_io","title":"moment_kinetics.file_io.create_dynamic_variable!","text":"create_dynamic_variable!(file_or_group, name, type,\n coords::{coordinate,NamedTuple}...;\n description=nothing, units=nothing)\n\nCreate a time-evolving variable in file_or_group named name of type type. coords are the coordinates corresponding to the dimensions of the array, in the order of the array dimensions - they may be either coordinate structs or NamedTuples that contain at least the fields name, n. The species dimension does not have a coordinate, so the number of species is passed as nspecies. A description and/or units can be added with the keyword arguments.\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.debug_dump","page":"file_io","title":"moment_kinetics.file_io.debug_dump","text":"debug_dump(ff, dens, upar, ppar, phi, t; istage=0, label=\"\")\ndebug_dump(fvec::scratch_pdf, fields::em_fields_struct, t; istage=0, label=\"\")\n\nDump variables into a NetCDF file for debugging\n\nIntended to be called more frequently than write_data_to_binary(), possibly several times within a timestep, so includes a label argument to identify the call site.\n\nWrites to a file called debug_output.h5 in the current directory.\n\nCan either be called directly with the arrays to be dumped (fist signature), or using scratch_pdf and em_fields_struct structs.\n\nnothing can be passed to any of the positional arguments (if they are unavailable at a certain point in the code, or just not interesting). t=nothing will set t to the value saved in the previous call (or 0.0 on the first call). Passing nothing to the other arguments will set that array to 0.0 for this call (need to write some value so all the arrays have the same length, with an entry for each call to debug_dump()).\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.define_dynamic_dfn_variables!-NTuple{16, Any}","page":"file_io","title":"moment_kinetics.file_io.define_dynamic_dfn_variables!","text":"define dynamic (time-evolving) distribution function variables for writing to the output file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_dynamic_electron_moment_variables!-Tuple{Any, moment_kinetics.coordinates.coordinate, moment_kinetics.coordinates.coordinate, Vararg{Any, 9}}","page":"file_io","title":"moment_kinetics.file_io.define_dynamic_electron_moment_variables!","text":"define dynamic (time-evolving) electron moment variables for writing to the hdf5 file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_dynamic_em_field_variables!-Tuple{Any, moment_kinetics.coordinates.coordinate, moment_kinetics.coordinates.coordinate, Any}","page":"file_io","title":"moment_kinetics.file_io.define_dynamic_em_field_variables!","text":"define dynamic (time-evolving) electromagnetic field variables for writing to the hdf5 file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_dynamic_ion_moment_variables!-Tuple{Any, Any, moment_kinetics.coordinates.coordinate, moment_kinetics.coordinates.coordinate, Vararg{Any, 7}}","page":"file_io","title":"moment_kinetics.file_io.define_dynamic_ion_moment_variables!","text":"define dynamic (time-evolving) ion moment variables for writing to the hdf5 file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_dynamic_moment_variables!-Tuple{Any, Any, Any, moment_kinetics.coordinates.coordinate, moment_kinetics.coordinates.coordinate, Vararg{Any, 8}}","page":"file_io","title":"moment_kinetics.file_io.define_dynamic_moment_variables!","text":"define dynamic (time-evolving) moment variables for writing to the hdf5 file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_dynamic_neutral_moment_variables!-Tuple{Any, Any, moment_kinetics.coordinates.coordinate, moment_kinetics.coordinates.coordinate, Vararg{Any, 7}}","page":"file_io","title":"moment_kinetics.file_io.define_dynamic_neutral_moment_variables!","text":"define dynamic (time-evolving) neutral moment variables for writing to the hdf5 file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_io_coordinate!-NTuple{5, Any}","page":"file_io","title":"moment_kinetics.file_io.define_io_coordinate!","text":"define a sub-group for each code coordinate and write to output file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_io_coordinates!-NTuple{9, Any}","page":"file_io","title":"moment_kinetics.file_io.define_io_coordinates!","text":"Define coords group for coordinate information in the output file and write information about spatial and velocity space coordinate grids\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.finish_electron_io-Tuple{Union{Nothing, Bool, Tuple, moment_kinetics.file_io.io_initial_electron_info}}","page":"file_io","title":"moment_kinetics.file_io.finish_electron_io","text":"close output files for electron initialization\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.finish_file_io-Tuple{Union{Nothing, moment_kinetics.file_io.ascii_ios}, Union{Nothing, Tuple, moment_kinetics.file_io.io_moments_info}, Union{Nothing, Tuple, moment_kinetics.file_io.io_dfns_info}}","page":"file_io","title":"moment_kinetics.file_io.finish_file_io","text":"close all opened output files\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.get_electron_io_info-Tuple{Any, Any}","page":"file_io","title":"moment_kinetics.file_io.get_electron_io_info","text":"Get the file_info for an existing electron I/O file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.get_group","page":"file_io","title":"moment_kinetics.file_io.get_group","text":"Get a (sub-)group from a file or group\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.get_subgroup_keys","page":"file_io","title":"moment_kinetics.file_io.get_subgroup_keys","text":"Get names of all subgroups\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.get_variable_keys","page":"file_io","title":"moment_kinetics.file_io.get_variable_keys","text":"Get names of all variables\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.hdf5_get_dynamic_dim_sizes-Tuple{Any, Any}","page":"file_io","title":"moment_kinetics.file_io.hdf5_get_dynamic_dim_sizes","text":"given a tuple, fixed_coords, containing all dimensions except the time dimension, get the dimension sizes and chunk sizes\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.hdf5_get_fixed_dim_sizes-Tuple{Any, Any}","page":"file_io","title":"moment_kinetics.file_io.hdf5_get_fixed_dim_sizes","text":"Get sizes of fixed dimensions and chunks (i.e. everything but time) for I/O\n\ncoords should be a tuple whose elements are coordinate structs or integers (e.g. number of species).\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.input_option_error-Tuple{Any, Any}","page":"file_io","title":"moment_kinetics.file_io.input_option_error","text":"accepts an option name which has been identified as problematic and returns an appropriate error message\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.io_has_parallel","page":"file_io","title":"moment_kinetics.file_io.io_has_parallel","text":"io_has_parallel(Val(binary_format))\n\nTest if the backend supports parallel I/O.\n\nbinary_format should be one of the values of the binary_format_type enum\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.is_group","page":"file_io","title":"moment_kinetics.file_io.is_group","text":"Test if a member of a (sub-)group is a group\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.modify_attribute!","page":"file_io","title":"moment_kinetics.file_io.modify_attribute!","text":"Modify an attribute to a file, group or variable\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.open_ascii_output_file-Tuple{Any, Any}","page":"file_io","title":"moment_kinetics.file_io.open_ascii_output_file","text":"opens an output file with the requested prefix and extension and returns the corresponding io stream (identifier)\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.open_output_file-Tuple{Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.open_output_file","text":"Open an output file, selecting the backend based on io_option\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.open_output_file_implementation","page":"file_io","title":"moment_kinetics.file_io.open_output_file_implementation","text":"Low-level function to open a binary output file\n\nEach implementation (HDF5, NetCDF, etc.) defines a method of this function to open a file of the corresponding type.\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.reopen_dfns_io-Tuple{Any}","page":"file_io","title":"moment_kinetics.file_io.reopen_dfns_io","text":"Reopen an existing distribution-functions output file to append more data\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.reopen_initial_electron_io-Tuple{Any}","page":"file_io","title":"moment_kinetics.file_io.reopen_initial_electron_io","text":"Reopen an existing initial electron output file to append more data\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.reopen_moments_io-Tuple{Any}","page":"file_io","title":"moment_kinetics.file_io.reopen_moments_io","text":"Reopen an existing moments output file to append more data\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.reopen_output_file-Tuple{Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.reopen_output_file","text":"Re-open an existing output file, selecting the backend based on io_option\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.setup_dfns_io-NTuple{24, Any}","page":"file_io","title":"moment_kinetics.file_io.setup_dfns_io","text":"setup file i/o for distribution function variables\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.setup_electron_io-NTuple{16, Any}","page":"file_io","title":"moment_kinetics.file_io.setup_electron_io","text":"open output file to save the initial electron pressure and distribution function\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.setup_file_io-NTuple{21, Any}","page":"file_io","title":"moment_kinetics.file_io.setup_file_io","text":"open the necessary output files\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.setup_io_input-Tuple{Any, Any}","page":"file_io","title":"moment_kinetics.file_io.setup_io_input","text":"Read the settings for I/O\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.setup_moments_io-NTuple{23, Any}","page":"file_io","title":"moment_kinetics.file_io.setup_moments_io","text":"setup file i/o for moment variables\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_Dict_to_section-Tuple{Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.write_Dict_to_section","text":"write_Dict_to_section(section_io, section_dict, parallel_io)\n\nWrite the contents of section_dict into the I/O group section_io.\n\nAny nested Dicts in section_dict are written to subsections.\n\nAll the keys in section_dict (and any nested Dicts) should be Strings.\n\nparallel_io is a Bool indicating whether parallel I/O is being used.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_all_dfns_data_to_binary-NTuple{18, Any}","page":"file_io","title":"moment_kinetics.file_io.write_all_dfns_data_to_binary","text":"write time-dependent distribution function data for ions, electrons and neutrals to the binary output file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_all_moments_data_to_binary-NTuple{12, Any}","page":"file_io","title":"moment_kinetics.file_io.write_all_moments_data_to_binary","text":"write time-dependent moments data for ions, electrons and neutrals to the binary output file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_boundary_distributions!-NTuple{10, Any}","page":"file_io","title":"moment_kinetics.file_io.write_boundary_distributions!","text":"Write the distributions that may be used for boundary conditions to the output file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_data_to_ascii-Tuple{Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Union{Nothing, moment_kinetics.file_io.ascii_ios}}","page":"file_io","title":"moment_kinetics.file_io.write_data_to_ascii","text":"\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_electron_dfns_data_to_binary-Tuple{Any, Any, Union{moment_kinetics.file_io.io_dfns_info, moment_kinetics.file_io.io_initial_electron_info}, Vararg{Any, 5}}","page":"file_io","title":"moment_kinetics.file_io.write_electron_dfns_data_to_binary","text":"write time-dependent distribution function data for electrons to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_electron_moments_data_to_binary-Tuple{Any, Any, Any, Any, Union{moment_kinetics.file_io.io_initial_electron_info, moment_kinetics.file_io.io_moments_info}, Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.write_electron_moments_data_to_binary","text":"write time-dependent moments data for electrons to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_electron_state-NTuple{9, Any}","page":"file_io","title":"moment_kinetics.file_io.write_electron_state","text":"write_electron_state(scratch_electron, moments, t_params, io_initial_electron,\n t_idx, r, z, vperp, vpa; pdf_electron_converged=false)\n\nWrite the electron state to an output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_em_fields_data_to_binary-Tuple{Any, moment_kinetics.file_io.io_moments_info, Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.write_em_fields_data_to_binary","text":"write time-dependent EM fields data to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_f_ascii-NTuple{5, Any}","page":"file_io","title":"moment_kinetics.file_io.write_f_ascii","text":"write the function f(z,vpa) at this time slice\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_fields_ascii-NTuple{5, Any}","page":"file_io","title":"moment_kinetics.file_io.write_fields_ascii","text":"write electrostatic potential at this time slice\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_input!-Tuple{Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.write_input!","text":"Save info from the dict with input settings to the output file\n\nNote: assumes all keys in input_dict are strings.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_ion_dfns_data_to_binary-Tuple{Any, Any, Any, moment_kinetics.file_io.io_dfns_info, Vararg{Any, 5}}","page":"file_io","title":"moment_kinetics.file_io.write_ion_dfns_data_to_binary","text":"write time-dependent distribution function data for ions to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_ion_moments_data_to_binary-Tuple{Any, Any, Any, Any, moment_kinetics.file_io.io_moments_info, Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.write_ion_moments_data_to_binary","text":"write time-dependent moments data for ions to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_moments_electron_ascii-NTuple{5, Any}","page":"file_io","title":"moment_kinetics.file_io.write_moments_electron_ascii","text":"write moments of the ion species distribution function f at this time slice\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_moments_ion_ascii-NTuple{6, Any}","page":"file_io","title":"moment_kinetics.file_io.write_moments_ion_ascii","text":"write moments of the ion species distribution function f at this time slice\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_moments_neutral_ascii-NTuple{6, Any}","page":"file_io","title":"moment_kinetics.file_io.write_moments_neutral_ascii","text":"write moments of the neutral species distribution function f_neutral at this time slice\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_neutral_dfns_data_to_binary-Tuple{Any, Any, Any, moment_kinetics.file_io.io_dfns_info, Vararg{Any, 6}}","page":"file_io","title":"moment_kinetics.file_io.write_neutral_dfns_data_to_binary","text":"write time-dependent distribution function data for neutrals to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_neutral_moments_data_to_binary-Tuple{Any, Any, Any, Any, moment_kinetics.file_io.io_moments_info, Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.write_neutral_moments_data_to_binary","text":"write time-dependent moments data for neutrals to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_overview!-NTuple{8, Any}","page":"file_io","title":"moment_kinetics.file_io.write_overview!","text":"write some overview information for the simulation to the binary file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_provenance_tracking_info!-NTuple{6, Any}","page":"file_io","title":"moment_kinetics.file_io.write_provenance_tracking_info!","text":"Write provenance tracking information, to allow runs to be reproduced.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_single_value!","page":"file_io","title":"moment_kinetics.file_io.write_single_value!","text":"write_single_value!(file_or_group, name,\n data::Union{Number, AbstractString, AbstractArray{T,N}},\n coords::Union{coordinate,mk_int,NamedTuple}...; parallel_io,\n description=nothing, units=nothing) where {T,N}\n\nWrite a single variable to a file or group. If a description or units are passed, add as attributes of the variable.\n\n\n\n\n\n","category":"function"},{"location":"zz_velocity_moments/#velocity_moments","page":"velocity_moments","title":"velocity_moments","text":"","category":"section"},{"location":"zz_velocity_moments/","page":"velocity_moments","title":"velocity_moments","text":"Modules = [moment_kinetics.velocity_moments]","category":"page"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments","page":"velocity_moments","title":"moment_kinetics.velocity_moments","text":"\n\n\n\n","category":"module"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.calculate_electron_moment_derivatives!-NTuple{7, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.calculate_electron_moment_derivatives!","text":"Pre-calculate spatial derivatives of the electron moments that will be needed for the time advance\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.calculate_electron_moment_derivatives_no_r!-NTuple{7, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.calculate_electron_moment_derivatives_no_r!","text":"Calculate spatial derivatives of the electron moments.\n\nThis version, for use in implicit solvers for electrons, works with a single point in r, given by ir.\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.calculate_ion_moment_derivatives!-NTuple{6, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.calculate_ion_moment_derivatives!","text":"Pre-calculate spatial derivatives of the moments that will be needed for the time advance\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.calculate_neutral_moment_derivatives!-NTuple{6, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.calculate_neutral_moment_derivatives!","text":"Pre-calculate spatial derivatives of the neutral moments that will be needed for the time advance\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.create_moments_electron-NTuple{5, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.create_moments_electron","text":"create a moment struct containing information about the electron moments\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.create_moments_ion-NTuple{8, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.create_moments_ion","text":"\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.get_pressure-Tuple{Float64, Float64}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.get_pressure","text":"compute the isotropic pressure from the already computed ppar and pperp\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.integrate_over_negative_vpa-NTuple{6, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.integrate_over_negative_vpa","text":"computes the integral over vpa <= 0 of the integrand, using the input vpa_wgts this could be made more efficient for the case that dz/dt = vpa is time-independent, but it has been left general for the cases where, e.g., dz/dt = wpa*vth + upar varies in time\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.integrate_over_positive_vpa-NTuple{6, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.integrate_over_positive_vpa","text":"computes the integral over vpa >= 0 of the integrand, using the input vpa_wgts this could be made more efficient for the case that dz/dt = vpa is time-independent, but it has been left general for the cases where, e.g., dz/dt = wpa*vth + upar varies in time\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.integrate_over_vspace-Tuple","page":"velocity_moments","title":"moment_kinetics.velocity_moments.integrate_over_vspace","text":"computes the integral over vpa of the integrand, using the input vpa_wgts\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.reset_moments_status!-Tuple{Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.reset_moments_status!","text":"\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_chodura_integral_species!-NTuple{14, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_chodura_integral_species!","text":"compute the integral needed for the generalised Chodura condition\n\nIChodura = (Z^2 vBohm^2 / cref^2) * int ( f bz^2 / vz^2 + dfdr*rhostar/vz ) vBohm = sqrt(Z Te/mi) with Z = 1 and mref = mi cref = sqrt(2Ti/mi) and normalise to the local ion density, appropriate to assessing the Chodura condition \n\nIChodura <= (Te/e)d ne / dphi |(sheath entrance) = ni\n\nto a single species plasma with Z = 1\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_density!-NTuple{8, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_density!","text":"NB: if this function is called and if dens_updated is false, then the incoming pdf is the un-normalized pdf that satisfies int dv pdf = density\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_density_species!-NTuple{6, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_density_species!","text":"calculate the updated density (dens) for a given species; should only be called when evolvedensity = false, in which case the vpa coordinate is vpa/cs\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_derived_moments!-NTuple{13, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_derived_moments!","text":"update velocity moments that are calculable from the evolved ion pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_derived_moments_neutral!-NTuple{8, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_derived_moments_neutral!","text":"update velocity moments that are calculable from the evolved neutral pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_moments!-Tuple{Any, Any, moment_kinetics.gyroaverages.gyro_operators, Vararg{Any, 9}}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_moments!","text":"calculate the updated density (dens) and parallel pressure (ppar) for all species this function is only used once after initialisation the function used to update moments at run time is updatederivedmoments! in time_advance.jl\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_moments_neutral!-NTuple{8, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_moments_neutral!","text":"update velocity moments of the evolved neutral pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_density!-NTuple{9, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_density!","text":"calculate the neutral density from the neutral pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_density_species!-NTuple{7, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_density_species!","text":"calculate the updated density (dens) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_pr_species!-NTuple{7, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_pr_species!","text":"calculate the updated pressure in the rr direction (pr) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_pz_species!-NTuple{11, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_pz_species!","text":"calculate the updated pressure in zz direction (pz) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_pzeta_species!-NTuple{7, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_pzeta_species!","text":"calculate the updated pressure in the zeta zeta direction (pzeta) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_qz_species!-NTuple{13, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_qz_species!","text":"calculate the updated heat flux zzz direction (qz) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_ur_species!-NTuple{8, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_ur_species!","text":"calculate the updated ur (mean velocity in r) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_uz_species!-NTuple{11, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_uz_species!","text":"calculate the updated uz (mean velocity in z) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_uzeta_species!-NTuple{8, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_uzeta_species!","text":"calculate the updated uzeta (mean velocity in zeta) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_ppar!-NTuple{12, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_ppar!","text":"NB: if this function is called and if ppar_updated is false, then the incoming pdf is the un-normalized pdf that satisfies int dv pdf = density\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_ppar_species!-NTuple{10, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_ppar_species!","text":"calculate the updated energy density (or parallel pressure, ppar) for a given species; which of these is calculated depends on the definition of the vpa coordinate\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_pperp_species!-NTuple{6, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_pperp_species!","text":"calculate the updated perpendicular pressure (pperp) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_qpar!-NTuple{14, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_qpar!","text":"NB: the incoming pdf is the normalized pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_qpar_species!-NTuple{12, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_qpar_species!","text":"calculate the updated parallel heat flux (qpar) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_upar!-NTuple{12, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_upar!","text":"NB: if this function is called and if upar_updated is false, then the incoming pdf is the un-normalized pdf that satisfies int dv pdf = density\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_upar_species!-NTuple{10, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_upar_species!","text":"calculate the updated parallel flow (upar) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#coordinates","page":"coordinates","title":"coordinates","text":"","category":"section"},{"location":"zz_coordinates/","page":"coordinates","title":"coordinates","text":"Modules = [moment_kinetics.coordinates]","category":"page"},{"location":"zz_coordinates/#moment_kinetics.coordinates","page":"coordinates","title":"moment_kinetics.coordinates","text":"\n\n\n\n","category":"module"},{"location":"zz_coordinates/#moment_kinetics.coordinates.coordinate","page":"coordinates","title":"moment_kinetics.coordinates.coordinate","text":"structure containing basic information related to coordinates\n\n\n\n\n\n","category":"type"},{"location":"zz_coordinates/#moment_kinetics.coordinates.define_coordinate","page":"coordinates","title":"moment_kinetics.coordinates.define_coordinate","text":"define_coordinate(input_dict, name; parallel_io::Bool=false,\n run_directory=nothing, ignore_MPI=false,\n collision_operator_dim::Bool=true)\ndefine_coordinate(coord_input::NamedTuple; parallel_io::Bool=false,\n run_directory=nothing, ignore_MPI=false,\n collision_operator_dim::Bool=true, irank=0, nrank=1,\n comm=MPI.COMM_NULL)\n\nCreate arrays associated with a given coordinate, setup the coordinate grid, and populate the coordinate structure containing all of this information.\n\nWhen input_dict is passed, any missing settings will be set with default values.\n\nWhen coord_input is passed, it should be a NamedTuple as generated by get_coordinate_input, which contains a field for every coordinate input option.\n\n\n\n\n\n","category":"function"},{"location":"zz_coordinates/#moment_kinetics.coordinates.define_test_coordinate","page":"coordinates","title":"moment_kinetics.coordinates.define_test_coordinate","text":"define_test_coordinate(input_dict::AbstractDict; kwargs...)\ndefine_test_coordinate(name; collision_operator_dim=true, kwargs...)\n\nWrapper for define_coordinate() to make creating a coordinate for tests slightly less verbose.\n\nWhen passing input_dict, it must contain a \"name\" field, and can contain other settings\n\n\"ngrid\", \"nelement\", etc. Options other than \"name\" will be set using defaults if they\n\nare not passed. kwargs are the keyword arguments for define_coordinate.\n\nThe 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.\n\n\n\n\n\n","category":"function"},{"location":"zz_coordinates/#moment_kinetics.coordinates.elemental_to_full_grid_map-Tuple{Any, Any}","page":"coordinates","title":"moment_kinetics.coordinates.elemental_to_full_grid_map","text":"returns imin and imax, which contain the minimum and maximum indices on the full grid for each element\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#moment_kinetics.coordinates.equally_spaced_grid-NTuple{4, Any}","page":"coordinates","title":"moment_kinetics.coordinates.equally_spaced_grid","text":"setup an equally spaced grid with n_global grid points between [-L/2,L/2]\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#moment_kinetics.coordinates.equally_spaced_grid_shifted-NTuple{4, Any}","page":"coordinates","title":"moment_kinetics.coordinates.equally_spaced_grid_shifted","text":"setup an equally spaced grid with n_global grid points between [0,L]\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#moment_kinetics.coordinates.full_to_elemental_grid_map-Tuple{Any, Any, Any}","page":"coordinates","title":"moment_kinetics.coordinates.full_to_elemental_grid_map","text":"setup arrays containing a map from the unpacked grid point indices to the element index and the grid point index within each element\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#moment_kinetics.coordinates.get_coordinate_input-Tuple{Any, Any}","page":"coordinates","title":"moment_kinetics.coordinates.get_coordinate_input","text":"get_coordinate_input(input_dict, name)\n\nRead the input for coordinate name from input_dict, setting defaults, etc.\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#moment_kinetics.coordinates.grid_spacing-Tuple{Any, Any}","page":"coordinates","title":"moment_kinetics.coordinates.grid_spacing","text":"given a set of grid point locations calculate and return the length associated with the cell between adjacent grid points\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#moment_kinetics.coordinates.init_grid-NTuple{13, Any}","page":"coordinates","title":"moment_kinetics.coordinates.init_grid","text":"setup a grid with n_global grid points on the interval [-L/2,L/2]\n\n\n\n\n\n","category":"method"},{"location":"zz_type_definitions/#type_definitions","page":"type_definitions","title":"type_definitions","text":"","category":"section"},{"location":"zz_type_definitions/","page":"type_definitions","title":"type_definitions","text":"Modules = [moment_kinetics.type_definitions]","category":"page"},{"location":"zz_type_definitions/#moment_kinetics.type_definitions","page":"type_definitions","title":"moment_kinetics.type_definitions","text":"\n\n\n\n","category":"module"},{"location":"zz_type_definitions/#moment_kinetics.type_definitions.OptionsDict","page":"type_definitions","title":"moment_kinetics.type_definitions.OptionsDict","text":"\n\n\n\n","category":"type"},{"location":"zz_type_definitions/#moment_kinetics.type_definitions.mk_float","page":"type_definitions","title":"moment_kinetics.type_definitions.mk_float","text":"\n\n\n\n","category":"type"},{"location":"zz_type_definitions/#moment_kinetics.type_definitions.mk_int","page":"type_definitions","title":"moment_kinetics.type_definitions.mk_int","text":"\n\n\n\n","category":"type"},{"location":"zz_communication/#communication","page":"communication","title":"communication","text":"","category":"section"},{"location":"zz_communication/","page":"communication","title":"communication","text":"Modules = [moment_kinetics.communication]","category":"page"},{"location":"zz_communication/#moment_kinetics.communication","page":"communication","title":"moment_kinetics.communication","text":"Communication functions and setup\n\nSplit the grid into 'blocks'. Each block can use shared memory (MPI shared memory arrays). At the moment only works with a single 'block' containing the whole grid - eventually add more MPI communication functions to communicate between blocks. A block should probably be a 'NUMA region' for maximum efficiency.\n\nNote: charge-exchange collisions loop over neutral species for each ion species. At the moment this loop is not parallelised (although it could be, by introducing some more loop ranges), as at the moment we only run with 1 ion species and 1 neutral species.\n\n\n\n\n\n","category":"module"},{"location":"zz_communication/#moment_kinetics.communication.anyv_isubblock_index","page":"communication","title":"moment_kinetics.communication.anyv_isubblock_index","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.anyv_nsubblocks_per_block","page":"communication","title":"moment_kinetics.communication.anyv_nsubblocks_per_block","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.anyv_subblock_rank","page":"communication","title":"moment_kinetics.communication.anyv_subblock_rank","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.anyv_subblock_size","page":"communication","title":"moment_kinetics.communication.anyv_subblock_size","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.block_rank","page":"communication","title":"moment_kinetics.communication.block_rank","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.block_size","page":"communication","title":"moment_kinetics.communication.block_size","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.comm_anyv_subblock","page":"communication","title":"moment_kinetics.communication.comm_anyv_subblock","text":"Communicator for the local velocity-space subset of a shared-memory block in a 'anyv' region\n\nThe 'anyv' region is used to parallelise the collision operator. See moment_kinetics.looping.get_best_anyv_split.\n\nMust use a Ref{MPI.Comm} to allow a non-const MPI.Comm to be stored. Need to actually assign to this and not just copy a pointer into the .val member because otherwise the MPI.Comm object created by MPI.Comm_split() would be deleted, which probably makes MPI.jl delete the communicator.\n\n\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.comm_block","page":"communication","title":"moment_kinetics.communication.comm_block","text":"Communicator connecting a shared-memory region\n\nMust use a Ref{MPI.Comm} to allow a non-const MPI.Comm to be stored. Need to actually assign to this and not just copy a pointer into the .val member because otherwise the MPI.Comm object created by MPI.Comm_split() would be deleted, which probably makes MPI.jl delete the communicator.\n\n\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.comm_inter_block","page":"communication","title":"moment_kinetics.communication.comm_inter_block","text":"Communicator connecting the root processes of each shared memory block\n\nMust use a Ref{MPI.Comm} to allow a non-const MPI.Comm to be stored. Need to actually assign to this and not just copy a pointer into the .val member because otherwise the MPI.Comm object created by MPI.Comm_split() would be deleted, which probably makes MPI.jl delete the communicator.\n\n\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.comm_world","page":"communication","title":"moment_kinetics.communication.comm_world","text":"Can use a const MPI.Comm for comm_world and just copy the pointer from MPI.COMM_WORLD because MPI.COMM_WORLD is never deleted, so pointer stays valid.\n\n\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.global_Win_store","page":"communication","title":"moment_kinetics.communication.global_Win_store","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.global_rank","page":"communication","title":"moment_kinetics.communication.global_rank","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.global_size","page":"communication","title":"moment_kinetics.communication.global_size","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.iblock_index","page":"communication","title":"moment_kinetics.communication.iblock_index","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.n_blocks","page":"communication","title":"moment_kinetics.communication.n_blocks","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.MPISharedArray","page":"communication","title":"moment_kinetics.communication.MPISharedArray","text":"Type used to declare a shared-memory array. When debugging is not active MPISharedArray is just an alias for Array, but when @debug_shared_array is activated, it is instead defined as an alias for DebugMPISharedArray.\n\n\n\n\n\n","category":"type"},{"location":"zz_communication/#moment_kinetics.communication.__init__-Tuple{}","page":"communication","title":"moment_kinetics.communication.__init__","text":"\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication._anyv_subblock_synchronize-Tuple{}","page":"communication","title":"moment_kinetics.communication._anyv_subblock_synchronize","text":"Call an MPI Barrier for all processors in an 'anyv' sub-block.\n\nThe 'anyv' region is used to parallelise the collision operator. See moment_kinetics.looping.get_best_anyv_split.\n\nUsed to synchronise processors that are working on the same shared-memory array(s) between operations, to avoid race conditions. Should be even cheaper than _block_synchronize because it only requires communication on a smaller communicator.\n\nNote: _anyv_subblock_synchronize() may be called different numbers of times on different sub-blocks, depending on how the species and spatial dimensions are split up. @debug_detect_redundant_block_synchronize is not implemented (yet?) for _anyv_subblock_synchronize().\n\n\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication._block_synchronize-Tuple{}","page":"communication","title":"moment_kinetics.communication._block_synchronize","text":"Call an MPI Barrier for all processors in a block.\n\nUsed to synchronise processors that are working on the same shared-memory array(s) between operations, to avoid race conditions. Should be (much) cheaper than a global MPI Barrier because it only requires communication within a single node.\n\nNote: some debugging code currently assumes that if blocksynchronize() is called on one block, it is called simultaneously on all blocks. It seems likely that this will always be true, but if it ever changes (i.e. different blocks doing totally different work), the debugging routines need to be updated.\n\n\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication.allocate_shared-Tuple{Any, Any}","page":"communication","title":"moment_kinetics.communication.allocate_shared","text":"Get a shared-memory array of mk_float (shared by all processes in a 'block')\n\nCreate a shared-memory array using MPI.Win_allocate_shared(). Pointer to the memory allocated is wrapped in a Julia array. Memory is not managed by the Julia array though. A reference to the MPI.Win needs to be freed - this is done by saving the MPI.Win into a Vector in the Communication module, which has all its entries freed by the finalize_comms!() function, which should be called when moment_kinetics is done running a simulation/test.\n\nArguments\n\ndims - mkint or Tuple{mkint} Dimensions of the array to be created. Dimensions passed define the size of the array which is being handled by the 'block' (rather than the global array, or a subset for a single process). comm - MPI.Comm, default comm_block[] MPI communicator containing the processes that share the array. maybe_debug - Bool Can be set to false to force not creating a DebugMPISharedArray when debugging is active. This avoids recursion when including a shared-memory array as a member of a DebugMPISharedArray for debugging purposes.\n\nReturns\n\nArray{mk_float}\n\n\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication.finalize_comms!-Tuple{}","page":"communication","title":"moment_kinetics.communication.finalize_comms!","text":"Clean up from communications\n\nDo any needed clean-up for MPI, etc. Does not call MPI.Finalize() - this is called anyway when Julia exits, and we do not want to call it explicitly so that multiple runs can be done in a single Julia session.\n\nFrees any shared-memory arrays.\n\n\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication.free_shared_arrays-Tuple{}","page":"communication","title":"moment_kinetics.communication.free_shared_arrays","text":"\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication.initialize_comms!-Tuple{}","page":"communication","title":"moment_kinetics.communication.initialize_comms!","text":"Set up communications\n\nCheck that global variables are in the correct state (i.e. caches were emptied correctly if they were used before).\n\nAlso does some set up for debugging routines, if they are active.\n\n\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication.setup_distributed_memory_MPI-NTuple{4, Any}","page":"communication","title":"moment_kinetics.communication.setup_distributed_memory_MPI","text":"Function to take information from user about r z grids and number of processes allocated to set up communicators notation definitions: - block: group of processes that share data with shared memory - z group: group of processes that need to communicate data for z derivatives - r group: group of processes that need to communicate data for r derivatives This routine assumes that the number of processes is selected by the user to match exactly the number the ratio \n\nnblocks = (rnelementglobal/rnelementlocal)*(znelementglobal/znelementlocal)\n\nThis guarantees perfect load balancing. Shared memory is used to parallelise the other dimensions within each distributed-memory parallelised rz block. \n\n\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication.setup_distributed_memory_MPI_for_weights_precomputation-NTuple{5, Any}","page":"communication","title":"moment_kinetics.communication.setup_distributed_memory_MPI_for_weights_precomputation","text":"Function to take information from user about vpa vperp grids and number of processes allocated to set up communicators for precomputation of the Rosenbluth potential integration weights notation definitions: - block: group of processes that share data with shared memory - vpa group: group of processes that need to communicate data for vpa derivatives/integrals - vperp group: group of processes that need to communicate data for vperp derivatives/integrals This routine assumes that the number of processes is selected by the user to match or be larger than the ratio \n\nnblocks = (vpanelementglobal/vpanelementlocal)*(vperpnelementglobal/vperpnelementlocal)\n\nWe also need to know (from user input) the maximum number of cores per shared memory region. A fraction of the cores will not contribute to the calculation, as we cannot guarantee that the same number of cores is required for the rz parallelisation as the vpa vperp parallelisation \n\n\n\n\n\n","category":"method"},{"location":"geometry/#Magnetic-Geometry","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"","category":"section"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"We take the magnetic field mathbfB to have the form ","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"beginequation\nmathbfB = B_z hatmathbfz + B_zeta hatmathbfzeta\nendequation","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"with B_zeta = B(rz) b_zeta, B_z = B(rz) b_z and b_z and b_zeta the direction cosines of the magnetic field vector. Here the basis vectors are those of cylindrical geometry (rzzeta), i.e., hatmathbfr = nabla r hatmathbfz = nabla z, and hatmathbfzeta = r nabla zeta. The unit vectors hatmathbfr, hatmathbfz, and hatmathbfzeta form a right-handed orthonormal basis.","category":"page"},{"location":"geometry/#Supported-options","page":"Magnetic Geometry","title":"Supported options","text":"","category":"section"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"To choose the type of geometry, set the value of \"option\" in the geometry namelist. The namelist will have the following appearance in the TOML file.","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"[geometry]\noption=\"constant-helical\" # ( or \"1D-mirror\" )\npitch = 1.0\nrhostar = 1.0\nDeltaB = 0.0","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"If rhostar is not set then it is computed from reference parameters.","category":"page"},{"location":"geometry/#[geometry]-option-\"constant-helical\"","page":"Magnetic Geometry","title":"[geometry] option = \"constant-helical\"","text":"","category":"section"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"Here b_zeta = sqrt1 - b_z^2 is a constant, b_z is a constant input parameter (\"pitch\") and B is taken to be 1 with respect to the reference value B_rm ref.","category":"page"},{"location":"geometry/#[geometry]-option-\"1D-mirror\"","page":"Magnetic Geometry","title":"[geometry] option = \"1D-mirror\"","text":"","category":"section"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"Here b_zeta = sqrt1 - b_z^2 is a constant, b_z is a constant input parameter (\"pitch\") and B = B(z) is taken to be the function ","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"beginequation\nfracB(z)B_rm ref = \n 1 + Delta B left( 2left(frac2zL_zright)^2 - left(frac2zL_zright)^4right)\nendequation","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"where Delta B is an input parameter (DeltaB) that must satisfy Delta B -1. Recalling that the coordinate z runs from z = -L_z2 to L_z2, if Delta B 0 than the field represents a magnetic mirror which traps particles, whereas if Delta B 0 then the magnetic field accelerates particles by the mirror force as they approach the wall. Note that this field does not satisfy nabla cdot mathbfB = 0, and is only used to test the implementation of the magnetic mirror terms. 2D simulations with a radial domain andmathbfEtimesmathbfB drifts are supported in the \"1D-mirror\" geometry option.","category":"page"},{"location":"geometry/#Geometric-coefficients","page":"Magnetic Geometry","title":"Geometric coefficients","text":"","category":"section"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"Here, we write the geometric coefficients appearing in the characteristic equations explicitly.","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"The z component of the mathbfEtimesmathbfB drift is given by","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"beginequation fracmathbfEtimesmathbfBB^2 cdot nabla z = fracE_r B_zetaB^2 nabla r times hatmathbfzeta cdot nabla z \n= - J fracE_r B_zetaB^2\nendequation","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"where we have defined J = r nabla r times nabla z cdot nabla zeta. Note that J is dimensionless. The r component of the mathbfEtimesmathbfB drift is given by","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"beginequation fracmathbfEtimesmathbfBB^2 cdot nabla r = fracE_z B_zetaB^2 nabla z times hatmathbfzeta cdot nabla r \n= J fracE_z B_zetaB^2\nendequation","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"Due to the axisymmetry of the system, the differential operator mathbfb cdot nabla (cdot) = b_z partial (cdot)partial z, and the convective derivative","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"beginequation\nfracd Bd t = fracd zd t fracpartial B partial z + fracdrdtfracpartial Bpartial r\nendequation","category":"page"},{"location":"zz_looping/#looping","page":"looping","title":"looping","text":"","category":"section"},{"location":"zz_looping/","page":"looping","title":"looping","text":"Modules = [moment_kinetics.looping]","category":"page"},{"location":"zz_looping/#moment_kinetics.looping","page":"looping","title":"moment_kinetics.looping","text":"Provides convenience macros for shared-memory-parallel loops\n\n\n\n\n\n","category":"module"},{"location":"zz_looping/#moment_kinetics.looping.loop_ranges","page":"looping","title":"moment_kinetics.looping.loop_ranges","text":"module variable that we can access by giving fully-qualified name in loop macros\n\n\n\n\n\n","category":"constant"},{"location":"zz_looping/#moment_kinetics.looping.loop_ranges_store","page":"looping","title":"moment_kinetics.looping.loop_ranges_store","text":"module variable used to store LoopRanges that are swapped into the loopranges variable in begin*_region() functions\n\n\n\n\n\n","category":"constant"},{"location":"zz_looping/#moment_kinetics.looping.LoopRanges","page":"looping","title":"moment_kinetics.looping.LoopRanges","text":"LoopRanges structs contain information on which points should be included on this process in loops over shared-memory arrays.\n\nMembers\n\nparalleldims::Tuple{Vararg{Symbol}} Indicates which dimensions are (or might be) parallelized when using this LoopRanges. Provided for information for developers, to make it easier to tell (when using a Debugger, or printing debug informatino) which LoopRanges instance is active in looping.loopranges at any point in the code. rank0::Bool Is this process the one with rank 0 in the 'block' which work in parallel on shared memory arrays. ::UnitRange{mkint} Loop ranges for each dimension in looping.alldimensions.\n\n\n\n\n\n","category":"type"},{"location":"zz_looping/#moment_kinetics.looping.begin_anyv_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_anyv_region","text":"Begin 'anyv' sub-region in which () velocity space dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_anyv_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_anyv_vpa_region","text":"Begin 'anyv' sub-region in which (:vpa,) velocity space dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_anyv_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_anyv_vperp_region","text":"Begin 'anyv' sub-region in which (:vperp,) velocity space dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_anyv_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_anyv_vperp_vpa_region","text":"Begin 'anyv' sub-region in which (:vperp, :vpa) velocity space dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_region","text":"Begin region in which (:r,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vpa_region","text":"Begin region in which (:r, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vperp_region","text":"Begin region in which (:r, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vperp_vpa_region","text":"Begin region in which (:r, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vr_region","text":"Begin region in which (:r, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vr_vz_region","text":"Begin region in which (:r, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vz_region","text":"Begin region in which (:r, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vzeta_region","text":"Begin region in which (:r, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vzeta_vr_region","text":"Begin region in which (:r, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vzeta_vr_vz_region","text":"Begin region in which (:r, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vzeta_vz_region","text":"Begin region in which (:r, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_region","text":"Begin region in which (:r, :z) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vpa_region","text":"Begin region in which (:r, :z, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vperp_region","text":"Begin region in which (:r, :z, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vperp_vpa_region","text":"Begin region in which (:r, :z, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vr_region","text":"Begin region in which (:r, :z, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vr_vz_region","text":"Begin region in which (:r, :z, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vz_region","text":"Begin region in which (:r, :z, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vzeta_region","text":"Begin region in which (:r, :z, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vzeta_vr_region","text":"Begin region in which (:r, :z, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vzeta_vr_vz_region","text":"Begin region in which (:r, :z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vzeta_vz_region","text":"Begin region in which (:r, :z, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_region","text":"Begin region in which (:s, :r) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_vpa_region","text":"Begin region in which (:s, :r, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_vperp_region","text":"Begin region in which (:s, :r, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_vperp_vpa_region","text":"Begin region in which (:s, :r, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_z_anyv_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_z_anyv_region","text":"Begin region in which (:s,:r,:z) dimensions and velocity dimensions are parallelized by being split between processes, and which velocity dimensions are parallelized can be switched within the outer loop over (:s,:r,:z). This parallelization scheme is intended for use in the collision operator.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_z_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_z_region","text":"Begin region in which (:s, :r, :z) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_z_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_z_vpa_region","text":"Begin region in which (:s, :r, :z, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_z_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_z_vperp_region","text":"Begin region in which (:s, :r, :z, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_z_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_z_vperp_vpa_region","text":"Begin region in which (:s, :r, :z, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_region","text":"Begin region in which (:s,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_vpa_region","text":"Begin region in which (:s, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_vperp_region","text":"Begin region in which (:s, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_vperp_vpa_region","text":"Begin region in which (:s, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_z_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_z_region","text":"Begin region in which (:s, :z) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_z_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_z_vpa_region","text":"Begin region in which (:s, :z, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_z_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_z_vperp_region","text":"Begin region in which (:s, :z, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_z_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_z_vperp_vpa_region","text":"Begin region in which (:s, :z, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_serial_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_serial_region","text":"Begin region in which only rank-0 in each group of processes operating on a shared-memory block operates on shared-memory arrays.\n\nReturns immediately if loopranges[] is already set for a serial region. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_region","text":"Begin region in which (:sn, :r) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vr_region","text":"Begin region in which (:sn, :r, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vr_vz_region","text":"Begin region in which (:sn, :r, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vz_region","text":"Begin region in which (:sn, :r, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vzeta_region","text":"Begin region in which (:sn, :r, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vzeta_vr_region","text":"Begin region in which (:sn, :r, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vzeta_vr_vz_region","text":"Begin region in which (:sn, :r, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vzeta_vz_region","text":"Begin region in which (:sn, :r, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_region","text":"Begin region in which (:sn, :r, :z) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vr_region","text":"Begin region in which (:sn, :r, :z, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vr_vz_region","text":"Begin region in which (:sn, :r, :z, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vz_region","text":"Begin region in which (:sn, :r, :z, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vzeta_region","text":"Begin region in which (:sn, :r, :z, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vzeta_vr_region","text":"Begin region in which (:sn, :r, :z, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vzeta_vr_vz_region","text":"Begin region in which (:sn, :r, :z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vzeta_vz_region","text":"Begin region in which (:sn, :r, :z, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_region","text":"Begin region in which (:sn,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vr_region","text":"Begin region in which (:sn, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vr_vz_region","text":"Begin region in which (:sn, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vz_region","text":"Begin region in which (:sn, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vzeta_region","text":"Begin region in which (:sn, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vzeta_vr_region","text":"Begin region in which (:sn, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vzeta_vr_vz_region","text":"Begin region in which (:sn, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vzeta_vz_region","text":"Begin region in which (:sn, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_region","text":"Begin region in which (:sn, :z) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vr_region","text":"Begin region in which (:sn, :z, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vr_vz_region","text":"Begin region in which (:sn, :z, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vz_region","text":"Begin region in which (:sn, :z, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vzeta_region","text":"Begin region in which (:sn, :z, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vzeta_vr_region","text":"Begin region in which (:sn, :z, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vzeta_vr_vz_region","text":"Begin region in which (:sn, :z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vzeta_vz_region","text":"Begin region in which (:sn, :z, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vpa_region","text":"Begin region in which (:vpa,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vperp_region","text":"Begin region in which (:vperp,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vperp_vpa_region","text":"Begin region in which (:vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vr_region","text":"Begin region in which (:vr,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vr_vz_region","text":"Begin region in which (:vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vz_region","text":"Begin region in which (:vz,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vzeta_region","text":"Begin region in which (:vzeta,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vzeta_vr_region","text":"Begin region in which (:vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vzeta_vr_vz_region","text":"Begin region in which (:vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vzeta_vz_region","text":"Begin region in which (:vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_region","text":"Begin region in which (:z,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vpa_region","text":"Begin region in which (:z, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vperp_region","text":"Begin region in which (:z, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vperp_vpa_region","text":"Begin region in which (:z, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vr_region","text":"Begin region in which (:z, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vr_vz_region","text":"Begin region in which (:z, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vz_region","text":"Begin region in which (:z, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vzeta_region","text":"Begin region in which (:z, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vzeta_vr_region","text":"Begin region in which (:z, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vzeta_vr_vz_region","text":"Begin region in which (:z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vzeta_vz_region","text":"Begin region in which (:z, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.debug_setup_loop_ranges_split_one_combination!-Tuple{Any, Any, Tuple{Vararg{Symbol, N}} where N, Vararg{Symbol}}","page":"looping","title":"moment_kinetics.looping.debug_setup_loop_ranges_split_one_combination!","text":"For debugging the shared-memory parallelism, create ranges where only the loops for a single combinations of variables (given by combination_to_split) are parallelised, and which dimensions are parallelised can be set with the dims_to_split... arguments.\n\nArguments\n\nKeyword arguments dim=n are required for each dim in all_dimensions where n is an integer giving the size of the dimension.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.dims_string-Tuple{Tuple}","page":"looping","title":"moment_kinetics.looping.dims_string","text":"Construct a string composed of the dimension names given in the Tuple dims, separated by underscores\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_anyv_ranges-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.get_anyv_ranges","text":"\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_best_anyv_split-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.get_best_anyv_split","text":"Find the numbers of processes for each dimension that optimize load balance for 'anyv' type loops for a certain block_size.\n\nThe 'anyv' parallelisation patterns are designed for use in the collision operator. They all share the same parallelisation in species and spatial dimensions so that the region type can be switched between 'anyv' types within a loop over species and spatial dimensions (@loopsr_z). It is only defined for ions, not for neutrals.\n\nParts of the collision operator cannot conveniently be parallelised over velocity dimensions, so this function aims to assign as much parallelism as possible to the species and spatial dimensions.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_best_ranges-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.get_best_ranges","text":"Find the ranges for loop variables that optimize load balance for a certain block_size\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_local_range-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.get_local_range","text":"Get local range of indices when splitting a loop over processes in a sub-block\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_max_work-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.get_max_work","text":"Calculate the maximum number of grid points on any process\n\nThis is a measure of the maximum amount of work to do on a single process. Minimising this will make the parallelisation as efficient as possible.\n\nArguments\n\nnprocslist : Vector{mkint} Number of processes for each dimension sizes : Vector{mk_int} Size of each dimension\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_ranges_from_split-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.get_ranges_from_split","text":"\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_splits-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.get_splits","text":"Find possible divisions of each number less than or equal to block_size into n factors.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_splits_and_max_work_from_sizes-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.get_splits_and_max_work_from_sizes","text":"\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_subblock_splits-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.get_subblock_splits","text":"Find possible divisions of subblocksize into n factors\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.setup_loop_ranges!-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.setup_loop_ranges!","text":"Create ranges for loops with different combinations of variables\n\nArguments\n\nKeyword arguments dim=n are required for each dim in [:s, :r, :z, :vperp, :vpa, :sn, :vzeta, :vr, :vz] where n is an integer giving the size of the dimension.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.@anyv_serial_region-Tuple{Any}","page":"looping","title":"moment_kinetics.looping.@anyv_serial_region","text":"Run a block of code on only anyv-subblock-rank-0 of each group of processes operating on an 'anyv' shared-memory subblock\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r","text":"Loop over (:r,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vpa-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vpa","text":"Loop over (:r, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vperp-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vperp","text":"Loop over (:r, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vperp_vpa-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vperp_vpa","text":"Loop over (:r, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vr-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vr","text":"Loop over (:r, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vr_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vr_vz","text":"Loop over (:r, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vz-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vz","text":"Loop over (:r, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vzeta-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vzeta","text":"Loop over (:r, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vzeta_vr-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vzeta_vr","text":"Loop over (:r, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vzeta_vr_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vzeta_vr_vz","text":"Loop over (:r, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vzeta_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vzeta_vz","text":"Loop over (:r, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z","text":"Loop over (:r, :z) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vpa-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vpa","text":"Loop over (:r, :z, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vperp-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vperp","text":"Loop over (:r, :z, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vperp_vpa-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vperp_vpa","text":"Loop over (:r, :z, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vr-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vr","text":"Loop over (:r, :z, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vr_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vr_vz","text":"Loop over (:r, :z, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vz","text":"Loop over (:r, :z, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vzeta-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vzeta","text":"Loop over (:r, :z, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vzeta_vr-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vzeta_vr","text":"Loop over (:r, :z, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vzeta_vr_vz-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vzeta_vr_vz","text":"Loop over (:r, :z, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vzeta_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vzeta_vz","text":"Loop over (:r, :z, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s","text":"Loop over (:s,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r","text":"Loop over (:s, :r) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_vpa-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_vpa","text":"Loop over (:s, :r, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_vperp-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_vperp","text":"Loop over (:s, :r, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_vperp_vpa-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_vperp_vpa","text":"Loop over (:s, :r, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_z-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_z","text":"Loop over (:s, :r, :z) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_z_vpa-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_z_vpa","text":"Loop over (:s, :r, :z, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_z_vperp-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_z_vperp","text":"Loop over (:s, :r, :z, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_z_vperp_vpa-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_z_vperp_vpa","text":"Loop over (:s, :r, :z, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_vpa-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_vpa","text":"Loop over (:s, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_vperp-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_vperp","text":"Loop over (:s, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_vperp_vpa-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_vperp_vpa","text":"Loop over (:s, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_z-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_z","text":"Loop over (:s, :z) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_z_vpa-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_z_vpa","text":"Loop over (:s, :z, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_z_vperp-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_z_vperp","text":"Loop over (:s, :z, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_z_vperp_vpa-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_z_vperp_vpa","text":"Loop over (:s, :z, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn","text":"Loop over (:sn,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r","text":"Loop over (:sn, :r) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vr-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vr","text":"Loop over (:sn, :r, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vr_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vr_vz","text":"Loop over (:sn, :r, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vz","text":"Loop over (:sn, :r, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vzeta-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vzeta","text":"Loop over (:sn, :r, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vzeta_vr-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vzeta_vr","text":"Loop over (:sn, :r, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vzeta_vr_vz-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vzeta_vr_vz","text":"Loop over (:sn, :r, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vzeta_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vzeta_vz","text":"Loop over (:sn, :r, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z","text":"Loop over (:sn, :r, :z) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vr-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vr","text":"Loop over (:sn, :r, :z, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vr_vz-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vr_vz","text":"Loop over (:sn, :r, :z, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vz","text":"Loop over (:sn, :r, :z, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vzeta-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vzeta","text":"Loop over (:sn, :r, :z, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vzeta_vr-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vzeta_vr","text":"Loop over (:sn, :r, :z, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vzeta_vr_vz-NTuple{7, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vzeta_vr_vz","text":"Loop over (:sn, :r, :z, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vzeta_vz-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vzeta_vz","text":"Loop over (:sn, :r, :z, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vr-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vr","text":"Loop over (:sn, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vr_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vr_vz","text":"Loop over (:sn, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vz-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vz","text":"Loop over (:sn, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vzeta-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vzeta","text":"Loop over (:sn, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vzeta_vr-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vzeta_vr","text":"Loop over (:sn, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vzeta_vr_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vzeta_vr_vz","text":"Loop over (:sn, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vzeta_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vzeta_vz","text":"Loop over (:sn, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z","text":"Loop over (:sn, :z) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vr-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vr","text":"Loop over (:sn, :z, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vr_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vr_vz","text":"Loop over (:sn, :z, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vz","text":"Loop over (:sn, :z, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vzeta-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vzeta","text":"Loop over (:sn, :z, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vzeta_vr-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vzeta_vr","text":"Loop over (:sn, :z, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vzeta_vr_vz-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vzeta_vr_vz","text":"Loop over (:sn, :z, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vzeta_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vzeta_vz","text":"Loop over (:sn, :z, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vpa-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vpa","text":"Loop over (:vpa,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vperp-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vperp","text":"Loop over (:vperp,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vperp_vpa-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vperp_vpa","text":"Loop over (:vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vr-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vr","text":"Loop over (:vr,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vr_vz-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vr_vz","text":"Loop over (:vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vz-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vz","text":"Loop over (:vz,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vzeta-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vzeta","text":"Loop over (:vzeta,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vzeta_vr-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vzeta_vr","text":"Loop over (:vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vzeta_vr_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vzeta_vr_vz","text":"Loop over (:vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vzeta_vz-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vzeta_vz","text":"Loop over (:vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z","text":"Loop over (:z,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vpa-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vpa","text":"Loop over (:z, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vperp-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vperp","text":"Loop over (:z, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vperp_vpa-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vperp_vpa","text":"Loop over (:z, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vr-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vr","text":"Loop over (:z, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vr_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vr_vz","text":"Loop over (:z, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vz-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vz","text":"Loop over (:z, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vzeta-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vzeta","text":"Loop over (:z, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vzeta_vr-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vzeta_vr","text":"Loop over (:z, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vzeta_vr_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vzeta_vr_vz","text":"Loop over (:z, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vzeta_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vzeta_vz","text":"Loop over (:z, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@serial_region-Tuple{Any}","page":"looping","title":"moment_kinetics.looping.@serial_region","text":"Run a block of code on only rank-0 of each group of processes operating on a shared-memory block\n\n\n\n\n\n","category":"macro"},{"location":"zz_geo/#geo","page":"geo","title":"geo","text":"","category":"section"},{"location":"zz_geo/","page":"geo","title":"geo","text":"Modules = [moment_kinetics.geo]","category":"page"},{"location":"zz_geo/#moment_kinetics.geo","page":"geo","title":"moment_kinetics.geo","text":"module for including axisymmetric geometry in coordinates (z,r), with z the vertical coordinate and r the radial coordinate\n\n\n\n\n\n","category":"module"},{"location":"zz_geo/#moment_kinetics.geo.geometric_coefficients","page":"geo","title":"moment_kinetics.geo.geometric_coefficients","text":"struct containing the geometric data necessary for non-trivial axisymmetric geometries, to be passed around the inside of the code, replacing the geometry_input struct from input_structs.jl\n\nThe arrays of 2 dimensions are functions of (z,r)\n\n\n\n\n\n","category":"type"},{"location":"zz_geo/#moment_kinetics.geo.get_default_rhostar-Tuple{Any}","page":"geo","title":"moment_kinetics.geo.get_default_rhostar","text":"function get_default_rhostar(reference_params)\n\nCalculate the normalised ion gyroradius at reference parameters\n\n\n\n\n\n","category":"method"},{"location":"zz_geo/#moment_kinetics.geo.init_magnetic_geometry-Tuple{moment_kinetics.input_structs.geometry_input, Any, Any}","page":"geo","title":"moment_kinetics.geo.init_magnetic_geometry","text":"function to initialise the geometry coefficients inputdata – geometryinput type z – coordinate type r – coordinate type\n\n\n\n\n\n","category":"method"},{"location":"zz_geo/#moment_kinetics.geo.setup_geometry_input-Tuple{Dict}","page":"geo","title":"moment_kinetics.geo.setup_geometry_input","text":"function to read the geometry input data from the TOML file\n\nthe TOML namelist should be structured like\n\n[geometry] pitch = 1.0 rhostar = 1.0 DeltaB = 0.0 option = \"\"\n\n\n\n\n\n","category":"method"},{"location":"zz_bgk/#bgk","page":"bgk","title":"bgk","text":"","category":"section"},{"location":"zz_bgk/","page":"bgk","title":"bgk","text":"Modules = [moment_kinetics.bgk]","category":"page"},{"location":"zz_bgk/#moment_kinetics.bgk","page":"bgk","title":"moment_kinetics.bgk","text":"\n\n\n\n","category":"module"},{"location":"zz_bgk/#moment_kinetics.bgk.allowed_wave_amplitude!-NTuple{5, Any}","page":"bgk","title":"moment_kinetics.bgk.allowed_wave_amplitude!","text":"\n\n\n\n","category":"method"},{"location":"zz_bgk/#moment_kinetics.bgk.init_bgk_pdf!-NTuple{6, Any}","page":"bgk","title":"moment_kinetics.bgk.init_bgk_pdf!","text":"\n\n\n\n","category":"method"},{"location":"zz_bgk/#moment_kinetics.bgk.passing_pdf!-NTuple{5, Any}","page":"bgk","title":"moment_kinetics.bgk.passing_pdf!","text":"inputs\n\npdf is the particle distribution function, with the passing part of phase space not filled in\nphi_max is the maximum value that e * phi / Te takes\ntau = Ti/Te is the ion-electron temperature ratio\nx = mvpa^2/2Te + ephi/Te is 1D array containing the total parallel energy (conserved)\n\noutput\n\npdf = particle distribution function; this function fills in the part of phase space where x > e*phi_max/T\n\n\n\n\n\n","category":"method"},{"location":"zz_bgk/#moment_kinetics.bgk.setup_dummy_integrals-Tuple{}","page":"bgk","title":"moment_kinetics.bgk.setup_dummy_integrals","text":"\n\n\n\n","category":"method"},{"location":"zz_bgk/#moment_kinetics.bgk.total_energy_grid-Tuple{Any, Any}","page":"bgk","title":"moment_kinetics.bgk.total_energy_grid","text":"inputs:\n\nvpa = parallel velocity normalized by vts = sqrt(2*Te/ms)\nphi = electrostatic potential normalized by Te/e\n\noutput: x = vpa^2 + phi is the total parallel energy\n\n\n\n\n\n","category":"method"},{"location":"zz_bgk/#moment_kinetics.bgk.trapped_passing_boundary-Tuple{Any, Any}","page":"bgk","title":"moment_kinetics.bgk.trapped_passing_boundary","text":"\n\n\n\n","category":"method"},{"location":"zz_bgk/#moment_kinetics.bgk.trapped_pdf!-NTuple{8, Any}","page":"bgk","title":"moment_kinetics.bgk.trapped_pdf!","text":"inputs\n\nphi_max is the maximum value that e * phi / Te takes\ntau = Ti/Te is the ion-electron temperature ratio\nx = vpa^2 + e*phi is a 2D array containing the total parallel energy on the (z,vpa) grid\ny = dummy coordinate for the necessary integrals in the function\nintegrand = dummy array used to hold integrands defined and integrated in this function\nwgts = integration weights associated with y integrals\n\noutput\n\npdf is the particle distribution function for all of phase space, with this function filling in only the part with x < e*phi_max/T\n\n\n\n\n\n","category":"method"},{"location":"zz_continuity/#continuity","page":"continuity","title":"continuity","text":"","category":"section"},{"location":"zz_continuity/","page":"continuity","title":"continuity","text":"Modules = [moment_kinetics.continuity]","category":"page"},{"location":"zz_continuity/#moment_kinetics.continuity","page":"continuity","title":"moment_kinetics.continuity","text":"\n\n\n\n","category":"module"},{"location":"zz_continuity/#moment_kinetics.continuity.continuity_equation!-NTuple{9, Any}","page":"continuity","title":"moment_kinetics.continuity.continuity_equation!","text":"use the continuity equation dn/dt + d(n*upar)/dz to update the density n for all ion species\n\n\n\n\n\n","category":"method"},{"location":"zz_continuity/#moment_kinetics.continuity.neutral_continuity_equation!-NTuple{9, Any}","page":"continuity","title":"moment_kinetics.continuity.neutral_continuity_equation!","text":"use the continuity equation dn/dt + d(n*upar)/dz to update the density n for all neutral species\n\n\n\n\n\n","category":"method"},{"location":"zz_debugging/#debugging","page":"debugging","title":"debugging","text":"","category":"section"},{"location":"zz_debugging/","page":"debugging","title":"debugging","text":"Modules = [moment_kinetics.debugging]","category":"page"},{"location":"zz_debugging/#moment_kinetics.debugging","page":"debugging","title":"moment_kinetics.debugging","text":"Define debugging levels that can be used to include extra debugging steps\n\nProvides a bunch of macros (see the macronames Vector) that can be used to surround code in other modules so that it only runs if the 'debug level' passed to the --debug or -d command line argument is high enough.\n\nAlso provides macro *_ifelse whose names are taken from macronames, which can be used to switch definitions, etc. For example, if debug_shared_array is in macronames, then\n\nconst MPISharedArray = @debug_shared_array_ifelse(DebugMPISharedArray, Array)\n\ncan be used to make the type represented by MPISharedArray depend on the debug level.\n\n\n\n\n\n","category":"module"},{"location":"zz_debugging/#moment_kinetics.debugging._debug_level","page":"debugging","title":"moment_kinetics.debugging._debug_level","text":"\n\n\n\n","category":"constant"},{"location":"zz_debugging/#moment_kinetics.debugging.macronames","page":"debugging","title":"moment_kinetics.debugging.macronames","text":"\n\n\n\n","category":"constant"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_block_synchronize-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_block_synchronize","text":"Check blocksynchronize() was called from the same place on every process. Activated at _debug_level >= 4 Currently inactive (_debug_level = 0).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_block_synchronize_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_block_synchronize_ifelse","text":"Evaluate first expression if debugblocksynchronize is active, second expression if not debugblocksynchronize is inactive (_debug_level = 0 < 4).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_detect_redundant_block_synchronize-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_detect_redundant_block_synchronize","text":"Check if any blocksynchronize() call could have been skipped without resulting in an error. Activated at _debug_level >= 5 Currently inactive (_debug_level = 0).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_detect_redundant_block_synchronize_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_detect_redundant_block_synchronize_ifelse","text":"Evaluate first expression if debugdetectredundantblocksynchronize is active, second expression if not debugdetectredundantblocksynchronize is inactive (_debug_level = 0 < 5).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_initialize_NaN-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_initialize_NaN","text":"Initialize arrays with NaN. Activated at _debug_level >= 1 Currently inactive (_debug_level = 0).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_initialize_NaN_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_initialize_NaN_ifelse","text":"Evaluate first expression if debuginitializeNaN is active, second expression if not debuginitializeNaN is inactive (_debug_level = 0 < 1).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_shared_array-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_shared_array","text":"Check for incorrect reads/writes to shared-memory arrays Activated at _debug_level >= 2 Currently inactive (_debug_level = 0).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_shared_array_allocate-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_shared_array_allocate","text":"Check that allocateshared() was called from the same place on every process. Activated at `debuglevel >= 4Currently inactive (debug_level = 0`).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_shared_array_allocate_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_shared_array_allocate_ifelse","text":"Evaluate first expression if debugsharedarrayallocate is active, second expression if not debugsharedarrayallocate is inactive (_debug_level = 0 < 4).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_shared_array_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_shared_array_ifelse","text":"Evaluate first expression if debugsharedarray is active, second expression if not debugsharedarray is inactive (_debug_level = 0 < 2).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_track_array_allocate_location-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_track_array_allocate_location","text":"Record where every array was allocated. Activated at _debug_level >= 3 Currently inactive (_debug_level = 0).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_track_array_allocate_location_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_track_array_allocate_location_ifelse","text":"Evaluate first expression if debugtrackarrayallocatelocation is active, second expression if not debugtrackarrayallocatelocation is inactive (_debug_level = 0 < 3).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_track_initialized-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_track_initialized","text":"Check that every array is initialized before being used. Activated at _debug_level >= 3 Currently inactive (_debug_level = 0).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_track_initialized_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_track_initialized_ifelse","text":"Evaluate first expression if debugtrackinitialized is active, second expression if not debugtrackinitialized is inactive (_debug_level = 0 < 3).\n\n\n\n\n\n","category":"macro"},{"location":"zz_time_advance/#time_advance","page":"time_advance","title":"time_advance","text":"","category":"section"},{"location":"zz_time_advance/","page":"time_advance","title":"time_advance","text":"Modules = [moment_kinetics.time_advance]","category":"page"},{"location":"zz_time_advance/#moment_kinetics.time_advance","page":"time_advance","title":"moment_kinetics.time_advance","text":"\n\n\n\n","category":"module"},{"location":"zz_time_advance/#moment_kinetics.time_advance.adaptive_timestep_update!-NTuple{28, Any}","page":"time_advance","title":"moment_kinetics.time_advance.adaptive_timestep_update!","text":"adaptive_timestep_update!(scratch, scratch_implicit, scratch_electron,\n t_params, pdf, moments, fields, boundary_distributions,\n composition, collisions, geometry,\n external_source_settings, spectral_objects,\n advect_objects, gyroavs, num_diss_params,\n nl_solver_params, advance, scratch_dummy, r, z, vperp,\n vpa, vzeta, vr, vz, success, nl_max_its_fraction)\n\nCheck the error estimate for the embedded RK method and adjust the timestep if appropriate.\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.apply_all_bcs_constraints_update_moments!-NTuple{28, Any}","page":"time_advance","title":"moment_kinetics.time_advance.apply_all_bcs_constraints_update_moments!","text":"Apply boundary conditions and moment constraints to updated pdfs and calculate derived moments and moment derivatives\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.euler_time_advance!-NTuple{27, Any}","page":"time_advance","title":"moment_kinetics.time_advance.euler_time_advance!","text":"eulertimeadvance! advances the vector equation dfvec/dt = G[f] that includes the kinetic equation + any evolved moment equations using the forward Euler method: fvecout = fvecin + dt*fvecin, with fvecin an input and fvec_out the output\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.implicit_ion_advance!-NTuple{29, Any}","page":"time_advance","title":"moment_kinetics.time_advance.implicit_ion_advance!","text":"implicit_ion_advance!(fvec_out, fvec_in, pdf, fields, moments, advect_objects,\n vz, vr, vzeta, vpa, vperp, gyrophase, z, r, t, dt,\n spectral_objects, composition, collisions, geometry,\n scratch_dummy, manufactured_source_list,\n external_source_settings, num_diss_params,\n nl_solver_params, advance, fp_arrays, istage)\n\nDo a backward-Euler timestep for all terms in the ion kinetic equation.\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.normalize_pdf!-Tuple{Any, Any, Any}","page":"time_advance","title":"moment_kinetics.time_advance.normalize_pdf!","text":"if evolving the density via continuity equation, redefine the normalised f → f/n if evolving the parallel pressure via energy equation, redefine f -> f * vth / n 'scratch' should be a (nz,nspecies) array\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.rk_update!-NTuple{6, Any}","page":"time_advance","title":"moment_kinetics.time_advance.rk_update!","text":"Use the result of the forward-Euler timestep and the previous Runge-Kutta stages to compute the updated pdfs, and any evolved moments.\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.setup_advance_flags-NTuple{14, Any}","page":"time_advance","title":"moment_kinetics.time_advance.setup_advance_flags","text":"create the 'advance_info' struct to be used in later Euler advance to indicate which parts of the equations are to be advanced concurrently. if no splitting of operators, all terms advanced concurrently; else, will advance one term at a time.\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.setup_implicit_advance_flags-NTuple{14, Any}","page":"time_advance","title":"moment_kinetics.time_advance.setup_implicit_advance_flags","text":"create the 'advanceinfo' struct to be used in the time advance to indicate which parts of the equations are to be advanced implicitly (using `backwardeuler!()`).\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.setup_scratch_arrays-Tuple{Any, Any, Any}","page":"time_advance","title":"moment_kinetics.time_advance.setup_scratch_arrays","text":"create an array of structs containing scratch arrays for the normalised pdf and low-order moments that may be evolved separately via fluid equations\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.setup_time_advance!-NTuple{37, Any}","page":"time_advance","title":"moment_kinetics.time_advance.setup_time_advance!","text":"create arrays and do other work needed to setup the main time advance loop. this includes creating and populating structs for Chebyshev transforms, velocity space moments, EM fields, and advection terms\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.setup_time_info-NTuple{9, Any}","page":"time_advance","title":"moment_kinetics.time_advance.setup_time_info","text":"setup_time_info(t_input; electrons=nothing)\n\nCreate a input_structs.time_info struct using the settings in t_input.\n\nIf something is passed in electron, it is stored in the electron_t_params member of the returned time_info.\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.ssp_rk!-NTuple{32, Any}","page":"time_advance","title":"moment_kinetics.time_advance.ssp_rk!","text":"\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.time_advance!-NTuple{33, Any}","page":"time_advance","title":"moment_kinetics.time_advance.time_advance!","text":"solve ∂f/∂t + v(z,t)⋅∂f/∂z + dvpa/dt ⋅ ∂f/∂vpa= 0 define approximate characteristic velocity v₀(z)=vⁿ(z) and take time derivative along this characteristic df/dt + δv⋅∂f/∂z = 0, with δv(z,t)=v(z,t)-v₀(z) for prudent choice of v₀, expect δv≪v so that explicit time integrator can be used without severe CFL condition\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.time_advance_no_splitting!-NTuple{32, Any}","page":"time_advance","title":"moment_kinetics.time_advance.time_advance_no_splitting!","text":"\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.time_advance_split_operators!-NTuple{21, Any}","page":"time_advance","title":"moment_kinetics.time_advance.time_advance_split_operators!","text":"\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.update_solution_vector!-NTuple{8, Any}","page":"time_advance","title":"moment_kinetics.time_advance.update_solution_vector!","text":"update the vector containing the pdf and any evolved moments of the pdf for use in the Runge-Kutta time advance\n\n\n\n\n\n","category":"method"},{"location":"zz_energy_equation/#energy_equation","page":"energy_equation","title":"energy_equation","text":"","category":"section"},{"location":"zz_energy_equation/","page":"energy_equation","title":"energy_equation","text":"Modules = [moment_kinetics.energy_equation]","category":"page"},{"location":"zz_energy_equation/#moment_kinetics.energy_equation","page":"energy_equation","title":"moment_kinetics.energy_equation","text":"\n\n\n\n","category":"module"},{"location":"zz_energy_equation/#moment_kinetics.energy_equation.energy_equation!-NTuple{9, Any}","page":"energy_equation","title":"moment_kinetics.energy_equation.energy_equation!","text":"evolve the parallel pressure by solving the energy equation\n\n\n\n\n\n","category":"method"},{"location":"zz_energy_equation/#moment_kinetics.energy_equation.neutral_energy_equation!-NTuple{9, Any}","page":"energy_equation","title":"moment_kinetics.energy_equation.neutral_energy_equation!","text":"evolve the neutral parallel pressure by solving the energy equation\n\n\n\n\n\n","category":"method"},{"location":"zz_charge_exchange/#charge_exchange","page":"charge_exchange","title":"charge_exchange","text":"","category":"section"},{"location":"zz_charge_exchange/","page":"charge_exchange","title":"charge_exchange","text":"Modules = [moment_kinetics.charge_exchange]","category":"page"},{"location":"zz_charge_exchange/#moment_kinetics.charge_exchange","page":"charge_exchange","title":"moment_kinetics.charge_exchange","text":"\n\n\n\n","category":"module"},{"location":"zz_charge_exchange/#moment_kinetics.charge_exchange.charge_exchange_collisions_single_species!-NTuple{14, Any}","page":"charge_exchange","title":"moment_kinetics.charge_exchange.charge_exchange_collisions_single_species!","text":"update the evolved pdf for a single species to account for charge exchange collisions with a single species of the opposite type; e.g., ions with neutrals or neutrals with ions\n\n\n\n\n\n","category":"method"},{"location":"zz_charge_exchange/#moment_kinetics.charge_exchange.ion_charge_exchange_collisions_1V!-NTuple{10, Any}","page":"charge_exchange","title":"moment_kinetics.charge_exchange.ion_charge_exchange_collisions_1V!","text":"update the evolved pdf for each ion species to account for charge exchange collisions between ions and neutrals\n\n\n\n\n\n","category":"method"},{"location":"zz_charge_exchange/#moment_kinetics.charge_exchange.neutral_charge_exchange_collisions_1V!-NTuple{10, Any}","page":"charge_exchange","title":"moment_kinetics.charge_exchange.neutral_charge_exchange_collisions_1V!","text":"update the evolved pdf for each neutral species to account for charge exchange collisions between ions and neutrals\n\n\n\n\n\n","category":"method"},{"location":"zz_plot_sequence/#plot_sequence","page":"plot_sequence","title":"plot_sequence","text":"","category":"section"},{"location":"zz_plot_sequence/","page":"plot_sequence","title":"plot_sequence","text":"Modules = [plots_post_processing.plot_sequence]","category":"page"},{"location":"zz_plot_sequence/#plots_post_processing.plot_sequence","page":"plot_sequence","title":"plots_post_processing.plot_sequence","text":"\n\n\n\n","category":"module"},{"location":"timestepping/#Timestepping","page":"Timestepping","title":"Timestepping","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Timestepping in moment_kinetics can be done with various explicit Runge-Kutta (RK) schemes. The default is a fixed-timestep 3rd-order, 4-stage, strong stability preserving (SSP) RK scheme.","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Several schemes (including all the fixed-timestep schemes) use a 'low storage' option, where only values from the first stage and previous stage are required for each stage update[1].","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"[1]: At present, we take advantage of this property to reduce the number of computations in the RK update step, but do not actually reduce the memory usage - we still store the results from every RK stage. It would be fairly straightforward to save memory, but would only reduce from 4 copies to 3 for the standard cases, so not a big saving.","category":"page"},{"location":"timestepping/#Fixed-timestep-schemes","page":"Timestepping","title":"Fixed-timestep schemes","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"The fixed timestep schemes use a constant dt, specified in the input file, for the whole simulation. The available types are:","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"\"SSPRK1\" - forward Euler method\n\"SSPRK2\" - Heun's method\n\"SSPRK3\" - a 3-stage, 3rd order method, see this Wikipedia list\n\"SSPRK4\" - the default, a 4-stage, 3rd order method, see [R.J. Spiteri, and S.J. Ruuth. \"A new class of optimal high-order strong-stability-preserving time discretization methods.\" SIAM Journal on Numerical Analysis 40.2 (2002): 469-491., referenced in Dale E. Durran, “Numerical Methods for Fluid Dynamics”, Springer. Second Edition].","category":"page"},{"location":"timestepping/#Adaptive-timestep-schemes","page":"Timestepping","title":"Adaptive-timestep schemes","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Several SSP schemes are included from [Fekete, Conde and Shadid, \"Embedded pairs for optimal explicit strong stability preserving Runge-Kutta methods\", Journal of Computational and Applied Mathematics 421 (2022) 114325, https://doi.org/10.1016/j.cam.2022.114325]:","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"\"Fekete4(3)\" a 4-stage, 3rd order method, the recommended 3rd order method in Fekete et al. Identical to the default \"SSPRK4\" fixed-step method, but with an embedded 2nd order method used to provide error control for adaptive timestepping. This is probably a good first choice for an adaptive timestep method.\n\"Fekete4(2)\" a 4-stage, 2nd order method, the recommended 2nd order method in Fekete et al.\n\"Fekete10(4)\" a 10-stage, 4th order method, the recommended 4th order method in Fekete et al. May allow longer timesteps than \"Fekete4(3)\", but probably not any faster as more stages are required per timestep. However, if very high accuracy is required (very tight rtol and atol tolerances), the higher accuracy may be an advantage.\n\"Fekete6(4)\" a 6-stage, 4th order method.","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"The classic \"Runge-Kutta-Fehlberg\" method [https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta%E2%80%93Fehlberg_method, 'COEFFICIENTS FOR RK4(5), FORMULA 2 Table III in Fehlberg' - note the Wikipedia page seems to have a typo in one of the error coefficients, see comment in utils/calculate_rk_coeffs.jl] is also provided as \"RKF5(4)\". This method seems to require a significantly smaller timestep to be stable than the SSP methods from Fekete et al., but might be useful if very high accuracy is required as it is a 5th-order accurate method. It uses 6 stages per step.","category":"page"},{"location":"timestepping/#Algorithm-for-choosing-the-next-timestep","page":"Timestepping","title":"Algorithm for choosing the next timestep","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"These adaptive timestepping methods use several criteria to set or limit the timestep:","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Truncation error, which is estimated by the difference between the higher and lower order methods of an 'embedded pair'. The timestep size needed to maintain a specified accuracy can be estimated from the size of the trucation error (knowing the order of accuracy of the method), as described for example in Fehlberg et al. This estimate is used unless it is larger than any of the following limits. The error limit is set by relative tolerance \"rtol\" and absolute tolerance \"atol\" parameters. For each variable X the error metric (calculated in moment_kinetics.time_advance.local_error_norm is the root-mean-square (RMS, or 'L2 norm') of epsilon:\nepsilon = fracE_X(mathttrtol*X + mathttatol)\nwhere E_X is the truncation error estimate for X. If the RMS of epsilon, averaged over all evolved variables, is greater than 1, then the step is considered 'failed' and is re-done with a shorter timestep (set by the lower of half of the failed timestep, or the timestep calculated using the estimate based on epsilon).\nCFL criteria [https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition]. These are estimated for the spatial advection and velocity-space advection terms in the kinetic equation(s), using the methods moment_kinetics.utils.get_minimum_CFL_z, moment_kinetics.utils.get_minimum_CFL_vpa, moment_kinetics.utils.get_minimum_CFL_neutral_z, moment_kinetics.utils.get_minimum_CFL_neutral_vz. These estimates are multiplied by a user-set prefactor - the correct value for the prefactor depends on both the timestepping scheme and the spatial discretisation, so to be pragmatic we tune the value by trial and error. [CFL limits associated with other terms in the equations could be added in a similar way if it is useful.]\nAt each step, the timestep is allowed to increase by at most a (user-set) factor, to avoid large jumps that might cause numerical instability.\nThere is an option to set a minimum timestep, which may be useful to push the simulation through initial transients where there is some numerical instability which would make the truncation error estimate push the timestep to ridiculously small values. Since we might not care about accuracy too much during these initial transients, it can be useful to set a minimum to stop the timestep getting too small (as long as the minimum is small enough that the simulation does not crash).","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"The estimates and limits just described are controlled by various tuning parameters, described in timestepping-input-parameters, that may need to be set appropriately to get good performance from the adaptive timestepping methods. The timestep achievable may be limited by accuracy or by stability. If the CFL_prefactor is set too high (or the relevant CFL limit is not being checked) then the timestep will try to increase too high for stability - when this happens, the step will also become inaccurate, causing timestep failures and reducing the timestep. So the simulation should continue without crashing, however it will be inefficient as the truncation error estimate will not 'see' the stability limit until the limit is exceeded, resulting in a cycle of increasing timestep followed by (probably repeated) timestep failures. The aim should probably be to set the CFL_limit_prefactor and max_increase_factor to the highest values that do not lead to too many timestep failures (a few failures are OK, especially during the initial transient phase of simulations). step_update_prefactor can also be decreased to use a bigger margin in the timestep estimated from the error metric epsilon - using a smaller step_update_prefactor will make the timestep smaller when it is limited by accuracy, but this can (sometimes!) help avoid timestep failures, which might decrease the total number of steps. ","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Special treatment is needed for the time points where output is to be written. When the next timestep would take the simulation time beyond the next time where output is to be written, the timestep is set instead to take the simulation to the output time. Then output is written and the timestep is reset to the last full timestep value from before the output.","category":"page"},{"location":"timestepping/#Alternative-algorithm-for-choosing-the-next-timestep","page":"Timestepping","title":"Alternative algorithm for choosing the next timestep","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"It might turn out that the particular CFL limits that are included in the algorithm described in Algorithm for choosing the next timestep are not a complete set of the things that set the stability limit for the explicit RK timestep. If that is the case, it may be useful to have a more generic algorithm that can still fairly robustly choose a good timestep size, without a large number of timestep failures. One option is described in this subsection. For the parameters discussed, see again timestepping-input-parameters.","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"If we assume that dt that last failed the timestep truncation error test is a good estimate of the dt that is the boundary between stable and unstable timstep values, then it makes sense to try to keep timesteps close to that (to avoid failures), although we also want to allow the timestep to increase past that value in case it was a bad estimate (e.g. during some sort of transient) or because the stability limits have changed (e.g. parallel gradients in the simulation have changed significantly). We would like to stay close to a marginally stable (rather than marginally unstable) timestep, so take as the estimate the last successful timestep before the most recent failed timestep (this is stored in the code as t_params.dt_before_last_fail[]). When dt is within a factor last_fail_proximity_factor of this value, we limit the increase in timestep to max_increase_factor_near_last_fail, rather than max_increase_factor. Suggested setup (which of course is likely to need adjusting depending on the simulation!):","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Set max_increase_factor_near_last_fail to a value very close to 1, say 1.001. This means that the timestep can only very slowly approach and exceed t_params.dt_before_last_fail[]. Setting this value closer to 1 should decrease the number of timestep failures.\nSet max_increase_factor to a relatively large value, say 1.5 or 2, so that when a timestep does fail, dt quickly recovers to a value close to the last successful value before the failure.\nSet step_update_prefactor to a relatively small value, say 0.5. step_update_prefactor controls how far dt is set below the value needed to comply with the requested tolerances. Setting a smallish value (so a large margin below the value that would trigger a timestep failure) seems to help - current guess (JTO 20/3/2024) is that: when dt is close to (or maybe just above) the value that would be unstable, the error starts to grow; with some margin, and with the factor by which dt increases limited to a small value, so that dt is at worst very marginally unstable, the truncation error estimate can feel the error and decrease dt (modestly) back to a stable value, before the error becomes big enough to cause a timestep failure. Once dt has been decreased (but not too much) it is again only allowed to increase slowly, so as long as these decreases happen often enough, dt can stay around the stability boundary without causing timestep failures. Decreasing this value should decrease the number of timestep failures.\nlast_fail_proximity_factor - current guess (JTO 20/3/2024) is that the default value of 1.05 is reasonable. Increasing this value should decrease the number of timestep failures, but will also increase the number of steps needed before the timestep can increase past a too-low value (from a bad estimate, transient, changed simulation conditions, etc.).\nAs a rough guideline, more than one timestep failures on average per 100 timesteps is probably too many to be efficient, while around or less than this many is probably acceptable. If there are too many failures, try tweaking parameters as indicated above.","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"In at least one case JTO has been able to use this method to get a simulation to run without imposing CFL restrictions explicitly, in a similar number of steps as when using (well-tuned) explicit CFL restrictions.","category":"page"},{"location":"timestepping/#timestepping-input-parameters","page":"Timestepping","title":"Input parameters","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Option name Default value Description\nnstep 5 nstep*dt is the total length of the run. For fixed-step timestepping, nstep is the total number of timesteps\ndt 000025T For fixed-step, gives the length of the timestep. For adaptive-step gives the initial guess for the timestep. T in the default value is the initial temperature of the ions\nCFL_prefactor -1.0 Prefactor that the CFL limits from moment_kinetics.utils.get_minimum_CFL_z, moment_kinetics.utils.get_minimum_CFL_vpa, moment_kinetics.utils.get_minimum_CFL_neutral_z, moment_kinetics.utils.get_minimum_CFL_neutral_vz are multiplied by to set the timestep limit. If no value is given, a default is set according to which timestepping scheme is chosen (see moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!).\nnwrite 1 Output of moment quantities is written every nwrite*dt time units.\nnwrite_dfns nothing Output of distribution function quantities is written every nwrite_dfns*dt time units. By default distribution function quantities are written only at the beginning and end of the simulation.\ntype \"SSPRK4\" Timestepping method, see Fixed-timestep schemes and Adaptive-timestep schemes.\nsplit_operators false If true, use operator splitting. Operator splitting is currently only partially implemented.\nstopfile_name \"stop\" Name of the file that can be created in the output directory to stop the simulation cleanly after the next output is written.\nsteady_state_residual false Set to true to print out the maximum residual r(t) = fracleft n(t)-n(t-delta t)right delta t of the density for each species at each output step\nconverged_residual_value -1.0 If steady_state_residual = true and converged_residual_value is set to a positive value, then the simulation will be stopped if all the density residuals are less than converged_residual_value. Note the residuals are only calculated and checked at time steps where output for moment variables is written.\nrtol 1.0e-5 Relative tolerance used for the truncation error metric.\natol 1.0e-12 Absolute tolerance used for the truncation error metric.\natol_upar 1.0e-2*rtol Absolute tolerance used parallel flow moment variables in the truncation error metric. This is separate from atol as the flow moments are expected to pass through zero somewhere, unlike distribution functions, densities, or pressures that should always be positive.\nstep_update_prefactor 0.9 When timestep is limited by accuracy (rather than something else), it is set to step_update_prefactor times the estimated timestep which would give an RMS error metric $\\epsilon$ of 1 at the next step. This value should always be less than 1. Smaller values give a bigger margin under the failure threshold, so may help reduce the number of timestep failures.\nmax_increase_factor 1.05 Timestep can be increased by at most this factor at each step.\nmax_increase_factor_near_last_fail Inf If set to finite value, replaces max_increase_factor when the timestep is near the last failed dt value (defined as within last_fail_proximity_factor of the last successful dt value before a timestep failure). If set, must be less than max_increase_factor.\nlast_fail_proximity_factor 1.05 Defines the range considered 'near to' the last failed dt value: dt_before_last_fail/last_fail_proximity_factor < dt < dt_before_last_fail*last_fail_proximity_factor.\nminimum_dt 0.0 Timestep is not allowed to decrease below this value, regardless of accuracy or stability limits.\nmaximum_dt Inf Timestep is not allowed to increase above this value.\nhigh_precision_error_sum false If this is set to true, then quad-precision values (Float128 from the Quadmath package) are used to calculate the sum in the truncation error estimates. When different numbers of processes are used, the sums are calculated in different orders, so the rounding errors will be different. When adaptive timestepping is used this means that different timesteps will be used when different numbers of processes are used, so results will not be exactly the same (although they should be consistent within the timestepper tolerances and discretisation errors). When comparing 'identical' simulations run on different numbers of processes (e.g. for debugging), these differences can be inconvenient. The differences can be avoided (or at least massively reduced) by using a higher precision for the sum, so that the order of the addition operations does not matter (at least until there are so many contributions to the sum that the rounding errors reduce the precision of the quad-precision result to less than double-precision, which would take a very large number!). This feature was originally added in an attempt to make adaptive-timestepping tests give consistent results (at a level sim 10^-14) on the CI servers. However, rounding errors change randomly on different systems (operating system, compiler, hardware, etc.), not only because of the different order of terms in the sum in the truncation error norm, so consistency is not possible between different systems even with this feature.","category":"page"},{"location":"timestepping/#Diagnostics","page":"Timestepping","title":"Diagnostics","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"To help tune the settings for adaptive timestepping methods, several diagnostics are written to the output files:","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"step_counter is the cumulative number of time steps taken to reach each output.\ndt is the most recent timestep size at each output.\nfailure_counter is the cumulative number of timestep failures.\nfailure_caused_by counts the (cumulative) number of times each evolved variable (distribution functions or, for moment-kinetic simulations, moment variables) caused a timestep failure. failure_caused_by is a 2d array - the second dimension is time, the index of the first indicates the variable (see below for plotting of the diagnostics).\nlimit_caused_by counts the (cumulative) number of times each factor (accuracy, CFL limits, maximum timestep increase factor, minimum timestep) set the timestep limit. limit_caused_by is a 2d array - the second dimension is time, the index of the first indicates the factor (see below for plotting of the diagnostics).","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"These diagnostics (after being converted from cumulative counts to counts per output step) as well as the CFL limits are plotted and/or animated by makie_post_processing.timestep_diagnostics. This function will be called when running makie_post_processing.makie_post_process if options in the [timestep_diagnostics] section of the post processing input are set: plot=true for plots or animate_CFL=true to make animations of the CFL limits for various terms.","category":"page"},{"location":"timestepping/#Developing","page":"Timestepping","title":"Developing","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"The script utils/calculate_rk_coeffs.jl provides some functions to convert a 'Butcher tableau' to the rk_coefs array used internally in moment_kinetics. To add more RK methods (adaptive or fixed-step) it may be useful to add them in this script, to get the rk_coefs values, which can be copied into moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!.","category":"page"},{"location":"timestepping/#API","page":"Timestepping","title":"API","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"See moment_kinetics.time_advance, moment_kinetics.runge_kutta.","category":"page"},{"location":"zz_runge_kutta/#runge_kutta","page":"runge_kutta","title":"runge_kutta","text":"","category":"section"},{"location":"zz_runge_kutta/","page":"runge_kutta","title":"runge_kutta","text":"Modules = [moment_kinetics.runge_kutta]","category":"page"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta","page":"runge_kutta","title":"moment_kinetics.runge_kutta","text":"Runge Kutta timestepping\n\n\n\n\n\n","category":"module"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.adaptive_timestep_update_t_params!-NTuple{8, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.adaptive_timestep_update_t_params!","text":"adaptive_timestep_update_t_params!(t_params, CFL_limits, error_norms,\n total_points, error_norm_method, success,\n nl_max_its_fraction, composition;\n electron=false, local_max_dt::mk_float=Inf)\n\nUse the calculated CFL_limits and error_norms to update the timestep in t_params.\n\n\n\n\n\n","category":"method"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.local_error_norm","page":"runge_kutta","title":"moment_kinetics.runge_kutta.local_error_norm","text":"local_error_norm(error, f, rtol, atol)\nlocal_error_norm(error, f, rtol, atol, neutral=false; method=\"Linf\",\n skip_r_inner=false, skip_z_lower=false, error_sum_zero=0.0)\n\nMaximum error norm in the range owned by this MPI process, given by\n\nmax(fracmathtterrormathttrtol*mathttf + mathttatol)\n\n3 dimensional arrays (which represent moments) are treated as ion moments unless neutral=true is passed.\n\nmethod can be \"Linf\" (to take the maximum error) or \"L2\" to take the root-mean-square (RMS) error.\n\nskip_r_inner and skip_z_lower can be set to true to skip the contribution from the inner/lower boundaries, to avoid double-counting those points when using distributed-memory MPI.\n\nerror_sum_zero should always have value 0.0, but is included so that different types can be used for L2sum. For testing, if we want consistency of results when using different numbers of processes (when the number of processes changes the order of operations in the sum is changed, which changes the rounding errors) then we have to use higher precision (i.e. use the Float128 type from the Quadmath package). The type of a 0.0 value can be set according to the high_precision_error_sum option in the [timestepping] section, and stored in a template-typed value in the t_params object - when that value is passed in as the argument to error_sum_zero, that type will be used for L2sum, and the type will be known at compile time, allowing this function to be efficient.\n\n\n\n\n\n","category":"function"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.rk_loworder_solution!-Tuple{Any, Any, Symbol, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.rk_loworder_solution!","text":"Calculate a lower-order approximation for the variable named var_symbol, which can be used to calculate an error estimate for adaptive timestepping methods.\n\nThe lower-order approximation is stored in var_symbol in scratch[2] (as this entry should not be needed again after the lower-order approximation is calculated).\n\n\n\n\n\n","category":"method"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.rk_update_evolved_moments!-NTuple{5, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.rk_update_evolved_moments!","text":"use Runge Kutta to update any ion velocity moments evolved separately from the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.rk_update_evolved_moments_electron!-NTuple{5, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.rk_update_evolved_moments_electron!","text":"use Runge Kutta to update any electron velocity moments evolved separately from the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.rk_update_evolved_moments_neutral!-NTuple{5, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.rk_update_evolved_moments_neutral!","text":"use Runge Kutta to update any neutral-particle velocity moments evolved separately from the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.rk_update_variable!-Tuple{Any, Any, Symbol, Any, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.rk_update_variable!","text":"Update the variable named var_symbol in scratch to the current Runge-Kutta stage istage. The current value in scratch[istage+1] is the result of the forward-Euler update, which needs to be corrected using values from previous stages with the Runge-Kutta coefficients. scratch_implicit contains the results of backward-Euler updates, which are needed for IMEX timestepping schemes.\n\n\n\n\n\n","category":"method"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!-Tuple{Any, Any, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!","text":"given the number of Runge Kutta stages that are requested, returns the needed Runge Kutta coefficients; e.g., if f is the function to be updated, then f^{n+1}[stage+1] = rkcoef[1,stage]*f^{n} + rkcoef[2,stage]f^{n+1}[stage] + rk_coef[3,stage](f^{n}+dt*G[f^{n+1}[stage]]\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#finite_differences","page":"finite_differences","title":"finite_differences","text":"","category":"section"},{"location":"zz_finite_differences/","page":"finite_differences","title":"finite_differences","text":"Modules = [moment_kinetics.finite_differences]","category":"page"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences","page":"finite_differences","title":"moment_kinetics.finite_differences","text":"\n\n\n\n","category":"module"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.finite_difference_info","page":"finite_differences","title":"moment_kinetics.finite_differences.finite_difference_info","text":"Finite difference discretization\n\n\n\n\n\n","category":"type"},{"location":"zz_finite_differences/#moment_kinetics.calculus.elementwise_derivative!-Tuple{Any, Any, Any, moment_kinetics.finite_differences.finite_difference_info}","page":"finite_differences","title":"moment_kinetics.calculus.elementwise_derivative!","text":"elementwise_derivative!(coord, f, adv_fac, not_spectral::finite_difference_info)\n\nCalculate the derivative of f using finite differences, with particular scheme specified by coord.finitedifferenceoption; result stored in coord.scratch_2d.\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.calculus.elementwise_derivative!-Tuple{Any, Any, moment_kinetics.finite_differences.finite_difference_info}","page":"finite_differences","title":"moment_kinetics.calculus.elementwise_derivative!","text":"elementwise_derivative!(coord, f, not_spectral::finite_difference_info)\n\nCalculate the derivative of f using 4th order centered finite differences; result stored in coord.scratch_2d.\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.centered_fourth_order!-Tuple{Matrix{Float64}, Vararg{Any, 5}}","page":"finite_differences","title":"moment_kinetics.finite_differences.centered_fourth_order!","text":"take the derivative of input function f and return as df using fourth-order, centered differences. input/output array df is 2D array of size ngrid x nelement\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.centered_second_order!-Tuple{Matrix{Float64}, Vararg{Any, 5}}","page":"finite_differences","title":"moment_kinetics.finite_differences.centered_second_order!","text":"take the derivative of input function f and return as df using second-order, centered differences. input/output array df is 2D array of size ngrid x nelement\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.centered_second_order!-Tuple{Vector{Float64}, Vararg{Any, 5}}","page":"finite_differences","title":"moment_kinetics.finite_differences.centered_second_order!","text":"take the derivative of input function f and return as df using second-order, centered differences. input/output df is 1D array of size n (full grid)\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.derivative_finite_difference!-NTuple{7, Any}","page":"finite_differences","title":"moment_kinetics.finite_differences.derivative_finite_difference!","text":"\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.derivative_finite_difference!-NTuple{8, Any}","page":"finite_differences","title":"moment_kinetics.finite_differences.derivative_finite_difference!","text":"\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.elementwise_second_derivative!-Tuple{Any, Any, moment_kinetics.finite_differences.finite_difference_info}","page":"finite_differences","title":"moment_kinetics.finite_differences.elementwise_second_derivative!","text":"elementwise_second_derivative!(coord, f, not_spectral::finite_difference_info)\n\nCalculate the second derivative of f using 2nd order centered finite differences; result stored in coord.scratch_2d.\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.fd_check_option-Tuple{Any, Any}","page":"finite_differences","title":"moment_kinetics.finite_differences.fd_check_option","text":"\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.second_derivative_finite_difference!-Tuple{Matrix{Float64}, Vararg{Any, 5}}","page":"finite_differences","title":"moment_kinetics.finite_differences.second_derivative_finite_difference!","text":"Take the second derivative of input function f and return as df using second-order, centered differences. output array df is 2D array of size ngrid x nelement\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.upwind_first_order!-NTuple{7, Any}","page":"finite_differences","title":"moment_kinetics.finite_differences.upwind_first_order!","text":"\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.upwind_second_order!-NTuple{7, Any}","page":"finite_differences","title":"moment_kinetics.finite_differences.upwind_second_order!","text":"\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.upwind_third_order!-NTuple{7, Any}","page":"finite_differences","title":"moment_kinetics.finite_differences.upwind_third_order!","text":"\n\n\n\n","category":"method"},{"location":"external_sources_notes/#External-sources","page":"External sources","title":"External sources","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"Sometimes it is useful to have a source term for the plasma or neutrals (the S_i and S_n of Moment kinetic equations). The currently-implemented source term has the form of a Maxwellian with constant temperature and spatially-varying amplitude","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"beginalign\nS_i = A_i(rz) frac1(pi)^32 (2 T_mathrmsourcei m_i)^32 expleft( -frac(v_perp^2 + v_parallel^2)T_mathrmsourcei right) \nS_n = A_n(rz) frac1(pi)^32 (2 T_mathrmsourcen m_n)^32 expleft( -frac(v_zeta^2 + v_r^2 + v_z^2)T_mathrmsourcen right)\nendalign","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"or in 1V simulations that do not include v_perp, v_zeta, v_r dimensions","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"beginalign\nS_i = A_i(rz) frac1sqrtpi sqrt2 T_mathrmsourcei m_i expleft( -fracv_perp^2T_mathrmsourcei right) \nS_n = A_n(rz) frac1sqrtpi sqrt2 T_mathrmsourcen m_n expleft( -fracv_z^2T_mathrmsourcen right)\nendalign","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The sources are controlled by options in the [ion_source] and [neutral_source] sections of the input file. The source terms are enabled by setting active = true. The constant temperature is set with the source_T option (default is 1 for ions and T_mathrmwall for neutrals). The amplitude can be set or controlled in various ways depending on the source_type setting, as explained in the following subsection.","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"Note that all the settings mentioned below have values given in normalised units (in the same way as the settings for initial profiles, etc.).","category":"page"},{"location":"external_sources_notes/#Amplitude","page":"External sources","title":"Amplitude","text":"","category":"section"},{"location":"external_sources_notes/#Fixed-amplitude-(default)","page":"External sources","title":"Fixed amplitude (default)","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"When source_type = \"Maxwellian\" (the default), the amplitude of the source is fixed in time and controled by the profile options. The profile has the form","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"A(rz) = A_0 R(r) Z(z)","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"where A_0 is given by the source_strength option. R(r) and Z(z) are controlled by the r_profile and z_profile options respectively. The available options for either are the same, so letting x stand for either of r or z, and X for the corresponding R or Z:","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"x_profile = \"constant\" (the default) means X(x)=1.\nx_profile = \"gaussian\" means X(x) = (1 - X_mathrmmin) expleft( -left(fracxwright)^2 right) + X_mathrmmin where X_mathrmmin is set by x_relative_minimum and w is set by x_width.\nx_profile = \"parabolic\" means P(x) = left( 1 - left(frac2xwright)^2 right), X(x) = (1 - X_mathrmmin) H(P(x)) P(x) + X_mathrmmin where X_mathrmmin is set by x_relative_minimum and w is set by x_width. The effect of the step function H is to let the profile be a quadratic in the range -w2 x w2, but equal to a floor (by default 0, so that the source is just not allowed to become negative) outside that range.","category":"page"},{"location":"external_sources_notes/#Midpoint-density-controller","page":"External sources","title":"Midpoint density controller","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"When source_type = \"density_midpoint_control\" a PI controller (Wikipedia) is used to control the ion/neutral density. The 'midpoint' for the purposes of this controller is the point on the grid where r=0 and z=0 (there must be a grid point there).","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The spatial profile of the source (R(r) and Z(z)) is set in the same way as for the 'Fixed amplitude' source (see above), but now the prefactor changes with time","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"A(rz) = A_0(t) R(r) Z(z)","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The prefactor A_0(t) is controlled to set the midpoint density to some value n(r=0z=0)rightarrow n_mathrmPI where n_mathrmPI is set by PI_density_target_amplitude. Specifically,","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"beginalign\n A_0(t) = mathttmaxleft(P(n_mathrmPI - n(r=0z=0)) + iota(t) 0right) \n fracpartial iotapartial t = I(n_mathrmPI - n(r=0z=0))\nendalign","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The 'proportional' coefficient P is set by PI_density_controller_P and the 'integral' coefficient I is set by PI_density_controller_I. The mathrmmax(ldots0) is to ensure that the 'source term' is never negative (i.e. a sink), to avoid the possibility of driving the system towards negative density.","category":"page"},{"location":"external_sources_notes/#Density-profile-controller","page":"External sources","title":"Density profile controller","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"When source_type = \"density_profile_control\" a PI controller (Wikipedia) is used to control the ion/neutral density profile.","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The target profile is","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"n_mathrmPI(rz) = n_mathrmPI0 R(r) Z(z)","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"where n_mathrmPI0 is set by PI_density_target_amplitude and R(r) and Z(z) are set as described in Fixed amplitude (default).","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The source amplitude A(rz) is controlled to set the density profile to n(rz)rightarrow n_mathrmPI(rz). Specifically,","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"beginalign\n A(rz) = mathttmaxleft(P(n_mathrmPI(rz) - n(rz)) + iota(trz) 0right) \n fracpartial iota(trz)partial t = I(n_mathrmPI(rz) - n(rz))\nendalign","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The 'proportional' coefficient P is set by PI_density_controller_P and the 'integral' coefficient I is set by PI_density_controller_I. The mathrmmax(ldots0) is to ensure that the 'source term' is never negative (i.e. a sink), to avoid the possibility of driving the system towards negative density.","category":"page"},{"location":"external_sources_notes/#Recycling","page":"External sources","title":"Recycling","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The source of neutrals can be set so that some fraction of the flux of ions to the walls is recycled into the volume of the domain as neutrals by using the source_type = \"recycling\" option.","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The profile is set up whose spatial integral is 1","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"A(rz) = A_0 R(r) Z(z)","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"where A_0 = leftint drdz R(r) Z(z)right^-1 and R(r) and Z(z) are set as described in Fixed amplitude (default). The source is","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"S_n(trz) = F(t) A(rz)","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"where F(t) is the sum of the integrated ion flux to the lower and upper targets.","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"warning: Warning\nThe target flux calculated for this controller does not account for magnetic field lines that are not perpendicular to the wall, or for drifts to the target, so needs updating (within moment_kinetics.external_sources.external_neutral_source_controller!) to be used in 2D simulations.","category":"page"},{"location":"external_sources_notes/#Energy-source","page":"External sources","title":"Energy source","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"When source_type = \"energy\", rather than just adding particles with temperature T_mathrmsources, the existing plasma or neutrals in the domain are swapped with plasma/neutrals from a Maxwellian with T_mathrmsources, so that the density is unchanged, but energy is added (or potentially removed if the plasma/neutrals are hotter than T_mathrmsources).","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"beginalign\nS_i = A_i(rz) left frac1(pi)^32 (2 T_mathrmsourcei m_i)^32 expleft( -frac(v_perp^2 + v_parallel^2)T_mathrmsourcei - f_i(v_perp v_parallel) right) right \nS_n = A_n(rz) left frac1(pi)^32 (2 T_mathrmsourcen m_n)^32 expleft( -frac(v_zeta^2 + v_r^2 + v_z^2)T_mathrmsourcen - f_n(v_zeta v_r v_z) right) right\nendalign","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"or in 1V simulations","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"beginalign\nS_i = A_i(rz) left frac1sqrtpi sqrt2 T_mathrmsourcei m_i expleft( -fracv_perp^2T_mathrmsourcei - f_i(v_parallel) right) right \nS_n = A_n(rz) left frac1sqrtpi sqrt2 T_mathrmsourcen m_n expleft( -fracv_z^2T_mathrmsourcen - f_n(v_z) right) right\nendalign","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"Note that this source does not give a fixed power input (although that might be a nice feature to have), it just swaps plasma/neutral particles at a constant rate.","category":"page"},{"location":"external_sources_notes/#API","page":"External sources","title":"API","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"See external_sources.","category":"page"},{"location":"manufactured_solution_test_examples/#List-of-Manufactured-Solutions-Test-TOML-inputs","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"Here we list the existing manufactured solution test inputs. These inputs are examples only, and in most cases we only keep the lowest resolution examples. The user should copy these inputs and make a series of TOML with increasing resolutions to generate a series of simulations on which the numerical errors can be tested and compared to the expected scaling of the numerical method employed.","category":"page"},{"location":"manufactured_solution_test_examples/#D1V-tests","page":"List of Manufactured Solutions Test TOML inputs","title":"1D1V tests","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"There are 1D1V tests which complement the check-in testing suite. The example input files in this category are as follows:","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"1D1V simulation of kinetic ions (no neutrals) and numerical velocity dissipation.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-wall_MMS_new_nel_r_1_z_16_vpa_16_vperp_1_diss.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"1D1V simulation of kinetic ions (no neutrals) and a krook collision operator.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-wall_MMS_new_nel_r_1_z_16_vpa_16_vperp_1_krook.toml","category":"page"},{"location":"manufactured_solution_test_examples/#D2V-tests","page":"List of Manufactured Solutions Test TOML inputs","title":"1D2V tests","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"1D2V simulation of kinetic ions (no neutrals) and a krook collision operator.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-wall_MMS_new_nel_r_1_z_16_vpa_8_vperp_8_krook.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"1D2V simulation of a open field lines in 1D magnetic mirror (no neutrals)","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-mirror_MMS_ngrid_9_nel_r_1_z_4_vpa_4_vperp_2_diss.toml\nruns/1D-mirror_MMS_ngrid_9_nel_r_1_z_8_vpa_8_vperp_4_diss.toml\nruns/1D-mirror_MMS_ngrid_9_nel_r_1_z_16_vpa_16_vperp_8_diss.toml\nruns/1D-mirror_MMS_ngrid_9_nel_r_1_z_32_vpa_32_vperp_16_diss.toml","category":"page"},{"location":"manufactured_solution_test_examples/#D2V/1D3V-test-(with-neutrals)","page":"List of Manufactured Solutions Test TOML inputs","title":"1D2V/1D3V test (with neutrals)","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"A test with periodic boundary conditions in 1D, Boltzmann electrons, neutrals, and ions.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-sound-wave_cheb_nel_r_1_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"A test with ions and neutral species and wall boundary conditions, using the Boltzmann electron response to model the electron species.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-wall_cheb-with-neutrals_nel_r_1_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"A test with neutral species and wall boundary conditions, using a simple sheath model for electrons based on the Boltzmann electron response.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-wall_cheb-with-neutrals-with-sheath_nel_r_1_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"manufactured_solution_test_examples/#D1V-tests-2","page":"List of Manufactured Solutions Test TOML inputs","title":"2D1V tests","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"These tests are used to test the spatial advection in simple cases with wall boundary conditions.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"2D1V test of wall boundary conditions and the E x B drift. Numerical dissipation in the radial domain is imposed to stabilise an instability that otherwise appears at the grid scale.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/2D-wall_MMS_nel_r_32_z_32_vpa_16_vperp_1_diss.toml","category":"page"},{"location":"manufactured_solution_test_examples/#D2V-tests-2","page":"List of Manufactured Solutions Test TOML inputs","title":"2D2V tests","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"These tests are used to test the spatial advection in cases with wall boundary conditions or geometrical features where two velocity dimensions are necessary.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"2D2V simulation with periodic boundary conditions, Boltzmann electrons and ions","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/2D-sound-wave_cheb_ion_only_nel_r_2_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"2D2V simulation of a open field lines in 1D magnetic mirror (no neutrals)","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/2D-mirror_MMS_ngrid_5_nel_r_8_z_8_vpa_8_vperp_4_diss.toml\nruns/2D-mirror_MMS_ngrid_5_nel_r_16_z_16_vpa_16_vperp_8_diss.toml\nruns/2D-mirror_MMS_ngrid_5_nel_r_32_z_32_vpa_16_vperp_16_diss.toml","category":"page"},{"location":"manufactured_solution_test_examples/#D2V/2D3V-tests","page":"List of Manufactured Solutions Test TOML inputs","title":"2D2V/2D3V tests","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"These tests include a two-dimensional domain, ions, and neutrals (which have three velocity dimensions).","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"2D2V/2D3V simulation on a domain with wall boundaries, with helical geometry, Boltzmann electrons, neutrals, and ions.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/2D-wall_cheb-with-neutrals_nel_r_2_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"2D2V/2D3V simulation on a periodic domain, with helical geometry, Boltzmann electrons, neutrals, and ions.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/2D-sound-wave_cheb_nel_r_2_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"2D2V/2D3V simulation on a periodic domain, with model charge exchange and ionisation collisions, helical geometry, Boltzmann electrons, neutrals, and ions.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/2D-sound-wave_cheb_cxiz_nel_r_2_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"zz_electron_kinetic_equation/#electron_kinetic_equation","page":"electron_kinetic_equation","title":"electron_kinetic_equation","text":"","category":"section"},{"location":"zz_electron_kinetic_equation/","page":"electron_kinetic_equation","title":"electron_kinetic_equation","text":"Modules = [moment_kinetics.electron_kinetic_equation]","category":"page"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.calculate_contribution_from_z_advection!-NTuple{7, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.calculate_contribution_from_z_advection!","text":"calculates the contribution to the residual of the electron kinetic equation from the z advection term: residual = zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa - pdf * prefactor INPUTS: zadvectionterm = dummy array to be filled with the contribution to the residual from the z advection term pdf = modified electron pdf used in the kinetic equation = (true electron pdf / dense) * vthe vthe = electron thermal speed z = z grid vpa = vparallel grid zspectral = spectral representation of the z grid scratchdummy = dummy array to be used for temporary storage OUTPUT: zadvectionterm = updated contribution to the residual from the z advection term\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.electron_adaptive_timestep_update!-NTuple{16, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.electron_adaptive_timestep_update!","text":"electron_adaptive_timestep_update!(scratch, t, t_params, moments, phi, z_advect,\n vpa_advect, composition, r, z, vperp, vpa,\n vperp_spectral, vpa_spectral,\n external_source_settings, num_diss_params;\n evolve_ppar=false)\n\nCheck the error estimate for the embedded RK method and adjust the timestep if appropriate.\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.electron_backward_euler!-NTuple{22, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.electron_backward_euler!","text":"Update the electron distribution function using backward-Euler for an artifical time advance of the electron kinetic equation until a steady-state solution is reached.\n\nNote that this function does not use the runge_kutta timestep functionality. t_params.previous_dt[] is used to store the (adaptively updated) initial timestep of the pseudotimestepping loop (initial value of t_params.dt[] within electron_backward_euler!()). t_params.dt[] is adapted according to the iteration counts of the Newton solver.\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.electron_kinetic_equation_euler_update!-NTuple{19, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.electron_kinetic_equation_euler_update!","text":"electron_kinetic_equation_euler_update!(f_out, ppar_out, f_in, ppar_in, moments,\n z, vperp, vpa, z_spectral, vpa_spectral,\n z_advect, vpa_advect, scratch_dummy,\n collisions, composition,\n external_source_settings,\n num_diss_params, t_params, ir;\n evolve_ppar=false, ion_dt=nothing)\n\nDo a forward-Euler update of the electron kinetic equation.\n\nWhen evolve_ppar=true is passed, also updates the electron parallel pressure.\n\nNote that this function operates on a single point in r, given by ir, and f_out, ppar_out, f_in, and ppar_in should have no r-dimension.\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.fill_electron_kinetic_equation_Jacobian!-NTuple{21, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.fill_electron_kinetic_equation_Jacobian!","text":"fill_electron_kinetic_equation_Jacobian!(jacobian_matrix, f, ppar, moments,\n collisions, composition, z, vperp, vpa,\n z_spectral, vperp_specral,\n vpa_spectral, z_advect, vpa_advect,\n scratch_dummy, external_source_settings,\n num_diss_params, t_params, ion_dt,\n ir, evolve_ppar)\n\nFill a pre-allocated matrix with the Jacobian matrix for electron kinetic equation and (if evolve_ppar=true) the electron energy equation.\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.implicit_electron_advance!-NTuple{26, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.implicit_electron_advance!","text":"implicit_electron_advance!()\n\nDo an implicit solve which finds: the steady-state electron shape function g_e; the backward-Euler advanced electron pressure which is updated using g_e at the new time-level.\n\nThe r-dimension is not parallelised. For 1D runs this makes no difference. In 2D it might or might not be necessary. If r-dimension parallelisation is needed, it would need some work. The simplest option would be a non-parallelised outer loop over r, with each nonlinear solve being parallelised over {z,vperp,vpa}. More efficient might be to add an equivalent to the 'anyv' parallelisation used for the collision operator (e.g. 'anyzv'?) to allow the outer r-loop to be parallelised.\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.update_electron_pdf!-NTuple{22, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.update_electron_pdf!","text":"updateelectronpdf is a function that uses the electron kinetic equation to solve for the updated electron pdf\n\nThe electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * pre_factor\n\nINPUTS:\nscratch = `scratch_pdf` struct used to store Runge-Kutta stages\npdf = modified electron pdf @ previous time level = (true electron pdf / dens_e) * vth_e\ndens = electron density\nvthe = electron thermal speed\nppar = electron parallel pressure\nddens_dz = z-derivative of the electron density\ndppar_dz = z-derivative of the electron parallel pressure\ndqpar_dz = z-derivative of the electron parallel heat flux\ndvth_dz = z-derivative of the electron thermal speed\nz = struct containing z-coordinate information\nvpa = struct containing vpa-coordinate information\nz_spectral = struct containing spectral information for the z-coordinate\nvpa_spectral = struct containing spectral information for the vpa-coordinate\nscratch_dummy = dummy arrays to be used for temporary storage\ndt = time step size\nmax_electron_pdf_iterations = maximum number of iterations to use in the solution of the electron kinetic equation\nion_dt = if this is passed, the electron pressure is evolved in a form that results in\n a backward-Euler update on the ion timestep (ion_dt) once the electron\n pseudo-timestepping reaches steady state.\n\nOUTPUT: pdf = updated (modified) electron pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_picard_iteration!-NTuple{13, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_picard_iteration!","text":"use Picard iteration to solve the electron kinetic equation\n\nThe electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * pre_factor Picard iteration uses the previous iteration of the electron pdf to calculate the next iteration: zdot * d(pdf^{i+1})/dz + wpadot^{i} * d(pdf^{i})/dwpa = pdf^{i} * prefactor^{i}\n\nINPUTS: pdf = modified electron pdf @ previous time level = (true electron pdf / dense) * vthe dens = electron density vthe = electron thermal speed ppar = electron parallel pressure ddensdz = z-derivative of the electron density dppardz = z-derivative of the electron parallel pressure dqpardz = z-derivative of the electron parallel heat flux dvthdz = z-derivative of the electron thermal speed z = struct containing z-coordinate information vpa = struct containing vpa-coordinate information zspectral = struct containing spectral information for the z-coordinate vpaspectral = struct containing spectral information for the vpa-coordinate scratchdummy = dummy arrays to be used for temporary storage maxelectronpdfiterations = maximum number of iterations to use in the solution of the electron kinetic equation OUTPUT: pdf = updated (modified) electron pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_shooting_method!-NTuple{16, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_shooting_method!","text":"updateelectronpdfwithshooting_method is a function that using a shooting method to solve for the electron pdf\n\nThe electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * prefactor The shooting method is 'explicit' in z, solving zdoti * (pdf{i+1} - pdf{i})/dz{i} + wpadot{i} * d(pdf{i})/dwpa = pdf{i} * prefactor{i}\n\nINPUTS:\npdf = modified electron pdf @ previous time level = (true electron pdf / dens_e) * vth_e\ndens = electron density\nvthe = electron thermal speed\nppar = electron parallel pressure\nddens_dz = z-derivative of the electron density\ndppar_dz = z-derivative of the electron parallel pressure\ndqpar_dz = z-derivative of the electron parallel heat flux\ndvth_dz = z-derivative of the electron thermal speed\nz = struct containing z-coordinate information\nvpa = struct containing vpa-coordinate information\nvpa_spectral = struct containing spectral information for the vpa-coordinate\nscratch_dummy = dummy arrays to be used for temporary storage\n\nOUTPUT: pdf = updated (modified) electron pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_time_advance!-NTuple{21, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_time_advance!","text":"updateelectronpdfwithtime_advance is a function that introduces an artifical time derivative to advance the electron kinetic equation until a steady-state solution is reached.\n\nThe electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * pre_factor\n\nINPUTS:\npdf = modified electron pdf @ previous time level = (true electron pdf / dens_e) * vth_e\ndens = electron density\nvthe = electron thermal speed\nppar = electron parallel pressure\nddens_dz = z-derivative of the electron density\ndppar_dz = z-derivative of the electron parallel pressure\ndqpar_dz = z-derivative of the electron parallel heat flux\ndvth_dz = z-derivative of the electron thermal speed\nz = struct containing z-coordinate information\nvpa = struct containing vpa-coordinate information\nz_spectral = struct containing spectral information for the z-coordinate\nvpa_spectral = struct containing spectral information for the vpa-coordinate\nscratch_dummy = dummy arrays to be used for temporary storage\nmax_electron_pdf_iterations = maximum number of iterations to use in the solution of the electron kinetic equation\nio_electron = info struct for binary file I/O\ninitial_time = initial value for the (pseudo-)time\nion_dt = if this is passed, the electron pressure is evolved in a form that results in\n a backward-Euler update on the ion timestep (ion_dt) once the electron\n pseudo-timestepping reaches steady state.\n\nOUTPUT: pdf = updated (modified) electron pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#boundary_conditions","page":"boundary_conditions","title":"boundary_conditions","text":"","category":"section"},{"location":"zz_boundary_conditions/","page":"boundary_conditions","title":"boundary_conditions","text":"Modules = [moment_kinetics.boundary_conditions]","category":"page"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions","text":"Functions for applying boundary conditions\n\n\n\n\n\n","category":"module"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_boundary_conditions!-NTuple{25, Any}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_boundary_conditions!","text":"enforce boundary conditions in vpa and z on the evolved pdf; also enforce boundary conditions in z on all separately evolved velocity space moments of the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_initial_tapered_zero_incoming!-Tuple{Any, moment_kinetics.coordinates.coordinate, moment_kinetics.coordinates.coordinate}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_initial_tapered_zero_incoming!","text":"Set up an initial condition that tries to be smoothly compatible with the sheath boundary condition for ions, by setting f(±(v_parallel-u0)<0) where u0=0 at the sheath boundaries and for z<0 increases linearly to u0=vpa.L at z=0, while for z>0 increases from u0=-vpa.L at z=0 to zero at the z=z.L/2 sheath.\n\nTo be applied to 'full-f' distribution function on vparallel grid (not wparallel grid).\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_neutral_boundary_conditions!-NTuple{28, Any}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_neutral_boundary_conditions!","text":"enforce boundary conditions on neutral particle distribution function\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_neutral_wall_bc!-NTuple{17, Any}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_neutral_wall_bc!","text":"enforce the wall boundary condition on neutrals; i.e., the incoming flux of neutrals equals the sum of the ion/neutral outgoing fluxes\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_neutral_z_boundary_condition!-Tuple{Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Vararg{AbstractArray{Float64, 5}, 4}}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_neutral_z_boundary_condition!","text":"enforce boundary conditions on neutral particle f in z\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_r_boundary_condition!-Tuple{AbstractArray{Float64, 5}, Any, String, Any, Any, Any, Any, Any, Any, AbstractArray{Float64, 4}, AbstractArray{Float64, 4}, AbstractArray{Float64, 4}, AbstractArray{Float64, 4}, Bool}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_r_boundary_condition!","text":"enforce boundary conditions on f in r\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_v_boundary_condition_local!-NTuple{6, Any}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_v_boundary_condition_local!","text":"\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_vperp_boundary_condition!","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_vperp_boundary_condition!","text":"enforce zero boundary condition at vperp -> infinity\n\n\n\n\n\n","category":"function"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_z_boundary_condition!-Tuple{Any, Any, Any, Any, Any, Any, String, Any, Any, Any, Any, Any, Vararg{AbstractArray{Float64, 4}, 4}}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_z_boundary_condition!","text":"enforce boundary conditions on ion particle f in z\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_z_boundary_condition_moments!-Tuple{Any, Any, String}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_z_boundary_condition_moments!","text":"enforce the z boundary condition on the evolved velocity space moments of f\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_zero_incoming_bc!-NTuple{6, Any}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_zero_incoming_bc!","text":"enforce a zero incoming BC in z for given species pdf at each radial location\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.skip_f_electron_bc_points_in_Jacobian-NTuple{7, Any}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.skip_f_electron_bc_points_in_Jacobian","text":"skip_f_electron_bc_points_in_Jacobian(iz, ivperp, ivpa, z, vperp, vpa)\n\nThis function returns true when the grid point specified by iz, ivperp, ivpa would be set by the boundary conditions on the electron distribution function. When this happens, the corresponding row should be skipped when adding contributions to the Jacobian matrix, so that the row remains the same as a row of the identity matrix, so that the Jacobian matrix does not modify those points. Returns false otherwise.\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.vpagrid_to_dzdt-NTuple{5, Any}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.vpagrid_to_dzdt","text":"create an array of dz/dt values corresponding to the given vpagrid values\n\n\n\n\n\n","category":"method"},{"location":"zz_r_advection/#r_advection","page":"r_advection","title":"r_advection","text":"","category":"section"},{"location":"zz_r_advection/","page":"r_advection","title":"r_advection","text":"Modules = [moment_kinetics.r_advection]","category":"page"},{"location":"zz_r_advection/#moment_kinetics.r_advection","page":"r_advection","title":"moment_kinetics.r_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_r_advection/#moment_kinetics.r_advection.adjust_advection_speed!-NTuple{5, Any}","page":"r_advection","title":"moment_kinetics.r_advection.adjust_advection_speed!","text":"\n\n\n\n","category":"method"},{"location":"zz_r_advection/#moment_kinetics.r_advection.r_advection!-NTuple{14, Any}","page":"r_advection","title":"moment_kinetics.r_advection.r_advection!","text":"do a single stage time advance (potentially as part of a multi-stage RK scheme)\n\n\n\n\n\n","category":"method"},{"location":"zz_r_advection/#moment_kinetics.r_advection.unnormalize_pdf!-NTuple{6, Any}","page":"r_advection","title":"moment_kinetics.r_advection.unnormalize_pdf!","text":"\n\n\n\n","category":"method"},{"location":"zz_r_advection/#moment_kinetics.r_advection.update_speed_r!-NTuple{12, Any}","page":"r_advection","title":"moment_kinetics.r_advection.update_speed_r!","text":"calculate the advection speed in the r-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"moment_kinetic_equations/#Moment-kinetic-equations","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"","category":"section"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"The following are partial notes on the derivation of the equations being solved by moment_kinetics. It would be useful to expand them with more details from the Excalibur/Neptune reports. Equation references give the report number and equation number, e.g. (TN-04;1) is equation (1) from report TN-04.pdf.","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"The drift kinetic equation (DKE), marginalised over v_perp, for ions is, adding ionization and a source term to the form in (TN-04;1),","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_ipartial t\n +v_fracpartial f_ipartial z\n -fracemfracpartialphipartial zfracpartial f_ipartial v_\n = -R_mathrminleft(n_nf_i-n_if_nright)+R_mathrmionn_if_n\n + S_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"and for neutrals, adding ionization and a source term to (TN-04;2)","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_npartial t\n +v_fracpartial f_npartial z\n = -R_mathrminleft(n_if_n-n_nf_iright)-R_mathrmionn_if_n\n + S_n\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"Using the normalizations (TN04;5-11)","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n tildef_s doteq f_sfracc_ssqrtpiN_e\n tildet doteq tfracc_sL_z\n tildez doteqfraczL_z\n tildev_ doteqfracv_c_s\n tilden_s doteqfracn_sN_e\n tildephi doteqfracephiT_e\n tildeR_mathrmin doteq R_mathrminfracN_eL_zc_s\n tildeR_mathrmion doteq R_mathrmionfracN_eL_zc_s\n tildeS_i = S_i fracc_ssqrtpiN_e fracL_zc_s = S_i fracL_zsqrtpiN_e\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"with c_sdoteqsqrt2T_em_s where L_z, N_e and T_e are constant reference parameters, the ion DKE is","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartialtildef_ipartialtildet\n + tildev_fracpartialtildef_ipartialtildez\n - frac12fracpartialtildephipartialtildez\n fracpartialtildef_ipartialtildev_\n = -tildeR_inleft(tilden_ntildef_i-tilden_itildef_nright)\n + tildeR_mathrmiontilden_itildef_n\n + tildeS_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"and the neutral DKE is","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartialtildef_npartialtildet\n + v_fracpartialtildef_npartialtildez\n = -tildeR_inleft(tilden_itildef_n-tilden_ntildef_iright)\n - tildeR_mathrmiontilden_itildef_n\n + tildeS_n\nendalign","category":"page"},{"location":"moment_kinetic_equations/#Moment-equations","page":"Moment kinetic equations","title":"Moment equations","text":"","category":"section"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"Recalling the definitions (TN-04;15,29,63-66), but writing the integral in the energy equation over tildev_ instead of w_,","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n tilden_s\n = frac1sqrtpiint dtildev_tildef_s\n\n tilden_stildeu_s\n = frac1sqrtpiint dtildev_tildev_tildef_s\n\n tildep_s\n = frac1sqrtpiint dtildev_left(tildev_\n - tildeu_sright)^2tildef_s\n = frac1sqrtpiint dtildev_tildev_^2tildef_s\n - tilden_stildeu_s^2\n\n tildeq_s\n = frac1sqrtpiint dtildev_\n left(tildev_-tildeu_sright)^3tildef_s\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n tildeq_s\n = frac1sqrtpiint dtildev_tildev_^3tildef_s\n - 3tildeu_sfrac1sqrtpiint dv_v_^2f_s\n + 3u_s^2frac1sqrtpiint dv_v_f_s\n - u_s^3frac1sqrtpiint dv_f_s \n\n = frac1sqrtpiint dtildev_tildev_^3tildef_s\n - 3tildeu_sleft(tildep_s+tilden_stildeu_s^2right)\n + 3tildeu_s^2tilden_stildeu_s-tildeu_s^3tilden_s\nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n tildeq_s\n = frac1sqrtpiint dtildev_tildev_^3tildef_s\n - 3tildeu_stildep_s\n - tilden_stildeu_s^3\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"we can take moments of the ion DKE to give ion moment equations (dropping tildes from here on)","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial n_ipartial t+fracpartialleft(n_iu_iright)partial z\n = -R_inleft(n_nn_i-n_in_nright)+R_mathrmionn_in_n\n + int dv_parallel S_i\n\n = R_mathrmionn_in_n + int dv_parallel S_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartialleft(n_iu_iright)partial t + fracpartialleft(p_i\n + n_iu_i^2right)partial z + frac12fracpartialphipartial zn_i\n = -R_inleft(n_nn_iu_i - n_in_nu_nright)\n + R_mathrmionn_in_nu_n \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n n_ifracpartial u_ipartial t + u_ifracpartial n_ipartial t\n + fracpartial p_ipartial z\n + u_ifracpartialleft(n_iu_iright)partial z\n + n_iu_ifracpartial u_ipartial z\n + frac12fracpartialphipartial zn_i\n = -R_inleft(n_nn_iu_i - n_in_nu_nright)\n + R_mathrmionn_in_nu_n \n\n n_ifracpartial u_ipartial t\n + u_ileft(R_mathrmionn_in_n + int dv_parallel S_iright)\n + fracpartial p_ipartial z + n_iu_ifracpartial u_ipartial z\n + frac12fracpartialphipartial zn_i\n = -R_inleft(n_nn_iu_i - n_in_nu_nright)\n + R_mathrmionn_in_nu_n \nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial u_ipartial t + frac1n_ifracpartial p_ipartial z\n + u_ifracpartial u_ipartial z + frac12fracpartialphipartial z\n = -R_inn_nleft(u_i-u_nright)\n + R_mathrmionn_in_nleft(u_n-u_iright)\n - fracu_in_i int dv_parallel S_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartialleft(p_i + n_iu_i^2right)partial t\n + fracpartialleft(q_i + 3u_ip_i\n + n_iu_i^3right)partial z + fracpartialphipartial zn_iu_i \n = -R_inleft(n_nleft(p_i + n_iu_i^2right)\n - n_ileft(p_n + n_nu_n^2right)right)\n + R_mathrmionn_ileft(p_n+n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_i \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n fracpartial p_ipartial t\n + frac1n_ifracpartialleft(n_iu_iright)^2partial t\n - fracleft(n_iu_iright)^2n_i^2fracpartial n_ipartial t\n + fracpartialleft(q_i + 3u_ip_i\n + n_iu_i^3right)partial z + fracpartialphipartial zn_iu_i\n = -R_inleft(n_nleft(p_i + n_iu_i^2right)\n - n_ileft(p_n + n_nu_n^2right)right)\n + R_mathrmionn_ileft(p_n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_i \n\n fracp_ipartial t + 2u_ifracpartial n_iu_ipartial t\n - u_i^2fracpartial n_ipartial t + fracpartialleft(q_i\n + 3u_ip_i + n_iu_i^3right)partial z\n + fracpartialphipartial zn_iu_i\n = -R_inleft(n_nleft(p_i + n_iu_i^2right)\n - n_ileft(p_n + n_nu_n^2right)right)\n + R_mathrmionn_ileft(p_n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_i \n\n fracpartial p_ipartial t + 2u_ileft(-fracpartial p_ipartial z\n - fracpartialleft(n_iu_i^2right)partial z\n - frac12fracpartialphipartial zn_i\n - R_inleft(n_nn_iu_i - n_in_nu_nright)\n + R_mathrmionn_in_nu_nright) \n -u_i^2left(-fracpartialleft(n_iu_iright)partial z\n + R_mathrmionn_in_n + int dv_parallel S_iright)\n + fracpartial q_ipartial z\n + fracpartialleft(3u_ip_iright)partial z\n + fracpartialleft(n_iu_i^3right)partial z\n + fracpartialphipartial zn_iu_i\n = -R_inleft(n_nleft(p_i + n_iu_i^2right)\n - n_ileft(p_n + n_nu_n^2right)right)\n + R_mathrmionn_ileft(p_n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_i \n\n fracpartial p_ipartial t + u_ifracpartial p_ipartial z\n + 3p_ifracpartial u_ipartial z + fracpartial q_ipartial z\n = -R_inleft(n_nleft(p_i + n_iu_i^2right) - n_ileft(p_n\n + n_nu_n^2right) - 2u_ileft(n_nn_iu_i - n_in_nu_nright)right) \n quad + R_mathrmionn_ileft(p_n + n_nu_n^2 + n_nu_i^2\n - 2n_nu_iu_nright)\n + int dv_parallel v_parallel^2 S_i + u_i^2 int dv_parallel S_i \n\n fracpartial p_ipartial t + u_ifracpartial p_ipartial z\n + 3p_ifracpartial u_ipartial z + fracpartial q_ipartial z\n = -R_inleft(n_np_i - n_ip_n - n_in_nleft(u_i^2 + u_n^2\n - 2u_iu_nright)right) + R_mathrmionn_ileft(p_n + n_nleft(u_n\n - u_iright)^2right) \n quad + int dv_parallel v_parallel^2 S_i + u_i^2 int dv_parallel S_i \nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial p_ipartial t + u_ifracpartial p_ipartial z\n + 3p_ifracpartial u_ipartial z + fracpartial q_ipartial z \n = -R_inleft(n_np_i - n_ip_n\n - n_in_nleft(u_i - u_nright)^2right)\n + R_mathrmionn_ileft(p_n + n_nleft(u_n - u_iright)^2right) \n quad + int dv_parallel v_parallel^2 S_i + u_i^2 int dv_parallel S_i \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"and of the neutral DKE to give neutral moment equations","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial n_npartial t + fracpartialleft(n_nu_nright)partial z\n = -R_ileft(n_in_n - n_nn_iright) - R_mathrmionn_in_n\n + int dv_parallel S_n \n\n =-R_mathrmionn_in_n + int dv_parallel S_n\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartialleft(n_nu_nright)partial t\n + fracpartialleft(p_n + n_nu_n^2right)partial z\n = -R_inleft(n_in_nu_n - n_nn_iu_iright)\n - R_mathrmionn_in_nu_n \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n n_nfracpartial u_npartial t + u_nfracpartial n_npartial t\n + fracpartial p_npartial z\n + u_nfracpartialleft(n_nu_nright)partial z\n + n_nu_nfracpartial u_npartial z\n = -R_inleft(n_in_nu_n - n_nn_iu_iright)\n - R_mathrmionn_in_nu_n \n\n n_nfracpartial u_npartial t\n + u_nleft(-R_mathrmionn_in_n + int dv_parallel S_nright)\n + fracpartial p_npartial z\n + n_nu_sfracpartial u_npartial z\n = -R_inleft(n_in_nu_n - n_nn_iu_iright)\n - R_mathrmionn_in_nu_n \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial u_npartial t + frac1n_nfracpartial p_npartial z\n + u_nfracpartial u_npartial z\n = -R_inn_ileft(u_n - u_iright) - fracu_nn_n int dv_parallel S_n\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartialleft(p_n + n_nu_n^2right)partial t\n + fracpartialleft(q_n + 3u_np_n\n + n_nu_n^3right)partial z + q_nfracpartialphipartial zn_nu_n \n = -R_inleft(n_ileft(p_n + n_nu_n^2right) - n_nleft(p_i\n + n_iu_i^2right)right)\n - R_mathrmionn_ileft(p_n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_n \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n fracpartial p_npartial t\n + frac1n_nfracpartialleft(n_nu_nright)^2partial t\n - fracleft(n_nu_nright)^2n_n^2fracpartial n_npartial t\n + fracpartialleft(q_n + 3u_np_n + n_nu_n^3right)partial z\n + q_nfracpartialphipartial zn_nu_n\n =-R_inleft(n_ileft(p_n + n_nu_n^2right) - n_nleft(p_i\n + n_iu_i^2right)right)\n - R_mathrmionn_ileft(p_n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_n \n\n fracpartial p_npartial t + 2u_nfracpartial n_nu_npartial t\n - u_n^2fracpartial n_npartial t + fracpartialleft(q_n\n + 3u_np_n + n_nu_n^3right)partial z\n + q_nfracpartialphipartial zn_nu_n\n = -R_inleft(n_ileft(p_n + n_nu_n^2right) - n_nleft(p_i\n + n_iu_i^2right)right) - R_mathrmionn_ileft(p_n\n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_n \n\n fracpartial p_npartial t\n + 2u_nleft(-fracpartial p_npartial z\n - fracpartialleft(n_nu_n^2right)partial z\n - fracq_n2fracpartialphipartial zn_n\n - R_inleft(n_in_nu_n - n_nn_iu_iright)\n - R_mathrmionn_in_nu_nright) \n - u_n^2left(-fracpartialleft(n_nu_nright)partial z\n - R_mathrmionn_in_n + int dv_parallel S_nright)\n + fracpartial q_npartial z\n + fracpartialleft(3u_np_nright)partial z\n + fracpartialleft(n_nu_n^3right)partial z\n = -R_inleft(n_ileft(p_n + n_nu_n^2right) - n_nleft(p_i\n + n_iu_i^2right)right)\n - R_mathrmionn_ileft(p_n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_n \n\n fracpartial p_npartial t + u_nfracpartial p_npartial z\n + 3p_nfracpartial u_npartial z + fracpartial q_npartial z\n = -R_inleft(n_ileft(p_n + n_nu_n^2right) - n_nleft(p_i\n + n_iu_i^2right) - 2u_nleft(n_in_nu_n\n - n_nn_iu_iright)right) - R_mathrmionn_ileft(p_n\n + n_nu_n^2 + n_nu_n^2 - 2n_nu_nu_nright)\n + int dv_parallel v_parallel^2 S_n + u_n^2int dv_parallel S_n \n\n fracpartial p_npartial t + u_nfracpartial p_npartial z\n + 3p_nfracpartial u_npartial z + fracpartial q_npartial z\n = -R_inleft(n_ip_n - n_np_i - n_nn_ileft(u_n^2 + u_i^2\n - 2u_nu_iright)right) - R_mathrmionn_ip_n\n + int dv_parallel v_parallel^2 S_n + u_n^2int dv_parallel S_n \nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial p_npartial t + u_nfracpartial p_npartial z\n + 3p_nfracpartial u_npartial z + fracpartial q_npartial z \n = -R_inleft(n_ip_n - n_np_i\n - n_nn_ileft(u_n - u_iright)^2right) - R_mathrmionn_ip_n \n quad + int dv_parallel v_parallel^2 S_n + u_n^2int dv_parallel S_n \nendalign","category":"page"},{"location":"moment_kinetic_equations/#Kinetic-equation","page":"Moment kinetic equations","title":"Kinetic equation","text":"","category":"section"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"For the moment-kinetic equation for the normalized distribution function","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\ng_s(w_s) = fracv_mathrmthsn_sf_s(v_(w_s))\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"we transform to the normalized velocity coordinate","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\nw_s = fracv_ - u_sv_mathrmths\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"The derivatives transform as","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n leftfracpartial f_spartial tright_zv\n rightarrowleftfracpartial f_spartial tright_zw\n - frac1v_mathrmthsfracpartial u_spartial tleftfracpartial f_spartial w_sright_zt\n - fracw_sv_mathrmthsfracpartial v_mathrmthspartial tleftfracpartial f_spartial w_sright_zt\n\n leftfracpartial f_spartial zright_zv\n rightarrowleftfracpartial f_spartial zright_tw\n - frac1v_mathrmthsfracpartial u_spartial zleftfracpartial f_spartial w_sright_zt\n - fracw_sv_mathrmthsfracpartial v_mathrmthspartial zleftfracpartial f_spartial w_sright_zwt\n\n leftfracpartial f_spartial v_right_zv\n rightarrowfrac1v_mathrmthsleftfracpartial f_spartial w_sright_zt\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"We use an energy equation that evolves p_s not v_mathrmths, so use","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n v_mathrmths^2 = 2fracp_sn_s \n\n Rightarrow v_mathrmthsfracpartial v_mathrmthspartial t\n = frac1n_sfracpartial p_spartial t\n - fracp_sn_s^2fracpartial n_spartial t\n\n v_mathrmthsfracpartial v_mathrmthspartial z\n = frac1n_sfracpartial p_spartial z\n - fracp_sn_s^2fracpartial n_spartial z\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"to convert the transformations above to","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n leftfracpartial f_spartial tright_zv\n rightarrowleftfracpartial f_spartial tright_zw\n - frac1v_mathrmthsfracpartial u_spartial tleftfracpartial f_spartial w_sright_zw\n - fracw_sv_mathrmths^2left(frac1n_sfracpartial p_spartial t\n - fracp_sn_s^2fracpartial n_spartial tright)leftfracpartial f_spartial w_sright_zw\n\n = leftfracpartial f_spartial tright_zw\n - frac1v_mathrmthsfracpartial u_spartial tleftfracpartial f_spartial w_sright_zw\n - fracw_s2left(frac1p_sfracpartial p_spartial t\n - frac1n_sfracpartial n_spartial tright)leftfracpartial f_spartial w_sright_zw\n\n leftfracpartial f_spartial zright_zv\n rightarrowleftfracpartial f_spartial zright_zw\n - frac1v_mathrmthsfracpartial u_spartial zleftfracpartial f_spartial w_sright_zw\n - fracw_sv_mathrmths^2left(frac1n_sfracpartial p_spartial z\n - fracp_sn_s^2fracpartial n_spartial zright)leftfracpartial f_spartial w_sright_zw\n\n = leftfracpartial f_spartial zright_zw\n - frac1v_mathrmthsfracpartial u_spartial zleftfracpartial f_spartial w_sright_zw\n - fracw_s2left(frac1p_sfracpartial p_spartial z\n - frac1n_sfracpartial n_spartial zright)leftfracpartial f_spartial w_sright_zw\n\n leftfracpartial f_spartial v_right_zv\n rightarrowfrac1v_mathrmthsleftfracpartial f_spartial w_sright_zw\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"Using these transformations gives the ion DKE in a form similar to (TN-04;55) (but writing out dotw_ in full here, and not using the moment equations for the moment)","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_ipartial t\n - frac1v_mathrmthifracpartial u_ipartial tfracpartial f_ipartial w_i\n - fracw_i2left(frac1p_ifracpartial p_ipartial t\n - frac1n_ifracpartial n_ipartial tright)fracpartial f_ipartial w_i \n + left(v_mathrmthiw_i + u_iright)left(fracpartial f_ipartial z\n - frac1v_mathrmthifracpartial u_ipartial zfracpartial f_ipartial w_i\n - fracw_i2left(frac1p_ifracpartial p_ipartial z\n - frac1n_ifracpartial n_ipartial zright)fracpartial f_ipartial w_iright) \n - frac12v_mathrmthifracpartialphipartial zfracpartial f_ipartial w_i \n = -R_inleft(n_nf_i - n_if_nright) + R_mathrmionn_if_n + S_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n fracpartial f_ipartial t + left(v_mathrmthiw_i\n + u_iright)fracpartial f_ipartial z\n - frac1v_mathrmthifracpartial u_ipartial tfracpartial f_ipartial w_i\n - fracw_i2left(frac1p_ifracpartial p_ipartial t\n - frac1n_ifracpartial n_ipartial tright)fracpartial f_ipartial w_i\n + left(v_mathrmthiw_i\n + u_iright)left(-frac1v_mathrmthifracpartial u_ipartial zfracpartial f_ipartial w_i\n - fracw_i2left(frac1p_ifracpartial p_ipartial z\n - frac1n_ifracpartial n_ipartial zright)fracpartial f_ipartial w_iright)\n - frac12v_mathrmthifracpartialphipartial zfracpartial f_ipartial w_i\n = -R_inleft(n_nf_i - n_if_nright) + R_mathrmionn_if_n + S_i \n\n fracpartial f_ipartial t + left(v_mathrmthiw_i\n + u_iright)fracpartial f_ipartial z\n + left-frac1v_mathrmthifracpartial u_ipartial t\n - fracw_i2left(frac1p_ifracpartial p_ipartial t\n - frac1n_ifracpartial n_ipartial tright)\n + left(v_mathrmthiw_i\n + u_iright)left(-frac1v_mathrmthifracpartial u_ipartial z\n - fracw_i2left(frac1p_ifracpartial p_ipartial z\n - frac1n_ifracpartial n_ipartial zright)right)\n - frac12v_mathrmthifracpartialphipartial zrightfracpartial f_ipartial w_i\n = -R_inleft(n_nf_i - n_if_nright) + R_mathrmionn_if_n + S_i \nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_ipartial t + left(v_mathrmthiw_i\n + u_iright)fracpartial f_ipartial z \n + left-frac1v_mathrmthileft(fracpartial u_ipartial t\n + left(v_mathrmthiw_i + u_iright)fracpartial u_ipartial z\n + frac12fracpartialphipartial zright)right \n qquad - fracw_i2frac1p_ileft(fracpartial p_ipartial t\n + left(v_mathrmthiw_i + u_iright)fracpartial p_ipartial zright) \n qquad + fracw_i2frac1n_ileft(fracpartial n_ipartial t\n + left(v_mathrmthiw_i\n + leftu_iright)fracpartial n_ipartial zright)rightfracpartial f_ipartial w_i \n = -R_inleft(n_nf_i - n_if_nright) + R_mathrmionn_if_n + S_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"and the neutral DKE","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_npartial t\n - frac1v_mathrmthnfracpartial u_npartial tfracpartial f_npartial w_n\n - fracw_n2left(frac1p_nfracpartial p_npartial t\n - frac1n_nfracpartial n_npartial tright)fracpartial f_npartial w_n \n + left(v_mathrmthnw_n + u_nright)left(fracpartial f_npartial z\n - frac1v_mathrmthnfracpartial u_npartial zfracpartial f_npartial w_n\n - fracw_n2left(frac1p_nfracpartial p_npartial z\n - frac1n_nfracpartial n_npartial zright)fracpartial f_npartial w_nright) \n = -R_inleft(n_if_n - n_nf_iright) - R_mathrmionn_if_n + S_n \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n fracpartial f_npartial t + left(v_mathrmthnw_n\n + u_nright)fracpartial f_npartial z\n - frac1v_mathrmthnfracpartial u_npartial tfracpartial f_npartial w_n\n - fracw_n2left(frac1p_nfracpartial p_npartial t\n - frac1n_nfracpartial n_npartial tright)fracpartial f_npartial w_n\n + left(v_mathrmthnw_n\n + u_nright)left(-frac1v_mathrmthnfracpartial u_npartial zfracpartial f_npartial w_n\n - fracw_n2left(frac1p_nfracpartial p_npartial z\n - frac1n_nfracpartial n_npartial zright)fracpartial f_npartial w_nright)\n = -R_inleft(n_if_n - n_nf_iright) - R_mathrmionn_if_n + S_n \n\n fracpartial f_npartial t + left(v_mathrmthnw_n\n + u_nright)fracpartial f_npartial z\n + left-frac1v_mathrmthnfracpartial u_npartial t\n - fracw_n2left(frac1p_nfracpartial p_npartial t\n - frac1n_nfracpartial n_npartial tright) + left(v_mathrmthnw_n\n + u_nright)left(-frac1v_mathrmthnfracpartial u_npartial z\n - fracw_n2left(frac1p_nfracpartial p_npartial z\n - frac1n_nfracpartial n_npartial zright)right)rightfracpartial f_npartial w_n\n = -R_inleft(n_if_n - n_nf_iright) - R_mathrmionn_if_n + S_n \nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_npartial t + left(v_mathrmthnw_n\n + u_nright)fracpartial f_npartial z \n + left-frac1v_mathrmthnleft(fracpartial u_npartial t\n + left(v_mathrmthnw_n+u_nright)fracpartial u_npartial zright)right \n qquad - fracw_n2frac1p_nleft(fracpartial p_npartial t\n + left(v_mathrmthnw_n + u_nright)fracpartial p_npartial zright) \n qquad + leftfracw_n2frac1n_nleft(fracpartial n_npartial t\n + left(v_mathrmthnw_n\n + u_nright)fracpartial n_npartial zright)rightfracpartial f_npartial w_n \n = -R_inleft(n_if_n - n_nf_iright) - R_mathrmionn_if_n + S_n\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"We also normalise f and write the DKEs for","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n g_s =fracv_mathrmthsn_sf_s \n\n Rightarrowfracpartial f_spartial t\n = fracn_sv_mathrmthsfracpartial g_spartial t\n + fracg_sv_mathrmthsfracpartial n_spartial t\n - fracn_sg_sv_mathrmths^2fracpartial v_mathrmthspartial t \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n fracpartial f_spartial t\n = fracn_sv_mathrmthsfracpartial g_spartial t\n + fracg_sv_mathrmthsfracpartial n_spartial t\n - fracn_sg_sv_mathrmths^3left(frac1n_sfracpartial p_spartial t\n - fracp_sn_s^2fracpartial n_spartial tright) \n\n = fracn_sv_mathrmthsfracpartial g_spartial t\n + fracg_sv_mathrmthsfracpartial n_spartial t\n - fracg_sn_s2v_mathrmthsp_sfracpartial p_spartial t\n + fracg_s2v_mathrmthsfracpartial n_spartial t \nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_spartial t\n = fracn_sv_mathrmthsfracpartial g_spartial t\n + frac3g_s2v_mathrmthsfracpartial n_spartial t\n - fracg_sn_s2v_mathrmthsp_sfracpartial p_spartial t \n\n fracpartial f_spartial w_s\n = fracn_sv_mathrmthsfracpartial g_spartial w_s\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"For brevity, do the following manipulations for g_s rather than for ions and neutrals separately by using q_i=1, q_n=0 and with the +'ve sign for the ion DKE and -'ve sign for the neutral DKE.","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracn_sv_mathrmthsfracpartial g_spartial t\n + frac3g_s2v_mathrmthsfracpartial n_spartial t\n - fracg_sn_s2v_mathrmthsp_sfracpartial p_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial f_spartial z \n + left-frac1v_mathrmthsleft(fracpartial u_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial u_spartial z\n + fracq_s2fracpartialphipartial zright)right \n qquad - fracw_s2frac1p_sleft(fracpartial p_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial p_spartial zright) \n qquad + leftfracw_s2frac1n_sleft(fracpartial n_spartial t\n + left(v_mathrmthsw_s\n + u_sright)fracpartial n_spartial zright)rightfracn_sv_mathrmthsfracpartial g_spartial w_s \n = -R_ssleft(n_sfracn_sv_mathrmthsg_s\n - n_sfracn_sv_mathrmthsg_sright)\n pm R_mathrmionn_ifracn_nv_mathrmthng_n\n + S_s \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + frac3g_s2n_sfracpartial n_spartial t\n - fracg_s2p_sfracpartial p_spartial t \n + left-frac1v_mathrmthsleft(fracpartial u_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial u_spartial z\n + fracq_s2fracpartialphipartial zright)\n - fracw_s2frac1p_sleft(fracpartial p_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial p_spartial zright)\n + fracw_s2frac1n_sleft(fracpartial n_spartial t\n + left(v_mathrmthsw_s\n + u_sright)fracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n\n + fracv_mathrmthsn_s S_s \n\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + frac3g_s2n_sfracpartial n_spartial t\n - fracg_s2p_sfracpartial p_spartial t \n + left-frac1v_mathrmthsleft(fracn_sn_sfracpartial u_spartial t\n + fracn_sn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial u_spartial z\n + fracu_sn_sleft(fracpartial npartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial npartial zright)\n + fracq_s2fracpartialphipartial zright)\n + fracu_sn_sv_mathrmthsleft(fracpartial npartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial npartial zright)\n - fracw_s2frac1p_sleft(fracpartial p_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial p_spartial zright)\n + fracw_s2frac1n_sleft(fracpartial n_spartial t\n + left(v_mathrmthsw_s\n + u_sright)fracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n\n + fracv_mathrmthsn_s S_s \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + frac3g_s2n_sfracpartial n_spartial t\n - fracg_s2p_sfracpartial p_spartial t \n + left-frac1n_sv_mathrmthsleft(fracpartial n_su_spartial t\n + left(v_mathrmthsw_s + u_sright)left(n_sfracpartial u_spartial z\n + u_sfracpartial n_spartial zright)\n + fracq_s2n_sfracpartialphipartial zright)right \n qquad + fracu_sn_sv_mathrmthsleft(fracpartial n_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial n_spartial zright)\n - fracw_s2frac1p_sleft(fracpartial p_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial p_spartial zright) \n qquad left+ fracw_s2frac1n_sleft(fracpartial n_spartial t\n + left(v_mathrmthsw_s\n + u_sright)fracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n\n + fracv_mathrmthsn_s S_s\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"So then if we use the moment equations we can rewrite the DKE as","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + frac3g_s2n_sfracpartial n_spartial t\n - fracg_s2p_sfracpartial p_spartial t \n + left-frac1n_sv_mathrmthsleft(fracpartial n_su_spartial t\n + u_sleft(n_sfracpartial u_spartial z\n + u_sfracpartial n_spartial zright)\n - frac12n_sE_\n + v_mathrmthsw_sleft(n_sfracpartial u_spartial z\n + u_sfracpartial n_spartial zright)right)right \n qquad + fracu_sn_sv_mathrmthsleft(fracpartial n_spartial t\n + u_sfracpartial n_spartial z\n + v_mathrmthsw_sfracpartial n_spartial zright) \n qquad-fracw_s2frac1p_sleft(fracpartial p_spartial t\n + u_sfracpartial p_spartial z\n + v_mathrmthsw_sfracpartial p_spartial zright) \n qquadleft + fracw_s2frac1n_sleft(fracpartial n_spartial t\n + u_sfracpartial n_spartial z\n + v_mathrmthsw_sfracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n\n + fracv_mathrmthsn_s S_s \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + frac3g_s2n_sleft(pm R_mathrmionn_in_n + int dv_parallel S_s\n - u_sfracpartial n_spartial z\n - n_sfracpartial u_spartial zright) \n -fracg_s2p_sleft(-u_sfracpartial p_spartial z\n - fracpartial q_spartial z\n - 3p_sfracpartial u_spartial z\n - R_ssleft(n_sp_s - n_sp_s\n - m_sn_sn_sleft(u_s - u_sright)^2right)\n pm R_mathrmionn_ileft(p_n + m_sn_nleft(u_n - u_sright)^2right)\n + int dv_parallel v_parallel^2 S_s + u_s^2 int dv_parallel S_s right) \n + left-frac1n_sv_mathrmthsleft(-underbracecanceln_su_sfracpartial u_spartial z_A\n - fracpartial p_spartial z\n + R_ssn_sn_sleft(u_s - u_sright)\n pm R_mathrmionn_in_nu_n\n + v_mathrmthsw_sleft(underbracecanceln_sfracpartial u_spartial z_B\n + underbracecancelu_sfracpartial n_spartial z_Cright)right)right \n quad + fracu_sn_sv_mathrmthsleft(pm R_mathrmionn_in_n + int dv_parallel S_s\n - underbracecanceln_sfracpartial u_spartial z_A\n + underbracecancelv_mathrmthsw_sfracpartial n_spartial z_Cright) \n quad-fracw_s2frac1p_sleft(-fracpartial q_spartial z\n - underbracecancel3p_sfracpartial u_spartial z_B\n - R_ssleft(n_sp_s - n_sp_s\n - m_sn_sn_sleft(u_s - u_sright)^2right)\n pm R_mathrmionn_ileft(p_n + m_sn_nleft(u_n\n - u_sright)^2right) + int dv_parallel v_parallel^2 S_s + u_s^2 int dv_parallel S_s\n + v_mathrmthsw_sfracpartial p_spartial zright) \n quadleft + fracw_s2frac1n_sleft(pm R_mathrmionn_in_n + int dv_parallel S_s\n - underbracecanceln_sfracpartial u_spartial z_B\n + v_mathrmthsw_sfracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n\n + fracv_mathrmthsn_s S_s \n\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + frac3g_s2n_sleft(pm R_mathrmionn_in_n + int dv_parallel S_s\n - u_sfracpartial n_spartial z - n_sfracpartial u_spartial zright) \n -fracg_s2p_sleft(-u_sfracpartial p_spartial z\n - fracpartial q_spartial z - 3p_sfracpartial u_spartial z\n - R_ssleft(n_sp_s - n_sp_s\n - m_sn_sn_sleft(u_s - u_sright)^2right)\n pm R_mathrmionn_ileft(p_n + m_sn_nleft(u_n - u_sright)^2right)\n + int dv_parallel v_parallel^2 S_s + u_s^2 int dv_parallel S_sright) \n + left-frac1n_sv_mathrmthsleft(-fracpartial p_spartial z\n + R_ssn_sn_sleft(u_s - u_sright)pm R_mathrmionn_in_nu_nright)right \n quad + fracu_sn_sv_mathrmthsleft(pm R_mathrmionn_in_n + int dv_parallel S_sright) \n quad-fracw_s2frac1p_sleft(-fracpartial q_spartial z\n - R_ssleft(n_sp_s - n_sp_s\n - m_sn_sn_sleft(u_s - u_sright)^2right)\n pm R_mathrmionn_ileft(p_n + m_sn_nleft(u_n\n - u_sright)^2right) + int dv_parallel v_parallel^2 S_s + u_s^2 int dv_parallel S_s\n + v_mathrmthsw_sfracpartial p_spartial zright) \n quadleft + fracw_s2frac1n_sleft(pm R_mathrmionn_in_n + int dv_parallel S_s\n + v_mathrmthsw_sfracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n\n + fracv_mathrmthsn_s S_s\n\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + g_sleft(pmfrac32R_mathrmionn_ifracn_nn_s\n + frac32n_sint dv_parallel S_s\n - frac3u_s2n_sfracpartial n_spartial zright) \n + g_sleft(fracu_s2p_sfracpartial p_spartial z\n + frac12p_sfracpartial q_spartial z\n + frac12p_sR_ssleft(n_sp_s - n_sp_s\n - n_sn_sleft(u_s - u_sright)^2right)\n mpfrac12R_mathrmionfracn_ip_sleft(p_n\n + n_nleft(u_n - u_sright)^2right)\n - frac12p_parallelsint dv_parallel v_parallel^2 S_s - fracu_s^22p_parallelsint dv_parallel S_sright) \n + left-frac1n_sv_mathrmthsleft(-fracpartial p_spartial z\n + R_ssn_sn_sleft(u_s - u_sright)\n pm R_mathrmionn_in_nleft(u_n - u_sright) - u_sint dv_parallel S_sright)right \n quad-fracw_s2frac1p_sleft(-fracpartial q_spartial z\n - R_ssleft(n_sp_s - n_sp_s\n - n_sn_sleft(u_s - u_sright)^2right)\n + int dv_parallel v_parallel^2 S_s + u_s^2 int dv_parallel S_s\n + v_mathrmthsw_sfracpartial p_spartial zright) \n quadmpfracw_s2R_mathrmionn_ileft(fracp_np_s\n - fracn_nn_s + fracn_np_sleft(u_n - u_sright)^2right) \n quadleft + fracw_s2frac1n_sleft(int dv_parallel S_s + v_mathrmthsw_sfracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n + fracv_mathrmthsn_s S_s\nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"and finally using","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n fracu_sv_mathrmthsfracpartial v_mathrmthspartial z\n =u_ssqrtfracn_sp_sfracpartialpartial zsqrtfracp_sn_s \n = fracu_s2left(frac1p_sfracpartial p_spartial z\n - frac1n_sfracpartial n_spartial zright)\nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"gives","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + left(pmfrac32R_mathrmionn_ifracn_nn_s\n + frac32n_s int dv_parallel S_s\n - fracu_sn_sfracpartial n_spartial zright)g_s \n + left(fracu_sv_mathrmthsfracpartial v_mathrmthspartial z\n + frac12p_sfracpartial q_spartial zright \n qquad + frac12p_sR_ssleft(n_sp_s - n_sp_s\n - n_sn_sleft(u_s - u_sright)^2right) \n qquad leftmpfrac12R_mathrmionfracn_ip_sleft(p_n\n + n_nleft(u_n - u_sright)^2right)\n - frac12p_parallelsint dv_parallel v_parallel^2 S_s - fracu_s^22p_parallelsint dv_parallel S_sright)g_s \n + left-frac1n_sv_mathrmthsleft(-fracpartial p_spartial z\n + R_ssn_sn_sleft(u_s - u_sright)\n pm R_mathrmionn_in_nleft(u_n - u_sright) - u_sint dv_parallel S_sright)right \n qquad-fracw_s2frac1p_sleft(-fracpartial q_spartial z\n - R_ssleft(n_sp_s - n_sp_s\n - n_sn_sleft(u_s - u_sright)^2right)\n + int dv_parallel v_parallel^2 S_s + u_s^2 int dv_parallel S_s\n + v_mathrmthsw_sfracpartial p_spartial zright) \n qquadmpfracw_s2R_mathrmionn_ileft(fracp_np_s\n - fracn_nn_s + fracn_np_sleft(u_n - u_sright)^2right) \n qquadleft + fracw_parallels2frac1n_sint dv_parallel S_s\n + fracw_s^22fracv_mathrmthsn_sfracpartial n_spartial zrightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n + fracv_mathrmthsn_s S_s\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"Writing out the final result fully for ions","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial g_ipartial t\n + fracv_mathrmthin_ileft(v_mathrmthiw_i\n + u_iright)fracpartial f_ipartial z\n + left(frac32R_mathrmionn_n + frac32n_iint dv_parallel S_i\n - fracu_in_ifracpartial n_ipartial zright)g_i \n + left(fracu_iv_mathrmthifracpartial v_mathrmthipartial z\n + frac12p_ifracpartial q_ipartial zright \n qquad + frac12p_iR_inleft(n_np_i - n_ip_n\n - n_in_nleft(u_i - u_nright)^2right) \n qquad left - frac12R_mathrmionfracn_ip_ileft(p_n\n + n_nleft(u_n - u_iright)^2right)\n - frac12p_paralleliint dv_parallel v_parallel^2 S_i - fracu_i^22p_paralleliint dv_parallel S_iright)g_i \n + left-frac1n_iv_mathrmthileft(-fracpartial p_ipartial z\n + R_inn_in_nleft(u_n - u_iright)\n + R_mathrmionn_in_nleft(u_n - u_iright) - u_iint dv_parallel S_iright)right \n qquad-fracw_i2frac1p_ileft(-fracpartial q_ipartial z\n - R_inleft(n_np_i - n_ip_n\n - n_in_nleft(u_i - u_nright)^2right)\n + int dv_parallel v_parallel^2 S_i + u_i^2 int dv_parallel S_i\n + v_mathrmthiw_ifracpartial p_ipartial zright) \n qquad - fracw_i2R_mathrmionn_ileft(fracp_np_i\n - fracn_nn_i + fracn_np_ileft(u_n - u_iright)^2right) \n qquadleft + fracw_paralleli2 frac1n_iint dv_parallel S_i\n + fracw_i^22fracv_mathrmthin_ifracpartial n_ipartial zrightfracpartial g_ipartial w_i \n = -R_inn_nleft(g_i - fracv_mathrmthiv_mathrmthng_nright)\n + R_mathrmionv_mathrmthifracn_nv_mathrmthng_n + fracv_mathrmthin_i S_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"and for neutrals where several of the ionization terms cancel","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n Rightarrow fracpartial g_npartial t\n + fracv_mathrmthnn_nleft(v_mathrmthnw_n\n + u_nright)fracpartial f_npartial z\n + left(-frac32R_mathrmionn_i + frac32n_nint dv_parallel S_n\n - fracu_nn_nfracpartial n_npartial zright)g_n \n + left(fracu_nv_mathrmthnfracpartial v_mathrmthnpartial z\n + frac12p_nfracpartial q_npartial zright \n qquad left + frac12p_nR_inleft(n_ip_n - n_np_i\n - n_nn_ileft(u_n - u_iright)^2right)\n + frac12R_mathrmionn_i\n - frac12p_parallelnint dv_parallel v_parallel^2 S_n - fracu_n^22p_parallelnint dv_parallel S_nright)g_n \n + left-frac1n_nv_mathrmthnleft(-fracpartial p_npartial z\n + R_inn_nn_ileft(u_i - u_nright) - u_nint dv_parallel S_nright)right \n qquad-fracw_n2frac1p_nleft(-fracpartial q_npartial z\n - R_inleft(n_ip_n - n_np_i\n - n_nn_ileft(u_n - u_iright)^2right)\n + int dv_parallel v_parallel^2 S_n + u_n^2int dv_parallel S_n\n + v_mathrmthnw_nfracpartial p_npartial zright) \n qquadleft + fracw_paralleln2frac1n_nint dv_parallel S_n\n + fracw_n^22fracv_mathrmthnn_nfracpartial n_npartial zrightfracpartial g_npartial w_n \n = -R_inn_ileft(g_n - fracv_mathrmthnv_mathrmthig_iright)\n - R_mathrmionn_ig_n + fracv_mathrmthnn_n S_n\nendalign","category":"page"},{"location":"zz_ionization/#ionization","page":"ionization","title":"ionization","text":"","category":"section"},{"location":"zz_ionization/","page":"ionization","title":"ionization","text":"Modules = [moment_kinetics.ionization]","category":"page"},{"location":"zz_ionization/#moment_kinetics.ionization","page":"ionization","title":"moment_kinetics.ionization","text":"\n\n\n\n","category":"module"},{"location":"zz_moment_kinetics_input/#moment_kinetics_input","page":"moment_kinetics_input","title":"moment_kinetics_input","text":"","category":"section"},{"location":"zz_moment_kinetics_input/","page":"moment_kinetics_input","title":"moment_kinetics_input","text":"Modules = [moment_kinetics.moment_kinetics_input]","category":"page"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input","text":"\n\n\n\n","category":"module"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input.check_coordinate_input-Tuple{Any, Any, Any}","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input.check_coordinate_input","text":"Check input for a coordinate\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input.check_input-NTuple{14, Any}","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input.check_input","text":"check various input options to ensure they are all valid/consistent\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input.check_input_initialization-Tuple{Any, Any, Any}","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input.check_input_initialization","text":"\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input.check_input_time_advance-Tuple{Any, Any, Any}","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input.check_input_time_advance","text":"\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input.mk_input","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input.mk_input","text":"Process user-supplied inputs\n\nsave_inputs_to_txt should be true when actually running a simulation, but defaults to false for other situations (e.g. when post-processing).\n\nignore_MPI should be false when actually running a simulation, but defaults to true for other situations (e.g. when post-processing).\n\n\n\n\n\n","category":"function"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input.read_input_file-Tuple{String}","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input.read_input_file","text":"Read input from a TOML file\n\n\n\n\n\n","category":"method"},{"location":"developing/#Developing","page":"Developing","title":"Developing","text":"","category":"section"},{"location":"developing/#Dependencies","page":"Developing","title":"Dependencies","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"If you need to add a dependency, start the REPL with the moment_kinetics package activated (see above), enter pkg> mode (press ]) and then to add, for example, the FFTW.jl package enter","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"(moment_kinetics) pkg> add FFTW","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"This should take care of adding the package (FFTW) to the Project.toml and Manifest.toml files.","category":"page"},{"location":"developing/#Revise.jl","page":"Developing","title":"Revise.jl","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"When working on the code, one way to avoid waiting for everything to recompile frequently is to load the Revise.jl package","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"julia> using Revise","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Revise.jl will recompile each edited function/method as needed, so it is possible to keep a REPL session open and avoid long recompilation. moment_kinetics can be run fairly conveniently from the REPL","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"julia> using moment_kinetics\njulia> run_moment_kinetics(input)","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"where input is a Dict() containing any non-default options desired. Input can also be loaded from a TOML file passing the filaname as a String to the second argument, e.g.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"julia> run_moment_kinetics(\"input.toml\")","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"It might be convenient to add using Revise to your startup.jl file (~/julia/config/startup.jl) so it's always loaded.","category":"page"},{"location":"developing/#Input-options-and-defaults","page":"Developing","title":"Input options and defaults","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"The input is read from a .toml file. It is also written to the output HDF5 (or NetCDF) file, after all defaults are applied, both as a TOML-formatted String and as a tree of HDF5 variables.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"warning: Warning\nNeither TOML nor HDF5 have a 'null' type, so there is no convenient way to store Julia's nothing when writing to TOML or HDF5. Therefore nothing should not be used as a default for any input option. If the code should use nothing as a default for some setting, that is fine, but must be done after the input is read, and not stored in the input_dict.","category":"page"},{"location":"developing/#Array-types","page":"Developing","title":"Array types","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"Most arrays in moment_kinetics are declared using a custom array type moment_kinetics.communication.MPISharedArray. Most of the time this type is just an alias for Array, and so it needs the same template parameters (see Julia's Array documentation) - the data type and the number of dimensions, e.g. MPISharedArray{mk_float,3}. Although these arrays use shared memory, Julia does not know about this. We use MPI.Win_allocate_shared() to allocate the shared memory, then wrap it in an Array in moment_kinetics.communication.allocate_shared.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The reason for using the alias, is that when the shared-memory debugging mode is activated, we instead create arrays using a type DebugMPISharedArray, which allows us to track some debugging information along with the array, see Shared memory debugging, and make MPISharedArray an alias for DebugMPISharedArray instead. The reason for the alias is that if we declared our structs with just Array type, then when debugging is activated we would not be able to store DebugMPISharedArray instances in those structs, and if we declared the structs with AbstractArray, they would not be concretely typed, which could impact performance by creating code that is not 'type stable' (i.e. all concrete types are known at compile time).","category":"page"},{"location":"developing/#Parallelization","page":"Developing","title":"Parallelization","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"The code is parallelized at the moment using MPI and shared-memory arrays. Arrays representing the pdf, moments, etc. are shared between all processes. Using shared memory means, for example, we can take derivatives along one dimension while parallelising the other for any dimension without having to communicate to re-distribute the arrays. Using shared memory instead of (in future as well as) distributed memory parallelism has the advantage that it is easier to split up the points within each element between processors, giving a finer-grained parallelism which should let the code use larger numbers of processors efficiently.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"It is possible to use a REPL workflow with parallel code:","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Recommended option is to use tmpi. This utility (it's a bash script that uses tmux) starts an mpi program with each process in a separate pane in a single terminal, and mirrors input to all processes simultaneously (which is normally what you want, there are also commands to 'zoom in' on a single process).\nAnother 'low-tech' possibilty is to use something like mpirun -np 4 xterm -e julia --project, but that will start each process in a separate xterm and you would have to enter commands separately in each one. Occasionally useful for debugging when nothing else is available.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"There is no restriction on the number of processes or number of grid points, although load-balancing may be affected - if there are only very few points per process, and a small fraction of processes have an extra grid point (e.g. splitting 5 points over 4 processes, so 3 process have 1 point but 1 process has 2 points), many processes will spend time waiting for the few with an extra point.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Parallelism is implemented through macros that get the local ranges of points that each process should handle. The inner-most level of nested loops is typically not parallelized, to allow efficient FFTs for derivatives, etc. A loop over one (possibly parallelized) dimension can be written as, for example,","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"@loop_s is begin\n f[is] = ...\nend","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"These macros can be nested as needed for relatively complex loops","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"@loop_s is begin\n some_setup(is)\n @loop_z iz begin\n @views do_something(f[:,iz,is])\n end\n @loop_z iz begin\n @views do_something_else(f[:,iz,is])\n end\nend","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Simpler nested loops can (optionally) be written more compactly","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"@loop_s_z_vpa is iz ivpa begin\n f[ivpa,iz,is] = ...\nend","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Which dimensions are actually parallelized by these macros is controlled by the 'region' that the code is currently in, as set by the begin__region() functions, where are the dimensions that will be parallelized in the following region. For example, after calling begin_s_z_region() loops over species and z will be divided up over the processes in a 'block' (currently there is only one block, which contains the whole grid and all the processes being used, as we have not yet implemented distributed-memory parallelism). Every process will loop over all points in the remaining dimensions if the loop macros for those dimensions are called.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The recommended place to put begin_*_region() calls is at the beginning of a function whose contents should use loops parallelised according to the settings for that region.\nEach begin_*_region() function checks if the region it would set is already active, and if so returns immediately (doing nothing). This means that begin_*_region() can (and should) be used to mark a block of code as belonging to that region, and if moment_kinetics is already in that region type, the call will have essentially zero cost.\nIn some places it may be necessary to change the region type half way through a function, etc. This is fine.\nWhen choosing which region type to select, note that all 'parallelised dimensions' must be looped over for each operation (otherwise some points may be written more than once), unless some special handling is used (e.g. species dimension s is parallelised, but a conditional like if 1 in loop_ranges[].s is wrapped around code to be executed so that only processes which should handle the point at s=1 do anything). It may be more optimal in some places to choose region types that do not parallelise all possible dimensions, to reduce the number of synchronisations that are needed.\nAs a matter of style, it is recommended to place begin_*_region() calls within functions where the loops are (or at most one level above), so that it is not necessary to search back along the execution path of the code to find the most recent begin_*_region() call, and therefore know what region type is active.\nIn a region after begin_serial_region(), the rank 0 process in each block will loop over all points in every dimension, and all other ranks will not loop over any.\nInside serial regions, the macro @serial_region can also be used to wrap blocks of code so that they only run on rank 0 of the block. This is useful for example to allow the use of array-broadcast expressions during initialization where performance is not critical.\nTo help show how these macros work, a script is provided that print a set of examples where the loop macros are expanded. It can be run from the Julia REPL\n$ julia --project\n _\n _ _ _(_)_ | Documentation: https://docs.julialang.org\n (_) | (_) (_) |\n _ _ _| |_ __ _ | Type \"?\" for help, \"]?\" for Pkg help.\n | | | | | | |/ _` | |\n | | |_| | | | (_| | | Version 1.7.0 (2021-11-30)\n _/ |\\__'_|_|_|\\__'_| | Official https://julialang.org/ release\n|__/ |\n\njulia> include(\"util/print-macros.jl\")\nor on the command line\n$ julia --project util/print-macros.jl","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The ranges used are stored in a LoopRanges struct in the Ref variable loop_ranges (which is exported by the looping module). The range for each dimension is stored in a member with the same name as the dimension, e.g. loop_ranges[].s for the species. Occasionally it is useful to access the range directly. There are different LoopRanges instances for different parallelization patterns - the instance stored in loop_ranges is updated when begin_*_region() is called. It is possible to find out the current region type (i.e. which dimensions are being parallelized) by looking at loop_ranges[].parallel_dims.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"note: Note\nThe square brackets [] after loop_ranges[] are needed because loop_ranges is a reference to a LoopRanges object Ref{LoopRanges} (a bit like a pointer) - it allows loop_ranges to be a const variable, so its type is always known at compile time, but the actual LoopRanges can be set/modified at run-time.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"It is also possible to run a block of code in serial (on just the rank-0 member of each block of processes) by wrapping it in a @serial_region macro. This is mostly useful for initialization or file I/O where performance is not critical. For example","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"@serial_region begin\n # Do some initialization\n f .= 0.0\nend","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Internally, when the begin_*_region() functions need to change the region type (i.e. the requested region is not already active), they call _block_synchronize(), which calls MPI.Barrier(). They also switch over the LoopRanges struct contained in looping.loop_ranges as noted above. For optimization, the _block_synchronize() call can be skipped - when it is correct to do so - by passing the argument no_synchronize=true (or some more complicated conditional expression if synchronization is necessary when using some options but not for others).","category":"page"},{"location":"developing/#Collision-operator-and-anyv-region","page":"Developing","title":"Collision operator and anyv region","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"The Fokker-Planck collision operator requires a special approach to shared-memory parallelisation. There is an outer loop over spatial points (and potentially over species). Inside that outer loop there are operations that can benefit from parallelisation over v_perp, or over v_parallel, or over both v_perp and v_parallel, as well as some that do not parallelise over velocity space at all. To deal with this, it is beneficial to parallelise the outer loop over species and spatial dimensions as much as possible, and then within that allow changes between different ways of parallelizing over velocity space.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The mechanism introduced to allow the type of parallelization just described is the 'anyv' (read any-v) region. Before the outer loop of the collision operator begin_s_r_z_anyv_region() is used to start the 'anyv' parallelization. Then within the @loop is ir iz begin... the functions begin_anyv_region() (for no parallelization over velocity space), begin_anyv_vperp_region(), begin_anyv_vpa_region() and begin_anyv_vperp_vpa_region() can be used to parallelize over neither velocity space dimension, either velocity space dimension individually, or over both velocity space dimensions together. This is possible because 'subblocks' of processes are defined. Each subblock shares the same range of species and spatial indices, which stay the same throughout the begin_s_r_z_anyv_region() section, and are not shared with any other subblock of processes. Because the subblock has an independent set of species- and spatial-indices, when changing the velocity-space parallelization only the processes in the sub-block need to be synchronized which is done by moment_kinetics.communication._anyv_subblock_synchronize, which is called when necessary within the begin_anyv*_region() functions (the whole shared-memory block does not need to be synchronized at once, as would be done by moment_kinetics.communication._block_synchronize). The processes that share an anyv subblock are all part of the comm_anyv_subblock[] communicator (which is a subset of the processes in the full block, whose communicator is comm_block[]).","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"See also notes on debugging the 'anyv' parallelisation: Collision operator and 'anyv' region.","category":"page"},{"location":"developing/#Package-structure","page":"Developing","title":"Package structure","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"The structure of the packages in the moment_kinetics repo is set up so that some features, which depend on 'heavy' external packages (such as Makie, Plots, and Symbolics, which take a long time to precompile and load) can be optional.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The structure is set up by the machines/machine_setup.sh script, which prompts the user for input to decide which optional components to include (as well as some settings related to batch job submission on HPC clusters). machine_setup.sh calls several other scripts to do the setup (written as far as possible in Julia). The structure of these scripts is explained in machine_setup notes.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The intention is that a top-level 'project' (defined by a Project.toml file, which is created and populated by machines/machine_setup.sh) is set up in the top-level directory of the repository. The moment_kinetics package itself (which is in the moment_kinetics/ subdirectory, defined by its own Project.toml file which is tracked by git), and optionally other post-processing packages, are added to this top-level project using Pkg.develop().","category":"page"},{"location":"developing/#Optional-dependencies","page":"Developing","title":"Optional dependencies","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"Some capabilities that require optional dependencies are provided using 'package extensions' (a new feature of Julia in v1.9.0).","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The way we use package extensions is a bit of a hack. Extensions are intended to be activated when an optional dependency (called a 'weakdep' by Julia) is loaded, e.g. using moment_kinetics, NCDatasets. This usage pattern is not the most convenient for the way we use moment_kinetics where we would rather just load moment_kinetics and then specify for example binary_format = \"netcdf\" in the input TOML file. To work around this, the optional dependencies are loaded automatically if they are installed (by calling Base.requires() in the __init__() function of an appropriate sub-module). This is not the way package extensions were intended to be used, and it may be a bit fragile - at the time of writing in January 2024 there would be an error on precompilation if the optional dependencies were added in one order, which went away when the order was reversed. If this causes problems, we might need to consider an alternative, for example adding the optional dependencies to the startup.jl file, instead of trying to auto-load them from within the moment_kinetics package.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The optional capabilities at the moment are:","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Method of manufactured solutions (MMS) testing - this requires the Symbolics package which is heavy and has a large number of dependencies. It is convenient not to require Symbolics when MMS capability is not being used. The functionality is provided by the manufactured_solns_ext extension. The extension also requires the IfElse package, which is not needed elsewhere in moment_kinetics and so is included as a 'weakdep' although IfElse is not a heavy dependency.\nNetCDF output - this requires the NCDatasets package. Although not as heavy as Symbolics or the plotting packages, NetCDF output is not required and not used by default, so it does not hurt to make the dependency optional. As a bonus, importing NCDatasets can sometimes cause linking errors when a local or system installation of HDF5 (i.e. one not provided by the Julia package manager) is used, as NCDatasets (sometimes?) seems to try to link a different version of the library. These errors can be avoided by not enabling NetCDF outut (when HDF5 output is preferred), or allowing Julia to use the HDF5 library provided by its package manager (when NetCDF is preferred, although this would mean that parallel I/O functionality is not available).","category":"page"},{"location":"developing/#Post-processing-packages","page":"Developing","title":"Post processing packages","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"Post processing functionality is provided by separate packages (makie_post_processing and plots_post_processing) rather than by extensions. Extensions are not allowed to define new modules, functions, etc. within the main package, they can only add new methods (i.e. new implementations of the function for a different number of arguments, or different types of the arguments) to functions already defined in the main package. For post-processing, we want to add a lot of new functions, so to use extensions instead of separate packages we would need to define all the function names in the main package, and then separately the implementations in the extension, which would be inconvenient and harder to maintain.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"There are two suggested ways of setting up the post-processing packages:","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"For interactive use/development on a local machine, one or both post-processing packages can be added to the top-level project using Pkg.develop(). This is convenient as there is only one project to deal with. Both simulations and post-processing are run using\n$ bin/julia --project -O3 <...>\nFor optimized use on an HPC cluster it is better to set up a separate project for the post-processing package(s). This allows different optimization flags to be used for running simulations (-O3 --check-bounds=no) and for post-processing (-O3). [Note, in particular Makie.jl can have performance problems if run with --check-bounds=no, see here.] Simulations should be run with\n$ bin/julia --project -O3 --check-bounds=no <...>\nand post-processing with\n$ bin/julia --project=makie_post_processing -O3 <...>\nor\n$ bin/julia --project=plots_post_processing -O3 <...>\nThis option can also be used on a local machine, if you want to optimise your simulation runs as much as possible by using the --check-bounds=no flag. To do this answer y to the prompt \"Would you like to set up separate packages for post processing...\" from machines/machine_setup.sh.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"To support option 2, the post-processing packages are located in sub-sub-directories (makie_post_processing/makie_post_processing/ and plots_post_processing/plots_post_processing/), so that the separate projects can be created in the sub-directories (makie_post_processing/ and plots_post_processing). moment_kinetics and the other dependencies must also be added to the separate projects (the machine_setup.sh script takes care of this).","category":"page"},{"location":"parameter_scans/#Parameter-scans","page":"Parameter scans","title":"Parameter scans","text":"","category":"section"},{"location":"parameter_scans/#Running-a-scan","page":"Parameter scans","title":"Running a scan","text":"","category":"section"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"Parameter scans can be run using the run_parameter_scan.jl script. To run from the REPL","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"$ julia -p 8 --project -O3\njulia> include(\"run_parameter_scan.jl\")\njulia> run_parameter_scan(\"path/to/an/input/file.toml\")","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"or to run a single scan from the command line","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"$ julia -p 8 --project -O3 run_parameter_scan.jl path/to/an/input/file.toml","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"The -p 8 argument passed to julia in these examples is optional. It indicates that julia should use 8 processes for parallelism. In this case we are not using MPI - each run in the scan is run in serial, but up to 8 (in this example) runs from the scan can be performed simultaneously (using the @distributed macro).","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"The runs can use MPI - in this case call julia using mpirun, etc. as usual but do not pass the -p argument. Mixing MPI and @distributed would cause oversubscription and slow everything down. The runs will run one after the other, and each run will be MPI parallelised.","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"The inputs (see moment_kinetics.parameter_scans.get_scan_inputs) can be passed to the function in a Dict, or read from a TOML file.","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"run_parameter_scan can also be passed a directory (either as an argument to the function or from the command line), in which case it will perform a run for every input file contained in that directory.","category":"page"},{"location":"parameter_scans/#Post-processing-a-scan","page":"Parameter scans","title":"Post processing a scan","text":"","category":"section"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"makie_post_processing.makie_post_process can be called for each run in a scan. For example to post process the scan in runs/scan_example from the REPL","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"$ julia -p 8 --project -O3\njulia> include(\"post_process_parameter_scan.jl\")\njulia> post_process_parameter_scan(\"runs/scan_example/\")","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"or to from the command line","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"$ julia -p 8 --project -O3 post_process_parameter_scan.jl runs/scan_example/","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"Again the -p 8 argument passed to julia in these examples is optional. It indicates that julia should use 8 processes for parallelism. Each run in the scan is post-processed in serial, but up to 8 (in this example) runs from the scan can be post-processed simultaneously (using the @distributed macro).","category":"page"},{"location":"parameter_scans/#API","page":"Parameter scans","title":"API","text":"","category":"section"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"Modules = [moment_kinetics.parameter_scans]","category":"page"},{"location":"parameter_scans/#moment_kinetics.parameter_scans.generate_scan_input_files","page":"Parameter scans","title":"moment_kinetics.parameter_scans.generate_scan_input_files","text":"generate_scan_input_files(filename::AbstractString, dirname=nothing)\n\nRead inputs for a scan from a TOML file and call generate_scan_input_files(scan_input::AbstractDict, dirname::AbstractString).\n\nBy default, dirname will be set to filename with the .toml extension removed.\n\n\n\n\n\n","category":"function"},{"location":"parameter_scans/#moment_kinetics.parameter_scans.generate_scan_input_files-Tuple{AbstractDict, AbstractString}","page":"Parameter scans","title":"moment_kinetics.parameter_scans.generate_scan_input_files","text":"generate_scan_input_files(scan_input::AbstractDict, dirname::AbstractString)\n\nGenerate individual input files for each run in the scan specified by scan_input, saving the generated files in dirname\n\nInputs are generated by calling get_scan_inputs(scan_inputs::AbstractDict).\n\n\n\n\n\n","category":"method"},{"location":"parameter_scans/#moment_kinetics.parameter_scans.get_scan_inputs-Tuple{AbstractDict}","page":"Parameter scans","title":"moment_kinetics.parameter_scans.get_scan_inputs","text":"get_scan_inputs(scan_inputs::AbstractDict)\n\nMake a set of inputs for a parameter scan.\n\nscan_inputs is like a Dict of inputs for run_moment_kinetics, except that any value may be an array instead of a scalar. The values passed as arrays will be combined as follows.\n\nA special, extra, setting combine_outer can be passed, with the names of options to combine using an 'outer product'\n\nBy default, inputs are combined with an 'inner product', i.e. inputs a,b,c are combined as (a[1],b[1],c[1]), (a[2],b[2],c[2]), etc. Any inputs named in 'combine_outer' are instead combined with an 'outer product', i.e. an entry is created for every value of those inputs combined with every combination of the other inputs.\n\nReturns a Vector{OrderedDict} whose entries are the input for a single run in the parameter scan.\n\n\n\n\n\n","category":"method"},{"location":"parameter_scans/#moment_kinetics.parameter_scans.get_scan_inputs-Tuple{AbstractString}","page":"Parameter scans","title":"moment_kinetics.parameter_scans.get_scan_inputs","text":"get_scan_inputs(file_or_dir::AbstractString)\n\nIf file_or_dir is a file, read input from it using TOML , and call get_scan_inputs(scan_inputs::AbstractDict).\n\nIf file_or_dir is a directory, read input from all the .toml files in the directory, returning the inputs as a Vector{OrderedDict}.\n\n\n\n\n\n","category":"method"},{"location":"parameter_scans/#moment_kinetics.parameter_scans.get_scan_inputs-Tuple{}","page":"Parameter scans","title":"moment_kinetics.parameter_scans.get_scan_inputs","text":"get_scan_inputs()\n\nGet input file name from command line options, and call get_scan_inputs(filename::AbstractString)\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics/#moment_kinetics","page":"moment_kinetics","title":"moment_kinetics","text":"","category":"section"},{"location":"zz_moment_kinetics/","page":"moment_kinetics","title":"moment_kinetics","text":"Modules = [moment_kinetics.moment_kinetics]","category":"page"},{"location":"zz_moment_kinetics/#moment_kinetics.moment_kinetics","page":"moment_kinetics","title":"moment_kinetics.moment_kinetics","text":"\n\n\n\n","category":"module"},{"location":"zz_moment_kinetics/#moment_kinetics.check_so_newer_than_code","page":"moment_kinetics","title":"moment_kinetics.check_so_newer_than_code","text":"check_so_newer_than_code(so_filename=nothing)\n\nUtility function that checks if so_filename is newer than the source code in moment_kinetics/src. If it is, prints an error message and returns false; otherwise returns true.\n\nIf so_filename is nothing, use the name of the system image of the current julia session for so_filename.\n\nIf so_filename is \"makie_postproc.so\", also checks against the source code in makie_post_processing/makie_post_processing/src/.\n\nIf so_filename is \"plots_postproc.so\", also checks against the source code in plots_post_processing/plots_post_processing/src/.\n\n\n\n\n\n","category":"function"},{"location":"zz_moment_kinetics/#moment_kinetics.cleanup_moment_kinetics!-Tuple{Any, Any, Any}","page":"moment_kinetics","title":"moment_kinetics.cleanup_moment_kinetics!","text":"Clean up after a run\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics/#moment_kinetics.run_moment_kinetics","page":"moment_kinetics","title":"moment_kinetics.run_moment_kinetics","text":"main function that contains all of the content of the program\n\n\n\n\n\n","category":"function"},{"location":"zz_moment_kinetics/#moment_kinetics.run_moment_kinetics-Tuple{Any}","page":"moment_kinetics","title":"moment_kinetics.run_moment_kinetics","text":"overload with no TimerOutput arguments\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics/#moment_kinetics.run_moment_kinetics-Tuple{Union{Nothing, TimerOutputs.TimerOutput}, String}","page":"moment_kinetics","title":"moment_kinetics.run_moment_kinetics","text":"overload which takes a filename and loads input\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics/#moment_kinetics.run_moment_kinetics-Tuple{}","page":"moment_kinetics","title":"moment_kinetics.run_moment_kinetics","text":"overload which gets the input file name from command line arguments\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics/#moment_kinetics.setup_moment_kinetics-Tuple{AbstractDict}","page":"moment_kinetics","title":"moment_kinetics.setup_moment_kinetics","text":"Perform all the initialization steps for a run.\n\nIf backup_filename is nothing, set up for a regular run; if a filename is passed, reload data from time index given by restart_time_index for a restart.\n\ndebug_loop_type and debug_loop_parallel_dims are used to force specific set ups for parallel loop ranges, and are only used by the tests in debug_test/.\n\n\n\n\n\n","category":"method"},{"location":"wall_boundary_conditions/#Wall-boundary-conditions-with-moment-constraints","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"","category":"section"},{"location":"wall_boundary_conditions/#Ions","page":"Wall boundary conditions with moment constraints","title":"Ions","text":"","category":"section"},{"location":"wall_boundary_conditions/#Boundary-conditions","page":"Wall boundary conditions with moment constraints","title":"Boundary conditions","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"The sheath-edge boundary conditions for the ions is that no ions leave from the sheath edge. So at the lower boundary z=-L_z2","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n f(z=-L2v_parallel0) = 0\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"and at the upper boundary z=L_z2","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n f(z=L2v_parallel0) = 0\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Moment-constraints","page":"Wall boundary conditions with moment constraints","title":"Moment constraints","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"At the sheath-entrance boundary, the constraints need to be enforced slightly differently to how they are done in the bulk of the domain (see Constraints on normalized distribution function). For compatibility with the boundary condition, the corrections which are added to impose the constraints should go to zero at v_parallel=0. Note that the constraints are imposed after the boundary condition is applied by setting f(v_parallel0)=0 on the lower sheath boundary or f(v_parallel0)=0 on the upper sheath boundary.","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"The form of the correction that we choose is","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\ntildeg_s = Ahatg_s + Bw_parallel fracv_parallel1+v_parallelhatg_s + Cw_parallel^2 fracv_parallel1+v_parallelhatg_s\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"We have the same set of constraints","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n frac1sqrtpiint dw_tildeg_s =1\n frac1sqrtpiint dw_w_tildeg_s =0\n frac1sqrtpiint dw_w_^2tildeg_s =frac12\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"Defining the integrals","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n I_n=frac1sqrtpiint dw_w_^nhatg_s\n J_n=frac1sqrtpiint dw_w_^nfracv_parallel1+v_parallelhatg_s\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"We can write the constraints as","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n frac1sqrtpiint dw_tildeg_s=1 =frac1sqrtpiint dw_left(Ahatg_s+Bw_fracv_parallel1+v_parallelhatg_s+Cw_^2fracv_parallel1+v_parallelhatg_sright) \n =AI_0+BJ_1+CJ_2\n frac1sqrtpiint dw_w_tildeg_s=0 =frac1sqrtpiint dw_left(Aw_hatg_s+Bw_^2fracv_parallel1+v_parallelhatg_s+Cw_^3fracv_parallel1+v_parallelhatg_sright) \n =AI_1+BJ_2+CJ_3\n frac1sqrtpiint dw_w_^2tildeg_s=frac12 =frac1sqrtpiint dw_left(Aw_^2hatg_s+Bw_^3fracv_parallel1+v_parallelhatg_s+Cw_^4fracv_parallel1+v_parallelhatg_sright) \n =AI_2+BJ_3+CJ_4\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"and solving these simultaneous equations","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n C = fracleft( frac12 - A I_2 - B J_3 right)J_4 \n B = -fracA I_1 + C J_3J_2 \n = -fracI_1J_2 A - fracJ_3J_2 left( frac12J_4 - fracI_2J_4 A - fracJ_3J_4 B right) \n left( 1 - fracJ_3^2J_2 J_4 right) B = -fracJ_32 J_2 J_4 + left( fracI_2 J_3J_2 J_4 - fracI_1J_2 right) A \n B = fracleft( fracI_2 J_3J_2 J_4 - fracI_1J_2 right) A - fracJ_32 J_2 J_4left( 1 - fracJ_3^2J_2 J_4 right) \n = fracleft( I_2 J_3 - I_1 J_4 right) A - fracJ_32J_2 J_4 - J_3^2 \n 1 = A I_0 + B J_1 + C J_2 \n = A I_0 + B J_1 + fracJ_2J_4left( frac12 - A I_2 - B J_3 right) \n 1 - fracJ_22 J_4 = left( I_0 - fracI_2 J_2J_4 right) A + left( J_1 - fracJ_2 J_3J_4 right) B \n 1 - fracJ_22 J_4 = left( I_0 - fracI_2 J_2J_4 right) A - fracleft( J_1 - fracJ_2 J_3J_4 right) J_32left( J_2 J_4 - J_3^2 right) + fracleft( J_1 - fracJ_2 J_3J_4 right)left( I_2 J_3 - I_1 J_4 right)left( J_2 J_4 - J_3^2 right) A \n left( 1 - fracJ_22J_4 right) left( J_2 J_4 - J_3^2 right) = left( J_2 J_4 - J_3^2 right) left( I_0 - fracI_2 J_2J_4 right) A - fracleft( J_1 - fracJ_2 J_3J_4 right) J_32 + left( J_1 - fracJ_2 J_3J_4 right) left( I_2 J_3 - I_1 J_4 right) A \n left( 1 - fracJ_22 J_4 right)left( J_2 J_4 - J_3^2 right) + fracleft( J_1 - fracJ_2 J_3J_4 right) J_32 = left left( J_2 J_4 - J_3^2 right)left( I_0 - fracI_2 J_2J_4 right) + left( J_1 - fracJ_2 J_3J_4 right)left( I_2 J_3 - I_1 J_4 right) right A \n J_2 J_4 - fracJ_2^22 - J_3^2 + cancelfracJ_2 J_3^22 J_4 + fracJ_1 J_32 - cancelfracJ_2 J_3^22 J_4 = left I_0 J_2 J_4 - I_2 J_2^2 - I_0 J_3^2 + cancelfracI_2 J_2 J_3^2J_4 + I_2 J_1 J_3 - I_1 J_1 J_4 - cancelfracI_2 J_2 J_3^2J_4 + I_1 J_2 J_3 right A \n J_2 J_4 - fracJ_2^22 + J_3left( fracJ_12 - J_3 right) = left I_0left( J_2 J_4 - J_3^2 right) + I_1left( J_2 J_3 - J_1 J_4 right) + I_2left( J_1 J_3 - J_2^2 right) right A \n A =fracJ_2 J_4 - fracJ_2^22 + J_3left( fracJ_12 - J_3 right)I_0left( J_2 J_4 - J_3^2 right) + I_1 left( J_2 J_3 - J_1 J_4 right) + I_2left( J_1 J_3 - J_2^2 right)\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"
      ","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n C = fracfrac12 - A I_2 - B J_3J_4 \n B = fracfrac12 J_3 + A (I_1 J_4 - I_2 J_3)J_3^2 - J_2 J_4 \n A = fracJ_3^2 - J_2 J_4 + frac12 (J_2^2 - J_1 J_3)I_0 (J_3^2 - J_2 J_4) + I_1 (J_1 J_4 - J_2 J_3) + I_2 (J_2^2 - J_1 J_3)\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Evolving-u_\\parallel","page":"Wall boundary conditions with moment constraints","title":"Evolving u_parallel","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"When evolving only u_parallel and n separately, we only need two constraints. This corresponds to C=0 so that","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n 1 = A I_0 + B J_1 \n 0 = A I_1 + B J_2 \n B = -fracA I_1J_2 \n A I_0 = 1 - B J_1 = 1 + fracA I_1 J_1J_2 \n A = frac1I_0 - fracI_1 J_1J_2\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Evolving-n","page":"Wall boundary conditions with moment constraints","title":"Evolving n","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"When only evolving n separately, the constraint is the same as in the bulk of the domain","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n 1 = AI_0 \n A = frac1I_0\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Neutrals","page":"Wall boundary conditions with moment constraints","title":"Neutrals","text":"","category":"section"},{"location":"wall_boundary_conditions/#Boundary-conditions-2","page":"Wall boundary conditions with moment constraints","title":"Boundary conditions","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"Ions and neutrals that reach the wall are both recycled as neutrals. The neutrals are emitted from the wall with a 'Knudsen cosine' distribution characterised by a specified temperature T_mathrmwall (see Excalibur report TN-05). The Knudsen distribution is given – here assuming that the magnetic field is perpendicular to the wall (so that v_parallel is the velocity normal to the wall) – by","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"f_Kw(v_zetav_rv_z) = frac34pi left(fracm_iT_mathrmwallright)^2 fracv_zsqrtv_zeta^2 + v_r^2 + v_z^2 expleft( -fracm_i(v_zeta^2 + v_r^2 + v_z^2)2T_mathrmwall right)","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"Note that f_Kw is normalised so that it has unit flux int d^3vv_z f_Kw(v_zetav_rv_z) = 1.","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"The boundary condition for the neutrals at the lower target is then (for the neutrals leaving whe wall)","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"f_n(rz=-fracL_z2v_zetav_rv_z0) = Gamma_mathrmlower(r) f_Kw(v_zetav_rv_z)","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"and at the upper target","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"f_n(rz=fracL_z2v_zetav_rv_z0) = Gamma_mathrmupper(r) f_Kw(v_zetav_rv_z)","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"A 'recycling fraction' is included, defined so that a fraction 0 leq R_mathrmrecycle leq 1 of the ions hitting the wall are recycled as neutrals, while the whole flux of neutrals hitting the wall is always recycled. (Recycling the 100% of the neutral flux means that the net flux of neutrals - hitting the wall plus recycled - is R_mathrmrecycle times the ion flux, which makes applying boundary conditions in the moment-kinetic approach simpler, see the next section.) This results in","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n Gamma_mathrmlower(r) = R_mathrmrecycle fracB_zB 2pi int_0^infty dv_perp int_-infty^0 dv_parallel v_parallel f_i(r-L2v_perpv_parallel) \n quad + int dv_zetadv_r int_-infty^0 dv_z v_z f_n(r-L2v_zetav_rv_z) \n Gamma_mathrmupper(r) = R_mathrmrecycle fracB_zB 2pi int_0^infty dv_perp int_0^infty dv_parallel v_parallel f_i(rL2v_perpv_parallel) \n quad + int dv_zetadv_r int_0^infty dv_z v_z f_n(rL2v_zetav_rv_z)\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"For 1D1V, we 'marginalise' – i.e. integrate over v_perp, assuming that v_parallel=v_z (i.e. the magnetic field is perpendicular to the wall so B_zB = 1) – (see Excalibur report TN-08) which gives","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n f_Kw1V(v_parallel) = int dv_zeta dv_r f_Kw(v_zetav_rv_parallel) = 2pi int dv_perpv_perp f_Kw(v_perpv_parallel) \n = 3sqrtpi left(fracm_i2T_mathrmwallright)^32v_parallelmathrmerfcleft(sqrtfracm_i2T_mathrmwallv_parallelright)\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Moment-constraints-2","page":"Wall boundary conditions with moment constraints","title":"Moment constraints","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"When using the moment kinetic approach, we first need to apply a boundary condition to the moments so that the net flux of neutrals leaving the wall matches the recycling fraction R_mathrmrecycle times the flux of ions reaching the wall","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n u_paralleln(z=pm L2) = -R_mathrmrecycle fracn_i(z=pm L2) u_paralleli(z=pm L2)n_n(z=pm L2)\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"Having enforced the boundary condition on the flux, we need to impose that the outgoing neutrals have the shape of a Knudsen cosine distribution, and ensure that the constraints (Constraints on normalized distribution function) are satisfied. To impose three constraints we need three free parameters. Taking as before the updated, incoming part of the neutral distribution function before moment corrections to be","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n hatg_mathrmin(w_parallel) =\n begincases\n H(-w_parallel v_mathrmthn - u_paralleln)hatg(zw_parallel) textat z = -L2 \n H(w_parallel v_mathrmthn + u_paralleln)hatg(zw_parallel) textat z = +L2\n endcases\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"and the shape for the Knudsen distribution to be","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n hatg_Kw(w_parallel) =\n begincases\n H(w_parallel v_mathrmthn + u_paralleln)f_Kw1V(w_parallel v_mathrmthn + u_paralleln) textat z = -L2 \n H(-w_parallel v_mathrmthn - u_paralleln)f_Kw1V(w_parallel v_mathrmthn + u_paralleln) textat z = +L2\n endcases\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"we define the final updated distribution function to be","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n tildeg_n(w_parallel) = N_mathrmout hatg_Kw + N_mathrmin hatg_mathrmin + C w_parallel hatg_mathrmin\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"(note that if we chose to use v_parallel = w_parallel v_mathrmthn + u_paralleln instead of w_parallel in the final term with the C coefficient, this is just a shift by a constant and scale by another constant, so would have the same form, just with different (but equivalent) values of the N_mathrmin and C coefficients).","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"Defining the integrals","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n I_n = int dw_parallel w_parallel^n hatg_mathrmin(w_parallel)\n K_n = int dw_parallel w_parallel^n hatg_Kw(w_parallel)\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"the constraints are","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n frac1sqrtpiint dw_tildeg_n=1 =frac1sqrtpiint dw_left(N_mathrmout hatg_Kw + N_mathrmin hatg_mathrmin + C w_parallel hatg_mathrminright) \n = N_mathrmout K_0 + N_mathrmin I_0 + C I_1 \n frac1sqrtpiint dw_w_tildeg_n=0 =frac1sqrtpiint dw_left(N_mathrmout w_ hatg_Kw + N_mathrmin w_ hatg_mathrmin + C w_parallel^2 hatg_mathrminright) \n = N_mathrmout K_1 + N_mathrmin I_1 + C I_2 \n frac1sqrtpiint dw_w_^2tildeg_n=frac12 =frac1sqrtpiint dw_left(N_mathrmout w_^2 hatg_Kw + N_mathrmin w_^2 hatg_mathrmin + C w_parallel^3 hatg_mathrminright) \n = N_mathrmout K_2 + N_mathrmin I_2 + C I_3\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"which can be solved to find","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n C = fracleft(frac12 - N_mathrmout K_2 - N_mathrmin I_2right)I_3 \n N_mathrmout = fracleft(-N_mathrmin I_1 - C I_2 right)K_1 \n = -fracN_mathrmin I_1K_1 - fracI_2 left(frac12 - N_mathrmout K_2 - N_mathrmin I_2right)K_1 I_3 \n N_mathrmout K_1 I_3 = -N_mathrmin I_1 I_3 - I_2 left(frac12 - N_mathrmout K_2 - N_mathrmin I_2right) \n N_mathrmout = -fracleft(N_mathrmin left(I_1 I_3 - I_2^2right) + frac12 I_2right)left(K_1 I_3 - K_2 I_2right) \n N_mathrmin = fracleft(1 - N_mathrmout K_0 - C I_1right)I_0 \n = fracleft(1 - N_mathrmout K_0right)I_0 - fracC I_1I_0 \n = fracleft(1 - N_mathrmout K_0right)I_0 - fracI_1 left(frac12 - N_mathrmout K_2 - N_mathrmin I_2right)I_0 I_3 \n N_mathrmin I_0 I_3 = left(1 - N_mathrmout K_0right)I_3 - I_1 left(frac12 - N_mathrmout K_2 - N_mathrmin I_2right) \n N_mathrmin left(I_0 I_3 - I_1 I_2right) = I_3 - frac12 I_1 - N_mathrmout left(K_0 I_3 - I_1 K_2right) \n N_mathrmin left(I_0 I_3 - I_1 I_2right) = I_3 - frac12 I_1 + left(K_0 I_3 - I_1 K_2right) fracleft(N_mathrmin left(I_1 I_3 - I_2^2right) + frac12 I_2right)left(K_1 I_3 - K_2 I_2right) \n N_mathrmin left(I_0 I_3 - I_1 I_2right) left(K_1 I_3 - K_2 I_2right) = left(I_3 - frac12 I_1right) left(K_1 I_3 - K_2 I_2right) + left(K_0 I_3 - I_1 K_2right) left(N_mathrmin left(I_1 I_3 - I_2^2right) + frac12 I_2right) \n N_mathrmin left( left(I_0 I_3 - I_1 I_2right) left(K_1 I_3 - K_2 I_2right) - left(K_0 I_3 - I_1 K_2right) left(I_1 I_3 - I_2^2right) right) = left(I_3 - frac12 I_1right) left(K_1 I_3 - K_2 I_2right) + left(K_0 I_3 - I_1 K_2right) frac12 I_2 \n N_mathrmin left( K_0 I_3 left(I_2^2 - I_1 I_3right) + K_1 I_3 left(I_0 I_3 - I_1 I_2right) + K_2 left(cancelI_1 I_2^2 - I_0 I_2 I_3 + I_1^2 I_3 - cancelI_1 I_2^2right)right) = frac12 K_0 I_2 I_3 + K_1 I_3 left(I_3 - frac12 I_1right) + K_2 left(cancelfrac12 I_1 I_2 - I_2 I_3 - cancelfrac12 I_1 I_2 right) \n N_mathrmin left( K_0 left(I_2^2 - I_1 I_3right) + K_1 left(I_0 I_3 - I_1 I_2right) + K_2 left(I_1^2 - I_0 I_2right)right) = frac12 K_0 I_2 + K_1 left(I_3 - frac12 I_1right) - K_2 I_2 \n N_mathrmin = fracleft(frac12 K_0 I_2 + K_1 left(I_3 - frac12 I_1right) - K_2 I_2right)left( K_0 left(I_2^2 - I_1 I_3right) + K_1 left(I_0 I_3 - I_1 I_2right) + K_2 left(I_1^2 - I_0 I_2right)right) \nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"
      ","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n C = fracleft(frac12 - N_mathrmout K_2 - N_mathrmin I_2right)I_3 \n N_mathrmout = -fracleft(N_mathrmin left(I_1 I_3 - I_2^2right) + frac12 I_2right)left(K_1 I_3 - K_2 I_2right) \n N_mathrmin = fracleft(frac12 K_0 I_2 + K_1 left(I_3 - frac12 I_1right) - K_2 I_2right)left( K_0 left(I_2^2 - I_1 I_3right) + K_1 left(I_0 I_3 - I_1 I_2right) + K_2 left(I_1^2 - I_0 I_2right)right)\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Evolving-u_\\parallel-2","page":"Wall boundary conditions with moment constraints","title":"Evolving u_parallel","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"When evolving only u_parallel and n separately, we only need two constraints. This corresponds to C=0 so that","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n N_mathrmout = -fracI_1K_1 N_mathrmin \n N_mathrmin = frac1I_0 - fracK_0 I_1K_1\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Evolving-n-2","page":"Wall boundary conditions with moment constraints","title":"Evolving n","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"When only evolving n separately, we still have C=0, but N_mathrmin and N_mathrmout must be adjusted to impose the density-moment constraint and the flux boundary condition.","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n frac1sqrtpiint dv_tildeg_n=1 = frac1sqrtpiint dv_left(N_mathrmout hatg_Kw + N_mathrmin hatg_mathrminright) \n = N_mathrmout K_0 + N_mathrmin I_0 \n frac1sqrtpiint dv_v_tildeg_n = u_n = frac1sqrtpiint dv_left(N_mathrmout v_ hatg_Kw + N_mathrmin v_ hatg_mathrmin right) \n = N_mathrmout K_1 + N_mathrmin I_1\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"where u_n is calculated from the ion flux as above, which can be solved to give","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n N_mathrmout = fracleft(u_n - N_mathrmin I_1right)K_1 \n 1 = N_mathrmin I_0 + fracK_0 left(u_n - N_mathrmin I_1right)K_1 \n Rightarrow N_mathrmin = fracleft(1 - fracK_0 u_nK_1right)left(I_0 - fracK_0 I_1K_1right)\nendalign","category":"page"},{"location":"zz_fokker_planck_test/#fokker_planck_test","page":"fokker_planck_test","title":"fokker_planck_test","text":"","category":"section"},{"location":"zz_fokker_planck_test/","page":"fokker_planck_test","title":"fokker_planck_test","text":"Modules = [moment_kinetics.fokker_planck_test]","category":"page"},{"location":"zz_fokker_planck_test/#moment_kinetics.fokker_planck_test","page":"fokker_planck_test","title":"moment_kinetics.fokker_planck_test","text":"module for including functions used in testing the implementation of the the Full-F Fokker-Planck Collision Operator\n\n\n\n\n\n","category":"module"},{"location":"zz_fokker_planck_test/#moment_kinetics.fokker_planck_test.Cssp_fully_expanded_form-NTuple{17, Any}","page":"fokker_planck_test","title":"moment_kinetics.fokker_planck_test.Cssp_fully_expanded_form","text":"Function calculating the fully expanded form of the collision operator taking floats as arguments. This function is designed to be used at the lowest level of a coordinate loop, with derivatives and integrals all previously calculated.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_test/#moment_kinetics.fokker_planck_test.calculate_collisional_fluxes-NTuple{10, Any}","page":"fokker_planck_test","title":"moment_kinetics.fokker_planck_test.calculate_collisional_fluxes","text":"calculates the collisional fluxes given input Fs and Gsp, H_sp\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_r_advection/#neutral_r_advection","page":"neutral_r_advection","title":"neutral_r_advection","text":"","category":"section"},{"location":"zz_neutral_r_advection/","page":"neutral_r_advection","title":"neutral_r_advection","text":"Modules = [moment_kinetics.neutral_r_advection]","category":"page"},{"location":"zz_neutral_r_advection/#moment_kinetics.neutral_r_advection","page":"neutral_r_advection","title":"moment_kinetics.neutral_r_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_neutral_r_advection/#moment_kinetics.neutral_r_advection.neutral_advection_r!-NTuple{13, Any}","page":"neutral_r_advection","title":"moment_kinetics.neutral_r_advection.neutral_advection_r!","text":"do a single stage time advance in r (potentially as part of a multi-stage RK scheme)\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_r_advection/#moment_kinetics.neutral_r_advection.update_speed_neutral_r!-NTuple{6, Any}","page":"neutral_r_advection","title":"moment_kinetics.neutral_r_advection.update_speed_neutral_r!","text":"calculate the advection speed in the r-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#utils","page":"utils","title":"utils","text":"","category":"section"},{"location":"zz_utils/","page":"utils","title":"utils","text":"Modules = [moment_kinetics.utils]","category":"page"},{"location":"zz_utils/#moment_kinetics.utils","page":"utils","title":"moment_kinetics.utils","text":"Utility functions\n\n\n\n\n\n","category":"module"},{"location":"zz_utils/#moment_kinetics.utils.enum_from_string-Tuple{Any, Any}","page":"utils","title":"moment_kinetics.utils.enum_from_string","text":"enum_from_string(enum_type, name)\n\nGet an the value of enum_type, whose name is given by the String (or Symbol) name.\n\nReturns nothing if the name is not found.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_CFL","page":"utils","title":"moment_kinetics.utils.get_CFL","text":"get_CFL!(CFL, speed, coord)\n\nCalculate the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection. Note that moment_kinetics is set up so that dimension in which advection happens is the first dimension of speed - coord is the coordinate corresponding to this dimension.\n\nThe result is written in CFL. This function is only intended to be used in post-processing.\n\n\n\n\n\n","category":"function"},{"location":"zz_utils/#moment_kinetics.utils.get_backup_filename-Tuple{Any}","page":"utils","title":"moment_kinetics.utils.get_backup_filename","text":"Append a number to the filename, to get a new, non-existing filename to backup the file to.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_default_restart_filename-Tuple{Any, Any}","page":"utils","title":"moment_kinetics.utils.get_default_restart_filename","text":"get_default_restart_filename(io_input, prefix; error_if_no_file_found=true)\n\nGet the default name for the file to restart from, using the input from io_input.\n\nprefix gives the type of file to open, e.g. \"moments\", \"dfns\", or \"initial_electron\".\n\nIf no matching file is found, raise an error unless error_if_no_file_found=false is passed, in which case no error is raised and instead the function returns nothing.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_minimum_CFL_neutral_vz-Tuple{AbstractArray{T, 5} where T, Any}","page":"utils","title":"moment_kinetics.utils.get_minimum_CFL_neutral_vz","text":"get_minimum_CFL_neutral_vz(speed, vz)\n\nCalculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection of neutrals in the vz direction.\n\nReduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_minimum_CFL_neutral_z-Tuple{AbstractArray{T, 5} where T, Any}","page":"utils","title":"moment_kinetics.utils.get_minimum_CFL_neutral_z","text":"get_minimum_CFL_neutral_z(speed, z)\n\nCalculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection of neutrals in the z direction.\n\nReduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_minimum_CFL_vpa-Tuple{AbstractArray{T, 4} where T, Any}","page":"utils","title":"moment_kinetics.utils.get_minimum_CFL_vpa","text":"get_minimum_CFL_vpa(speed, vpa)\n\nCalculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection in the vpa direction.\n\nReduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_minimum_CFL_z-Tuple{AbstractArray{T, 4} where T, Any}","page":"utils","title":"moment_kinetics.utils.get_minimum_CFL_z","text":"get_minimum_CFL_z(speed, z)\n\nCalculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection in the z direction.\n\nReduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_prefix_iblock_and_move_existing_file-Tuple{Any, Any}","page":"utils","title":"moment_kinetics.utils.get_prefix_iblock_and_move_existing_file","text":"get_prefix_iblock_and_move_existing_file(restart_filename, output_dir)\n\nMove restart_filename to a backup location (if it is in output_dir), returning a prefix and block-index (which might be nothing) which can be used to open the file for reloading variables.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_unnormalized_parameters","page":"utils","title":"moment_kinetics.utils.get_unnormalized_parameters","text":"get_unnormalized_parameters(input::Dict)\nget_unnormalized_parameters(input_filename::String)\n\nGet many parameters for the simulation setup given by input or in the file input_filename, in SI units and eV, returned as an OrderedDict.\n\n\n\n\n\n","category":"function"},{"location":"zz_utils/#moment_kinetics.utils.merge_dict_with_kwargs!-Tuple{Any}","page":"utils","title":"moment_kinetics.utils.merge_dict_with_kwargs!","text":"Dict merge function for named keyword arguments for case when input Dict is a mixed Dict of Dicts and non-Dict float/int/string entries, and the keyword arguments are also a mix of Dicts and non-Dicts\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.print_unnormalized_parameters-Tuple","page":"utils","title":"moment_kinetics.utils.print_unnormalized_parameters","text":"print_unnormalized_parameters(input)\n\nPrint many parameters for the simulation setup given by input (a Dict of parameters or a String giving a filename), in SI units and eV.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.recursive_merge","page":"utils","title":"moment_kinetics.utils.recursive_merge","text":"recursive_merge(a, b)\n\nMerge two AbstractDicts a and b. Any elements that are AbstractDicts are also merged (rather than just replacing with the entry in b).\n\n\n\n\n\n","category":"function"},{"location":"zz_utils/#moment_kinetics.utils.to_hours-Tuple{T} where T<:Dates.TimePeriod","page":"utils","title":"moment_kinetics.utils.to_hours","text":"to_hours(x::T) where {T<:TimePeriod}\n\nConvert a time period x to seconds\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.to_minutes-Tuple{T} where T<:Dates.TimePeriod","page":"utils","title":"moment_kinetics.utils.to_minutes","text":"to_minutes(x::T) where {T<:TimePeriod}\n\nConvert a time period x to seconds\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.to_seconds-Tuple{T} where T<:Dates.TimePeriod","page":"utils","title":"moment_kinetics.utils.to_seconds","text":"to_seconds(x::T) where {T<:TimePeriod}\n\nConvert a time period x to seconds\n\n\n\n\n\n","category":"method"},{"location":"getting_started/#Getting-started","page":"Getting started","title":"Getting started","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"The full documentation is online at https://mabarnes.github.io/moment_kinetics.","category":"page"},{"location":"getting_started/#Setup","page":"Getting started","title":"Setup","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"First clone this git repository, e.g. (to clone it into a directory with the default name moment_kinetics)","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ git clone git@github.com:mabarnes/moment_kinetics","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"The command above assumes that you have an account on Github.com, and that account has ssh keys set up. If that is not the case you can clone using https instead","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ git clone https://github.com/mabarnes/moment_kinetics","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"When using https some things (e.g. pushing to the remote repository) may require you to use 2-factor authentication, see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"warning: Warning\nDo not download the zip-file from the Github.com page. This gives you the source code files but does not create a git repository. We get some version information from git when running the code, so without the git repository you will not be able to run a simulation.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"If you have already installed Julia, ensure that the Julia version is >= 1.9.0 by doing $ julia --version at command line. The setup script in step 2 can also download a Julia binary if you have not already installed Julia.\nIf you are running on a desktop/laptop (rather than an HPC cluster) ensure that you have an MPI implementation installed (using whatever the usual way of installing software is on your system). It should not matter which MPI implementation - openmpi is often a good choice if you have no reason to prefer a particular one. Check that the MPI compiler wrapper mpicc is available, e.g. $ mpicc --version should run without an error.\nRun the setup script $ machines/machine_setup.sh This script will prompt you for various options. The default choices should be sensible in most cases. On a laptop/desktop the 'name of machine to set up' will be 'generic-pc' and will set up for interactive use. On supported clusters, 'name of machine' will be the name of the cluster. On other clusters 'generic-batch' can be used, but requires some manual setup (see machines/generic-batch-template/README.md).\nFor more information, see machine_setup notes.\nIf you want or need to set up 'by hand' without using machines/machine_setup.sh, see Manual setup.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Some other notes that might sometimes be useful:","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To speed up running scripts or the first call of run_moment_kinetics in a REPL session, it is possible to compile a 'system image' (moment_kinetics.so). By running $ julia --project -O3 precompile.jl and then start Julia by running for example $ julia --project -O3 -Jmoment_kinetics.so this significantly decreases the load time but prevents code changes from taking effect when moment_kinetics.so is used until you repeat the compilation of the system image. Note that this also prevents the Revise package from updating moment_kinetics when you edit the code during and interactive session.\nSystem images are created by default on HPC clusters, and are required to use the provided jobscript-*.template submission scripts (used by submit-run.sh and submit-restart.sh). This is to try and minimise the compilation that has to be replicated on all the (possibly thousands of) processes in a parallel run. After changing source code, you should run $ precompile-submit.sh (to re-compile the moment_kinetics.so system image).\nIn the course of development, it is sometimes helpful to upgrade the Julia version. Upgrading the version of Julia or upgrading packages may require a fresh installation of moment_kinetics. To make a fresh install with the latest package versions you should be able to just run julia pkg> update (to enter 'Package mode' enter ']' at the julia> prompt). It might sometimes necessary or helpful to instead remove (or rename) the Manifest.jl file in the main directory, and re-run the setup from step 2) above. It can sometimes be necessary to remove or rename the .julia/ directory (located by default in your home directory) to force all the dependencies to be rebuilt.\nWhen using the Plots-based post-processing library, one may have to set an environment variable to avoid error messages from the Qt library. If you execute the command $ julia --project run_post_processing.jl runs/your_run_dir/ and see the error message qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin \"xcb\" in \"\" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. this can be suppressed by setting export QT_QPA_PLATFORM=offscreen in your .bashrc or .bash_profile files.","category":"page"},{"location":"getting_started/#Run-a-simulation","page":"Getting started","title":"Run a simulation","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To run julia with optimization, type","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia -O3 --project run_moment_kinetics.jl input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Note that the middle character in -O3 is a capital letter 'O', not a zero. (On HPC clusters, or if you selected the \"set up separate packages for post processing\" option from machines/machine_setup.sh, you should use -O3 --check-bounds=no instead of just -O3, and the same in the Restarting section.)","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Options are specified in a TOML file, e.g. input.toml here. The defaults are specified in moment_kinetics_input.jl.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To run in parallel, just put mpirun -np in front of the call you would normally use, with the number of processes to use.\nIt may be more convenient when running moment_kinetics more than once to work from the Julia REPL, e.g. $ julia -O3 --project julia> using moment_kinetics julia> run_moment_kinetics(\"input.toml\") where input is the name of a TOML file containing the desired options. It is also possible to pass a Dict() containing any non-default options desired, which might sometimes be useful in tests or scripts julia> run_moment_kinetics(input) Especially when developing the code, a lot of compilation time can be saved by using Revise.jl, and re-running a test case in the REPL (without restarting julia) - this is enabled by default when setting up using machines/machine_setup.sh for 'generic-pc'.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"On an HPC cluster, you can submit a simulation (using the input file input.toml) to the batch queue using the convenience script","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-run.sh input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"See the help text","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-run.sh -h","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"for various command line options to change parameters (e.g. number of nodes, etc.).","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"If you need to rebuild the system images moment_kinetics.so and makie_postproc.so or plots_postproc.so because you have updated the code since they were built, it may be convenient to use","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-precompile-and-run.sh input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"which will submit jobs for compilation, to run the simulation, and to do post processing. The simulation job will wait for the compilation job creating moment_kinetics.so to finish before starting. The post processing job will wait for the compilation job creating makie_postproc.so or plots_postproc.so to finish before starting.","category":"page"},{"location":"getting_started/#Stopping-a-run","page":"Getting started","title":"Stopping a run","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"When running in the REPL (especially with MPI) interrupting a run using Ctrl-C can mess things up, and require you to restart Julia. There is also a chance that you might interrupt while writing the output files and corrupt them. To avoid these problems, you can stop the run cleanly (including writing the distribution functions at the last time point, so that it is possible to restart the run from where you stopped it), by creating an empty file called stop in the run directory. For example, if the name of your run is 'my_example'","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ touch runs/my_example/stop","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"moment_kinetics checks for this file when it is going to write output, and if it is present writes all output and then returns cleanly. The 'stop file' is deleted when a run is (re-)started, if present, so you do not have to manually delete it before (re-)starting the run again.","category":"page"},{"location":"getting_started/#Restarting","page":"Getting started","title":"Restarting","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To restart a simulation using input.toml from the last time point in the existing run directory,","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia -O3 --project run_moment_kinetics --restart input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"or to restart from a specific output file - either from the same run or (if the settings are compatible, see below) a different one - here runs/example/example.dfns.h5","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia -O3 --project run_moment_kinetics input.toml runs/example/example.dfns.h5","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"The output file must include distribution functions. When not using parallel I/O there will be multiple output files from different MPI ranks - any one of these can be passed.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To do the same from the Julia REPL","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia -O3 --project\njulia> run_moment_kinetics(\"input.toml\", restart=true)","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"or","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"julia> run_moment_kinetics(\"input.toml\", restart=\"runs/example/example.dfns.h5\")","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"When calling the run_moment_kinetics() function you can also choose a particular time index to restart from, e.g.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"julia> run_moment_kinetics(\"input.toml\", restart=\"runs/example/example.dfns.h5\", restart_time_index=42)","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"On an HPC cluster, you can submit a restart (using the input file input.toml) to the batch queue using the convenience script","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-restart.sh input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"or to restart from a particular output file","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-restart.sh -r runs/example/example.dfns.h5 input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"See the help text","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-restart.sh -h","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"for various other command line options to change parameters (e.g. number of nodes, etc.).","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"If you need to rebuild the system images moment_kinetics.so and makie_postproc.so or plots_postproc.so because you have updated the code since they were built, it may be convenient to use","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-precompile-and-restart.sh [-r runs/example/example.dfns.h5] input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"which will submit jobs for compilation, to restart the simulation, and to do post processing. The simulation job will wait for the compilation job creating moment_kinetics.so to finish before starting. The post processing job will wait for the compilation job creating makie_postproc.so or plots_postproc.so to finish before starting.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"It is possible to restart a run from another output file with different resolution settings or different moment-kinetic options. This is done by interpolating variables from the old run onto the new grid.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"When interpolating in spatial dimensions it is not recommended to change the length of the domain.\nFor velocity space dimensions, changing the size of the domain should be OK. Points outside the original domain will be filled with propto exp(-v^2) decreasing values.\nWhen changing from 1D (no r-dimension) to 2D (with r-dimension), the interpolated values will be constant in r.\nWhen changing from 1V to 2V or 3V, the interpolated values will be proportional to exp(-v_j^2) in the new dimension(s).","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"When running in parallel, both the old and the new grids must be compatible with the distributed-MPI parallelisation. When not using Parallel I/O, the distributed-MPI domain decomposition must be identical in the old and new runs (as each block only reads from a single file).","category":"page"},{"location":"getting_started/#Post-processing-with-makie_post_processing","page":"Getting started","title":"Post-processing with makie_post_processing","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"The default post-processing module, written to be a bit more generic and flexible than the original Plots-based one, and able to be used interactively, is provided in makie_post_processing, see Post processing.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"On an HPC cluster, when you call ./submit-run.sh or ./submit-restart.sh, a job will (by default) be submitted to run makie_post_processing.makie_post_process or plots_post_processing.analyze_and_plot_data (depending on which you have set up, or on whether you pass the -o argument when both are set up) on the output after the run is finished. You can skip this by passing the -a argument to ./submit-run.sh or ./submit-restart.sh.","category":"page"},{"location":"getting_started/#Original,-Plots-based-post-processing-quickstart","page":"Getting started","title":"Original, Plots-based post processing quickstart","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"This post-processing functionality is now disabled by default, but you can enable it by entering y at the \"Would you like to set up plots_post_processing?\" prompt in machines/machine_setup.sh.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To make plots and calculate frequencies/growth rates, run","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia --project -O3 run_post_processing.jl runs/","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"passing the directory to process as a command line argument. Input options for post-processing can be specified in post_processing_input.jl. Note that even when running interactively, it is necessary to restart Julia after modifying post_processing_input.jl.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Post processing can be done for several directories at once using","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia --project -O3 post_processing_driver.jl runs/ runs/ ...","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"passing the directories to process as command line arguments. Optionally pass a number as the first argument to parallelise post processing of different directories.","category":"page"},{"location":"getting_started/#Parallel-I/O","page":"Getting started","title":"Parallel I/O","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To enable parallel I/O, HDF5.jl needs to be configured to use an HDF5 library which has MPI enabled and is compiled using the same MPI as you run Julia with. To ensure this happens, machines/machine_setup.sh will download the HDF5 source code and compile a local copy of the library under machines/artifacts, unless you enter n at the \"Do you want to download, and compile a local version of HDF5\" prompt (except on known HPC clusters where an MPI-enabled HDF5 is provided by a module - this is currently true on ARCHER2 - where the module-provided HDF5 is used).","category":"page"},{"location":"getting_started/#Running-parameter-scans","page":"Getting started","title":"Running parameter scans","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Parameter scans (see Parameter scans) can be performed by running","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia -O3 --project run_parameter_scan.jl path/to/scan/input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"If running a scan, it can be parallelised by passing the -p argument to julia, e.g. to run on 8 processes","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia -p 8 -O3 --project run_parameter_scan.jl path/to/scan/input.toml","category":"page"},{"location":"getting_started/#Tests","page":"Getting started","title":"Tests","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"There is a test suite in the test/ subdirectory. It can be run in a few ways:","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Execute some or all of the tests as a script. For example in the terminal run $ julia -O3 --project moment_kinetics/test/runtests.jl or in the REPL run julia> include(\"moment_kinetics/test/runtests.jl\") Individual test files can also be used instead of runtests.jl, which runs all the tests.\nYou can also run the tests using Pkg. Either using pkg> mode $ julia -O3 --project julia> (moment_kinetics) pkg> test moment_kinetics using Pkg in the REPL $ julia -O3 --project julia> import Pkg julia> Pkg.test(\"moment_kinetics\") or run on the command line julia -O3 --project -e \"import Pkg; Pkg.test(\"moment_kinetics\")` The downside of this method is that it will cause NCDatasets to be installed if you did not install it already, which might sometimes cause linking errors (related to the HDF5 library, see Optional dependencies).","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"By default the test suite should run fairly quickly (in a few minutes). To do so, it skips many cases. To run more comprehensive tests, you can activate the --long option:","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"In the REPL, run julia> push!(ARGS, \"--long\") before running the tests.\nRunning from the terminal, pass as a command line argument, e.g. $ julia -O3 --project --long moment_kinetics/test/runtests.jl\nUsing test_args argument julia> Pkg.test(\"moment_kinetics\"; test_args=[\"--long\"]) Note the semicolon is necessary.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To get more output on what tests were successful, an option --verbose (or -v) can be passed in a similar way to --long (if any tests fail, the output is printed by default).","category":"page"},{"location":"getting_started/#Manufactured-Solutions-Tests","page":"Getting started","title":"Manufactured Solutions Tests","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"In addition to the test suite in the test/ subdirectory, the moment_kinetics project utilises the method of manufactured solutions to test more complicated models in 1D1V, and 2D2V or 2D3V (for neutral particles). To run these tests we run a normal moment_kinetics simulation, making use of the manufacted solutions test TOML options. We describe how to use the existing tests below. To set up moment_kinetics to use the manufactured solutions features, take the following steps:","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Install moment_kinetics using the setup instructions above (Setup), using the plots_post_processing project and make sure that the Symbolics package is installed, e.g., if following the manual setup instructions (Manual setup), these commands would be $ julia -O3 --project julia> ] develop ./moment_kinetics develop ./plots_post_processing/plots_post_processing add Symbolics if you will run the tests with MPI, make sure that MPI is also installed at this step.\nSelect an input file representing the desired test. For example, we can pick from the list MMS input TOML list.\nRun the input file using the usual command. julia> using moment_kinetics julia> run_moment_kinetics(\"runs/your_MMS_test_input.toml\")\nUse the post processing module to test the error norms for the simulation of interest. julia> using plots_post_processing julia> analyze_and_plot_data(\"runs/your_MMS_test_input\") This will print out a series of numbers to the terminal which represent the error norms for each field and distribution function compared to the exact analytical solution, at each time step in the simulation. This error data can be computed for different resolutions.\nFinally, to partially automate this last step when a resolution scan is performed, we provide functions for generating plots of the error data versus resolutions in the file plot_MMS_sequence.jl in the plots_post_processing project. This can be accessed by using the run_MMS_test.jl script from the command line\n$ julia -O3 --project run_MMS_test.kl\nor by using the underlying functions in the REPL\nimport plots_post_processing\nusing plots_post_processing.plot_MMS_sequence\nrun_mms_test()\nNote that currently the lists of files used as input for the plotting functions are hardcoded for the purposes of self-documenting the tests – these lists could be made input parameters to improve these scripts.","category":"page"},{"location":"machine_setup_notes/#machine_setup-notes","page":"machine_setup notes","title":"machine_setup notes","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"The machines subdirectory provides scripts to set up Julia and moment_kinetics to run on laptops/desktops or on clusters. If the cluster is not one of the currently supported machines, then some additional manual setup is required.","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"Currently supported:","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"\"generic-pc\" - A generic personal computer (i.e. laptop or desktop machine). Set up for interactive use, rather than for submitting jobs to a batch queue.\n\"generic-batch\" - A generic cluster using a batch queue. Requires some manual setup first, see machines/generic-batch-template/README.md.\n\"archer\" - the UK supercomputer ARCHER2\n\"marconi\" - the EUROfusion supercomputer Marconi","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"The usage is described in Getting started. This page contains some extra technical information.","category":"page"},{"location":"machine_setup_notes/#Notes-on-some-prompts-from-the-script","page":"machine_setup notes","title":"Notes on some prompts from the script","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"You will be prompted to enter a location for your .julia directory. If you are installing on a personal computer or on a cluster which allows access to your home directory from compute nodes, it is fine to leave this as the default. If not (e.g. on ARCHER2), you need to set a path which is accessible from the compute nodes. If you want to create a completely self-contained install (e.g. for reproducibility or for debugging some dependency conflicts), you might want to put .julia within the moment_kinetics directory (i.e. enter .julia at the prompt).","category":"page"},{"location":"machine_setup_notes/#Defaults-for-prompts","page":"machine_setup notes","title":"Defaults for prompts","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"The default value for each of the settings that the user is prompted for interactively are first taken from some sensible, machine-specific defaults. When machines/machine_setup.sh is run, the values chosen by the user are saved in the [moment_kinetics] section of LocalPreferences.toml, and these values are used as the defaults next time machines/machine_setup.sh is run, in order to make it easier to re-run the setup, e.g. because some dependencies need updating, or to change just one or a few settings.","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"A few settings (which are needed before Julia can be started for the first time) are saved into hidden files (.julia_default.txt, .this_machine_name.txt, and .julia_directory_default.txt) instead of into LocalPreferences.toml, to avoid needing to parse a TOML file using bash.","category":"page"},{"location":"machine_setup_notes/#bin/julia","page":"machine_setup notes","title":"bin/julia","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"A symlink or script is created at bin/julia to call the chosen julia executable. On HPC systems we create a file julia.env which must be source'd (to load the right modules, etc.) before julia can be used - in this case julia.env can be used to set up any environment variables, etc. so a symlink is sufficient. On laptops/desktops that will be used interactively, it is inconvenient to have to remember to source julia.env, especially if you have multiple instances of moment_kinetics, so instead the necessary setup (of the JULIA_DEPOT_PATH environment variable, if needed, and a Python venv if the Plots-based post processing is enabled) is done by making bin/julia a small bash script, which does that setup and then calls the chosen julia executable, passing through to it any command line arguments.","category":"page"},{"location":"machine_setup_notes/#julia.env","page":"machine_setup notes","title":"julia.env","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"A julia.env file is used on HPC systems to set up the environment (modules and environment variables). On laptop/desktop systems this would be inconvenient (especially if there are multiple instances of moment_kinetics) so a julia.env is not used for these.","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"The julia.env is created from a template julia.env which is located in the subdirectory of machines/ for the specific machine being set up.","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"If you need to run julia interactively (for moment_kinetics) on a machine that uses julia.env, either run source julia.env in each terminal session where you want to use moment_kinetics, or add it to your .bashrc (if this does not conflict with any other projects).","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"warning: Warning\nNote that julia.env runs module purge to remove any already loaded modules (to get a clean environment). It is therefore very likely to interfere with other projects.","category":"page"},{"location":"machine_setup_notes/#Setup-of-post-processing-packages","page":"machine_setup notes","title":"Setup of post processing packages","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"See Post processing packages.","category":"page"},{"location":"machine_setup_notes/#Use-of-system-images","page":"machine_setup notes","title":"Use of system images","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"On HPC clusters, creating system images moment_kinetics.so and for post processing makie_postproc.so and/or plots_postproc.so is required. This is to avoid (as far as practical) wasting CPU hours doing identical compilation in large parallel jobs. If you wanted to remove this requirement for some reason (although this is not recommended), you would need to go to the subdirectory of machines/ for the machine you are working on, and edit the jobscript-run.template, jobscript-restart.template, jobscript-postprocess.template, and jobscript-postprocess-plotsjl.template files to remove the -J*.so argument. If you do do this, please do not commit those changes and merge them to the master branch of moment_kinetics.","category":"page"},{"location":"machine_setup_notes/#Operations-done-by-machines/machine_setup.sh","page":"machine_setup notes","title":"Operations done by machines/machine_setup.sh","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"The convenience script machine_setup.sh is provide because the actual setup happens in multiple stages, with Julia being restarted in between (as this is required on some machines), and because the script is able to download Julia if Julia is not already installed.","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"The steps done by machines/machine_setp.sh are:","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"Get the name of the 'machine' ('generic-pc', 'archer', etc.) so that machine-dependent setup can be done and machine-specific defaults can be used. ()\nDownload a Julia executable, or prompt the user for the location of one (defaulting to any julia found in $PATH).\nGet the location of the .julia directory to be used by (this copy of) moment_kinetics. At this point we have enough setup to start using julia. Export JULIA_DEPOT_PATH so that this is used any time julia is run in the rest of the script.\nRun machines/shared/machine_setup.jl. This script (whose functions are documented in API documentation):\nprompts the user for most of the settings (and saves them to LocalPreferences.toml from where they can be accessed by other scripts later and used as defaults if machines/machine_setup is re-run)\ncreates the julia.env file (from the template for the given machine) on HPC systems\ncreates the bin/julia symlink or script (see bin/julia)\ncreates a link to the compile_dependencies.sh script for the machine (if there is one).\ninstalls the Revise package and adds using Revise to the startup.jl file (on laptop/desktop systems, and if the user did not de-select this).\nIt is necessary to restart julia after this script has been run, so that we can first source julia.env (if it exists) or use the script at bin/julia in order to use the environment settings in them.\nIf julia.env exists, run source julia.env to load modules, etc.\nSet the optimization flags that will be used for running simulations or for running post processing. These need to be set the same as will be used eventually so that precompilation of dependencies and packages that happens while running machines/machine_setup.sh does not need to be overwritten (due to different optimization flags) later, as this would be a waste of time (although it should work fine).\nAdd various dependencies to the top-level project, by calling machines/shared/add_dependencies_to_project.jl. This will set up MPI and HDF5 to link to the correct libraries. julia needs to be restarted after the setup of MPI and HDF5 is done, which is why this is a separate script from the following one (this separation also allows add_dependencies_to_project.jl to be re-used in makie_post_processing_setup.jl and plots_post_processing_setup.jl if these are to be set up as separate projects from the top-level one).\nComplete the setup by running machines/shared/machine_setup_stage_two.jl, which creates a Python venv with matplotlib installed (if plots_post_processing is enabled), creates symlinks at the top level to scripts to submit batch jobs (if setting up for an HPC cluster), and submits a job to compile a system image for moment_kinetics (if setting up for an HPC cluster, and if the user did not de-select this).\nSet up makie_post_processing (if enabled) by running machines/shared/makie_post_processing_setup.jl and/or plots_post_processing (if enabled) by running machines/shared/plots_post_processing_setup.jl. These scripts also submit jobs to create system images for makie_post_processing or plots_post_processing (if setting up for an HPC cluster, and if the user did not de-select this).\nPrint a message indicating which optimization flags to use for running simulations or for post-processing.","category":"page"},{"location":"machine_setup_notes/#machine_setup_api_documentation","page":"machine_setup notes","title":"API documentation","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"Modules = [moment_kinetics.machine_setup]","category":"page"},{"location":"machine_setup_notes/#moment_kinetics.machine_setup","page":"machine_setup notes","title":"moment_kinetics.machine_setup","text":"Functions to help setting up on known machines\n\n\n\n\n\n","category":"module"},{"location":"machine_setup_notes/#moment_kinetics.machine_setup.get_setting","page":"machine_setup notes","title":"moment_kinetics.machine_setup.get_setting","text":"get_setting(setting_name, message, machine, local_defaults,\n possible_values=nothing)\n\nPrompt the user to set a setting called setting_name after printing message. Default value is read from local_defaults if it exists there (which it will do if it has been set before, as then it is stored in LocalPreferences.toml), or from sensible defaults in the machine section of default_settings otherwise.\n\n\n\n\n\n","category":"function"},{"location":"machine_setup_notes/#moment_kinetics.machine_setup.get_user_input-Tuple{Any, Any}","page":"machine_setup notes","title":"moment_kinetics.machine_setup.get_user_input","text":"get_user_input(possible_values, default_value)\n\nPrompt for user input. If the user enters nothing, return default_value. Check that the entered value is one of possible_values, if not prompt again.\n\n\n\n\n\n","category":"method"},{"location":"machine_setup_notes/#moment_kinetics.machine_setup.machine_setup_moment_kinetics-Tuple{String}","page":"machine_setup notes","title":"moment_kinetics.machine_setup.machine_setup_moment_kinetics","text":"machine_setup_moment_kinetics(machine::String; ; no_force_exit::Bool=false,\n interactive::Bool=true)\n\nDo setup for a known machine, prompting the user for various settings (with defaults set to sensible values - if the script has been run before, the defaults are the previously used values):\n\nOn clusters that use a module system, provide julia.env at the top level of the moment_kinetics repo.\nCall\nsource julia.env\nto get the correct modules for running moment_kinetics, either on the command line (to get them for the current session) or in your .bashrc (to get them by default). Note that this calls module purge so will remove any currently loaded modules when it is run.\nMakes a symlink to, or a bash script that calls, the Julia executable used to run this command at bin/julia under the moment_kinetics repo, so that setup and job submission scripts can use a known relative path.\nnote: Note\nIf you change the Julia executable, e.g. to update to a new verison, you will need to either replace the symlink /bin/julia or edit the bash script at /bin/julia by hand, or re-run this function using the new executable.\n\nUsually it is necessary for Julia to be restarted after running this function to run Julia with the correct JULIA_DEPOT_PATH, etc. so the function will force Julia to exit. If for some reason this is not desired (e.g. when debugging), pass no_force_exit=true.\n\nThe interactive argument exists so that when this function is called from another script, terminal output with instructions for the next step can be disabled.\n\nCurrently supported machines:\n\n\"generic-pc\" - A generic personal computer (i.e. laptop or desktop machine).. Set up for interactive use, rather than for submitting jobs to a batch queue.\n\"generic-batch\" - A generic cluster using a batch queue. Requires some manual setup first, see machines/generic-batch-template/README.md.\n\"archer\" - the UK supercomputer ARCHER2\n\"marconi\" - the EUROfusion supercomputer Marconi\n\nnote: Note\nThe settings created by this function are saved in LocalPreferences.toml. It might sometimes be useful to edit these by hand (e.g. the account setting if this needs to be changed.): it is fine to do this.\n\n\n\n\n\n","category":"method"}] +[{"location":"zz_moment_kinetics_structs/#moment_kinetics_structs","page":"moment_kinetics_structs","title":"moment_kinetics_structs","text":"","category":"section"},{"location":"zz_moment_kinetics_structs/","page":"moment_kinetics_structs","title":"moment_kinetics_structs","text":"Modules = [moment_kinetics.moment_kinetics_structs]","category":"page"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs","text":"structs used within moment_kinetics that should be defined early to avoid dependency cycles when they are used by several other modules.\n\n\n\n\n\n","category":"module"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.boundary_distributions_struct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.boundary_distributions_struct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.discretization_info","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.discretization_info","text":"discretization_info for one dimension\n\nAll the specific discretizations in moment_kinetics are subtypes of this type.\n\n\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.electron_pdf_substruct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.electron_pdf_substruct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.em_fields_struct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.em_fields_struct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.moments_electron_substruct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.moments_electron_substruct","text":"momentselectronsubstruct is a struct that contains moment information for electrons\n\n\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.moments_ion_substruct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.moments_ion_substruct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.moments_neutral_substruct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.moments_neutral_substruct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.moments_struct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.moments_struct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.null_spatial_dimension_info","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.null_spatial_dimension_info","text":"Type representing a spatial dimension with only one grid point\n\n\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.null_velocity_dimension_info","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.null_velocity_dimension_info","text":"Type representing a velocity space dimension with only one grid point\n\n\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.pdf_struct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.pdf_struct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.pdf_substruct","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.pdf_substruct","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.scratch_electron_pdf","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.scratch_electron_pdf","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.scratch_pdf","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.scratch_pdf","text":"\n\n\n\n","category":"type"},{"location":"zz_moment_kinetics_structs/#moment_kinetics.moment_kinetics_structs.weak_discretization_info","page":"moment_kinetics_structs","title":"moment_kinetics.moment_kinetics_structs.weak_discretization_info","text":"discretization_info for a discretization that supports 'weak form' methods, for one dimension\n\n\n\n\n\n","category":"type"},{"location":"shared_memory_debugging/#Shared-memory-debugging","page":"Shared memory debugging","title":"Shared memory debugging","text":"","category":"section"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"This debug_test directory contains scripts for running a set of short runs, intended to be used with the --debug flag to check for bugs (e.g. race conditions). The output is not checked - the intention is just to catch errors raised by the debugging checks.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"The inputs only have 3 time-steps, and very few grid points, because the debug checks are very slow. The actual output is not important, so it does not matter that the runs are badly under-resolved.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"It may be necessary to use the --compiled-modules=no flag to Julia for changes to the --debug setting to be picked up correctly. This setting means that all precompilation is redone each time Julia is started, which can be slow. An alternative workaround is to hard-code the moment_kinetics.debugging._debug_level variable in debugging.jl to the desired value.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"To run the debug tests, call (from the top-level moment_kinetics directory) something like","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"julia --project --check-bounds=yes --compiled-modules=no debug_test/runtests.jl --debug 99","category":"page"},{"location":"shared_memory_debugging/#Collision-operator-and-'anyv'-region","page":"Shared memory debugging","title":"Collision operator and 'anyv' region","text":"","category":"section"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"The collision operator uses a slightly hacky special set of functions for shared memory parallelism, to allow the outer loop over species and spatial dimensions to be parallelised, but also inner loops over vperp, vpa or vperp and vpa to be parallelised - changing the type of inner-loop parallelism within the outer loop. This happens within an 'anyv' region, which is started with the begin_s_r_z_anyv_region() function. The debug checks within an 'anyv' region only check for correctness on the sub-block communicator that parallelises over velocity space, so if there were errors due to incorrect species or spatial parallelism they would not (might not?) be detected. These errors should be unlikely as the collision operator only writes to a single species at a single spatial point.","category":"page"},{"location":"shared_memory_debugging/#Finding-race-conditions","page":"Shared memory debugging","title":"Finding race conditions","text":"","category":"section"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"The code is parallelized using MPI with shared memory arrays. 'Race conditions' can occur if a shared array is accessed incorrectly. All the processes sharing an array can be synchronized, ensuring they pass through the following code block with a consistent state, by using the _block_synchronize() function (which calls MPI.Barrier() to synchronize the processes). Race conditions occur if between consecutive calls to _block_synchronize() any array is:","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"written by 2 or more processes at the same position\nwritten by one process at a certain position, and read by one or more other processes at the same position.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"If a race condition occurs, it can result in errors in the results. These are sometimes small, but often show inconsistent results between runs (because results erroneously depend on the execution order on different processes). They are undefined behaviour though, and so can also cause anything up to segfaults.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"The provided debugging routines can help to pin down where either of these errors happen.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"The @debug_shared_array macro (activated at --debug 2 or higher) counts all reads and writes to shared arrays by each process, and checks at each _block_synchronize() call whether either pattern has occurred since the previous _block_synchronize(). If they have and in addition @debug_track_array_allocate_location is active (--debug 3 or higher), then the array for which the error occured is identified by printing a stack-trace of the location where it was allocated, and the stack-trace for the exception shows the location of the _block_synchronize() call where the error occured.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"@debug_block_synchronize (activated at --debug 4)checks that all processes called _block_synchronize() from the same place - i.e. the same line in the code, checked by comparing stack traces.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"@debug_detect_redundant_block_synchronize (activated at --debug 5) aims to find any unnecessary calls to _block_synchronize(). These calls can be somewhat expensive (for large numbers of processes at least), so it is good to minimise the number. When this mode is active, at each _block_synchronize() a check is made whether there would be a race-condition error if the previous _block_synchronize() call was removed. If there would not be, then the previous call was unnecessary and could be removed. The tricky part is that whether it was necessary or not could depend on the options being used... Detecting redundant block_synchronize() calls requires that all dimensions that could be split over processes are actually split over processes, which demands a large number of processes are used. The @debug_detect_redundant_block_synchronize flag, when activated, modifies the splitting algorithm to force every dimension to be split if possible, and raise an error if not.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"Suggested debugging strategy for race conditions is:","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"Look at the loop types and ensure that there is an appropriate begin_*_region() call before each new loop type.\nRun debug_test/runtests.jl with @debug_shared_array activated, but not @debug_detect_redundant_block_synchronize. It will be faster to first run without @debug_track_array_allocate_location to find failing tests, then with @debug_track_array_allocate_location to help identify the cause of the failure. Usually a failure should indicate where there is a missing begin_*_region() call. There may be places though where synchronization is required even though the type of loop macros used does not change (for example when phi is calculated contributions from all ion species need to be summed, resulting in an unusual pattern of array accesses); in this case _block_synchronize() can be called directly.\nThe function debug_check_shared_memory() can be inserted between begin_*_region() calls when debugging to narrow down the location where the incorrect array access occured. It is defined when @debug_shared_array is active, and can be imported with using ..communication: debug_check_shared_memory(). The function runs the same error checks as are added by @debug_shared_array in _block_synchronize().\nThe tests in debug_test/ check for correctness by looping over the dimensions and forcing each to be split over separate processes in turn. This allows the correctness checks to be run using only 2 processes, which would not be possible if all dimensions had to be split at the same time.\n[This final level of checking only looks for minor optimizations rather than finding bugs, so it is much less important than the checks above.] Run debug_test/debug_redundant_synchronization/runtests.jl with @debug_detect_redundant_block_synchronize activated. This should show if any call to _block_synchronize() (including the ones inside begin_*_region() calls) was 'unnecessary' - i.e. there would be no incorrect array accesses if it was removed. This test needs to be run on a suitable combination of grid sizes and numbers of processes so that all dimensions are split across multiple processes to avoid false positives. Any redundant calls which appear in all tests can be deleted. Redundant calls that appear in only some tests (unless they are in some code block that is just not called in all the other tests) should preferably be moved inside a conditional block, so that they are called only when necessary, if a suitable one exists. If there is no conditional block that the call can be moved to, it may sometimes be necessary to just test one or more options before calling, e.g.\nmoments.evolve_upar && _block_synchronize()\nThe checks for redundant _block_synchronize() calls have been separated from the correctness checks so that the correctness checks can be run in the CI using only 2 processes, while the redundancy checks can be run manually on a machine with enough memory and cpu cores.","category":"page"},{"location":"shared_memory_debugging/","page":"Shared memory debugging","title":"Shared memory debugging","text":"You can find out what loop type is currently active by looking at loop_ranges[].parallel_dims. This variable is a Tuple containing Symbols for each dimension currently being parallelized.","category":"page"},{"location":"zz_analysis/#analysis","page":"analysis","title":"analysis","text":"","category":"section"},{"location":"zz_analysis/","page":"analysis","title":"analysis","text":"Modules = [moment_kinetics.analysis]","category":"page"},{"location":"zz_analysis/#moment_kinetics.analysis","page":"analysis","title":"moment_kinetics.analysis","text":"\n\n\n\n","category":"module"},{"location":"zz_analysis/#moment_kinetics.analysis.analyze_2D_instability-NTuple{7, Any}","page":"analysis","title":"moment_kinetics.analysis.analyze_2D_instability","text":"\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.analyze_fields_data-Tuple{Any, Any, Any}","page":"analysis","title":"moment_kinetics.analysis.analyze_fields_data","text":"\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.analyze_moments_data-NTuple{8, Any}","page":"analysis","title":"moment_kinetics.analysis.analyze_moments_data","text":"\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.analyze_pdf_data-NTuple{7, Any}","page":"analysis","title":"moment_kinetics.analysis.analyze_pdf_data","text":"\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.check_Chodura_condition","page":"analysis","title":"moment_kinetics.analysis.check_Chodura_condition","text":"Check the (kinetic) Chodura condition\n\nChodura condition is: ∫d^3v F/vpa^2 ≤ mi ne/Te\n\nReturn a tuple (whose first entry is the result for the lower boundary and second for the upper) of the ratio which is 1 if the Chodura condition is satisfied (with equality): Te/(mi ne) * ∫d^3v F/vpa^2\n\nCurrently only evaluates condition for the first species: is=1\n\n2D2V\n\nIn normalised form (normalised variables suffixed with 'N'): vpa = cref vpaN vperp = cref vperpN ne = nref neN Te = Tref TeN F = FN nref / cref^3 pi^3/2 cref = sqrt(2 Tref / mi)\n\ncref^3 ∫d^3vN FN nref / cref^3 pi^3/2 cref^2 vpaN^2 ≤ mi nref neN / Tref TeN nref / (pi^3/2 cref^2) * ∫d^3vN FN / vpaN^2 ≤ mi nref neN / Tref TeN mi nref / (pi^3/2 2 Tref) * ∫d^3vN FN / vpaN^2 ≤ mi nref neN / Tref TeN 1 / (2 pi^3/2) * ∫d^3vN FN / vpaN^2 ≤ neN / TeN 1 / (2 pi^3/2) * ∫d^3vN FN / vpaN^2 ≤ neN / TeN TeN / (2 neN pi^3/2) * ∫d^3vN FN / vpaN^2 ≤ 1\n\nNote that integrate_over_vspace() includes the 1/pi^3/2 factor already.\n\n1D1V\n\nThe 1D1V code evolves the marginalised distribution function f = ∫d^2vperp F so the Chodura condition becomes ∫dvpa f/vpa^2 ≤ mi ne/Te\n\nIn normalised form (normalised variables suffixed with 'N'): vpa = cref vpaN ne = nref neN Te = Tref TeN f = fN nref / cref sqrt(pi) cref = sqrt(2 Tref / mi)\n\ncref ∫dvpaN fN nref / cref sqrt(pi) cref^2 vpaN^2 ≤ mi nref neN / Tref TeN nref / (sqrt(pi) cref^2) * ∫dvpaN fN / vpaN^2 ≤ mi nref neN / Tref TeN mi nref / (sqrt(pi) 2 Tref) * ∫dvpaN fN / vpaN^2 ≤ mi nref neN / Tref TeN 1 / (2 sqrt(pi)) * ∫dvpaN fN / vpaN^2 ≤ neN / TeN 1 / (2 sqrt(pi)) * ∫dvpaN fN / vpaN^2 ≤ neN / TeN TeN / (2 neN sqrt(pi)) * ∫dvpaN fN / vpaN^2 ≤ 1\n\nNote that integrate_over_vspace() includes the 1/sqrt(pi) factor already.\n\nIf ir0 is passed, only load the data for as single r-point (to save memory).\n\nIf find_extra_offset=true is passed, calculates how many entries of f_lower/f_upper adjacent to v_=0 would need to be zero-ed out in order for the condition to be satisfied.\n\n\n\n\n\n","category":"function"},{"location":"zz_analysis/#moment_kinetics.analysis.field_line_average-Tuple{Any, Any, Any}","page":"analysis","title":"moment_kinetics.analysis.field_line_average","text":"\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.fit_cosine","page":"analysis","title":"moment_kinetics.analysis.fit_cosine","text":"Fit a cosine to a 1d array\n\nFit function is Acos(2πn(z + δ)/L)\n\nThe domain z is taken to be periodic, with the first and last points identified, so L=z[end]-z[begin]\n\nArguments\n\nz : Array 1d array with positions of the grid points - should have the same length as data data : Array 1d array of the data to be fit amplitudeguess : Float Initial guess for the amplitude (the value from the previous time point might be a good choice) offsetguess : Float Initial guess for the offset (the value from the previous time point might be a good choice) n : Int, default 1 The periodicity used for the fit\n\nReturns\n\namplitude : Float The amplitude A of the cosine fit offset : Float The offset δ of the cosine fit error : Float The RMS of the difference between data and the fit\n\n\n\n\n\n","category":"function"},{"location":"zz_analysis/#moment_kinetics.analysis.fit_delta_phi_mode-Tuple{Any, Any, Any}","page":"analysis","title":"moment_kinetics.analysis.fit_delta_phi_mode","text":"Fit delta_phi to get the frequency and growth rate.\n\nNote, expect the input to be a standing wave (as simulations are initialised with just a density perturbation), so need to extract both frequency and growth rate from the time-variation of the amplitude.\n\nThe function assumes that if the amplitude does not cross zero, then the mode is non-oscillatory and so fits just an exponential, not exp*cos. The simulation used as input should be long enough to contain at least ~1 period of oscillation if the mode is oscillatory or the fit will not work.\n\nArguments\n\nz : Array{mkfloat, 1} 1d array of the grid point positions t : Array{mkfloat, 1} 1d array of the time points deltaphi : Array{mkfloat, 2} 2d array of the values of delta_phi(z, t)\n\nReturns\n\nphifitresult struct whose fields are: growthrate : mkfloat Fitted growth rate of the mode amplitude0 : mkfloat Fitted amplitude at t=0 frequency : mkfloat Fitted frequency of the mode offset0 : mkfloat Fitted offset at t=0 amplitudefiterror : mkfloat RMS error in fit to ln(amplitude) - i.e. ln(A) offsetfiterror : mkfloat RMS error in fit to offset - i.e. δ cosinefiterror : mkfloat Maximum of the RMS errors of the cosine fits at each time point amplitude : Array{mkfloat, 1} Values of amplitude from which growthrate fit was calculated offset : Array{mk_float, 1} Values of offset from which frequency fit was calculated\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.get_Fourier_modes_1D-Union{Tuple{T}, Tuple{AbstractArray{T, 3}, moment_kinetics.coordinates.coordinate, Any, Any}} where T","page":"analysis","title":"moment_kinetics.analysis.get_Fourier_modes_1D","text":"Get 1D Fourier transform (in r) of nonuniformdata\n\nFirst interpolates to uniform grid, then uses FFT.\n\nIf zind is not given, find the zind where mode seems to be growing most strongly.\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.get_Fourier_modes_2D-Union{Tuple{T}, Tuple{AbstractArray{T, 3}, moment_kinetics.coordinates.coordinate, Any, moment_kinetics.coordinates.coordinate, Any}} where T","page":"analysis","title":"moment_kinetics.analysis.get_Fourier_modes_2D","text":"Get 2D Fourier transform (in r and z) of nonuniformdata\n\nFirst interpolates to uniform grid, then uses FFT\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.get_r_perturbation-Union{Tuple{AbstractArray{T, 3}}, Tuple{T}} where T","page":"analysis","title":"moment_kinetics.analysis.get_r_perturbation","text":"Return (v - mean(v, dims=2))\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.get_unnormalised_f_coords_2d-NTuple{9, Any}","page":"analysis","title":"moment_kinetics.analysis.get_unnormalised_f_coords_2d","text":"Get the unnormalised distribution function and unnormalised ('lab space') coordinates.\n\nInputs should depend only on z and vpa.\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.get_unnormalised_f_dzdt_1d-NTuple{8, Any}","page":"analysis","title":"moment_kinetics.analysis.get_unnormalised_f_dzdt_1d","text":"Get the unnormalised distribution function and unnormalised ('lab space') dzdt coordinate at a point in space.\n\nInputs should depend only on vpa.\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.moving_average-Tuple{AbstractVector, Int64}","page":"analysis","title":"moment_kinetics.analysis.moving_average","text":"Calculate a moving average\n\nresult[i] = mean(v[i-n:i+n])\n\nExcept near the ends of the array where indices outside the range of v are skipped.\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.steady_state_residuals-Tuple{Any, Any, Any}","page":"analysis","title":"moment_kinetics.analysis.steady_state_residuals","text":"steady_state_residuals(variable, variable_at_previous_time, dt;\n epsilon=0.0001, use_mpi=false)\n\nCalculate how close a variable is to steady state.\n\nCalculates several quantities. Define the 'squared absolute residual' r_mathrmabs(t)^2 for a quantity a(tx) as\n\nr_mathrmabs(t)^2 = left( a(tx) - a(t - delta tx) right)\n\nand the 'squared relative residual' r_mathrmrel(t)^2\n\nr_mathrmrel(t)^2 = left( fraca(tx) - a(t - delta tx)delta t left a(tx) + epsilon max_x(a(tx)) right right)\n\nwhere x stands for any spatial and velocity coordinates, and the offset epsilon max_x(a(tx)) is used to avoid points where a(tx) happens to be very close to zero from dominating the result in the 'squared relative residual', with max_x being the maximum over the x coordinate(s). Returns an OrderedDict containing: the maximum 'absolute residual' max_xleft( sqrtr_mathrmabs(t)^2 right) (\"RMS absolute residual\"); the root-mean-square (RMS) 'absolute residual' left sqrtr_mathrmabs(t)^2 right_x (\"max absolute residual\"); the maximum 'relative residual' max_xleft( sqrtr_mathrmrel(t)^2 right) (\"RMS relative residual\"); the root-mean-square (RMS) 'relative residual' left sqrtr_mathrmrel(t)^2 right_x (\"max relative residual\").\n\nvariable gives the value of a(tx) at the current time, variable_at_previous_time the value a(t - delta t x) at a previous time and dt gives the difference in times delta t. All three can be arrays with a time dimension of the same length, or have no time dimension.\n\nBy default runs in serial, but if use_mpi=true is passed, assume MPI has been initialised, and that variable has r and z dimensions but no species dimension, and use @loop_* macros. In this case the result is returned only on global rank 0. When using distributed-memory MPI, this routine will double-count the points on block boundaries.\n\nIf only_max_abs=true is passed, then only calculate the 'maxium absolute residual'. In this case the OrderedDict returned will have only one entry, for \"max absolute residual\".\n\n\n\n\n\n","category":"method"},{"location":"zz_analysis/#moment_kinetics.analysis.steady_state_square_residuals-Tuple{Any, Any, Any}","page":"analysis","title":"moment_kinetics.analysis.steady_state_square_residuals","text":"steady_state_square_residuals(variable, variable_at_previous_time, dt;\n variable_max=nothing, epsilon=1.0e-4,\n use_mpi=false, only_max_abs=false)\n\nUsed to calculate the mean square residual for steady_state_residuals.\n\nUseful to define this separately as it can be called on (equally-sized) chunks of the variable and then combined appropriately. If this is done, the global maximum of abs.(variable) should be passed to variable_max.\n\nSee steady_state_residuals for documenation of the other arguments. The return values of steady_state_residuals are the square-root of the return values of this function.\n\n\n\n\n\n","category":"method"},{"location":"zz_quadrature/#quadrature","page":"quadrature","title":"quadrature","text":"","category":"section"},{"location":"zz_quadrature/","page":"quadrature","title":"quadrature","text":"Modules = [moment_kinetics.quadrature]","category":"page"},{"location":"zz_quadrature/#moment_kinetics.quadrature","page":"quadrature","title":"moment_kinetics.quadrature","text":"\n\n\n\n","category":"module"},{"location":"zz_quadrature/#moment_kinetics.quadrature.composite_simpson_weights-Tuple{Any}","page":"quadrature","title":"moment_kinetics.quadrature.composite_simpson_weights","text":"compositesimpsonweights creates, computes, and returns an array for the 1D integration weights associated with each grid point using composite Simpson's rule\n\n\n\n\n\n","category":"method"},{"location":"zz_input_structs/#input_structs","page":"input_structs","title":"input_structs","text":"","category":"section"},{"location":"zz_input_structs/","page":"input_structs","title":"input_structs","text":"Modules = [moment_kinetics.input_structs]","category":"page"},{"location":"zz_input_structs/#moment_kinetics.input_structs","page":"input_structs","title":"moment_kinetics.input_structs","text":"\n\n\n\n","category":"module"},{"location":"zz_input_structs/#moment_kinetics.input_structs.advance_info","page":"input_structs","title":"moment_kinetics.input_structs.advance_info","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.advection_input","page":"input_structs","title":"moment_kinetics.input_structs.advection_input","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.collisions_input","page":"input_structs","title":"moment_kinetics.input_structs.collisions_input","text":"Collisions input struct to contain all the different collisions substructs and overall collision input parameters.\n\n\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.electron_physics_type","page":"input_structs","title":"moment_kinetics.input_structs.electron_physics_type","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.em_fields_input","page":"input_structs","title":"moment_kinetics.input_structs.em_fields_input","text":"Settings for electronmagenetic fields\n\n\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.geometry_input","page":"input_structs","title":"moment_kinetics.input_structs.geometry_input","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.ion_source_data","page":"input_structs","title":"moment_kinetics.input_structs.ion_source_data","text":"Source profile structs for ions and electrons which allows them to have any number of different sources (from wall perhaps, superposition of core sources, etc.). These sources are then contained in a vector of structs.\n\nSince the ion source must be the same as the electron source in all respects (apart from possibly a different electron temperature or source strength), the electron vector of source profile structs will be a kind of mirror of the ion vector of structs. \n\n\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.ion_species_parameters","page":"input_structs","title":"moment_kinetics.input_structs.ion_species_parameters","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.neutral_species_parameters","page":"input_structs","title":"moment_kinetics.input_structs.neutral_species_parameters","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.pp_input","page":"input_structs","title":"moment_kinetics.input_structs.pp_input","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.spatial_initial_condition_input","page":"input_structs","title":"moment_kinetics.input_structs.spatial_initial_condition_input","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.species_composition","page":"input_structs","title":"moment_kinetics.input_structs.species_composition","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.time_info","page":"input_structs","title":"moment_kinetics.input_structs.time_info","text":"t_error_sum is included so that a type which might be mkfloat or Float128 can be set by an option but known at compile time when a `timeinfo` struct is passed as a function argument.\n\n\n\n\n\n","category":"type"},{"location":"zz_input_structs/#moment_kinetics.input_structs.velocity_initial_condition_input","page":"input_structs","title":"moment_kinetics.input_structs.velocity_initial_condition_input","text":"\n\n\n\n","category":"type"},{"location":"zz_input_structs/#Base.get-Tuple{Dict, Any, Enum}","page":"input_structs","title":"Base.get","text":"Utility method for converting a string to an Enum when getting from a Dict, based on the type of the default value\n\n\n\n\n\n","category":"method"},{"location":"zz_input_structs/#moment_kinetics.input_structs.Dict_to_NamedTuple-Tuple{Any}","page":"input_structs","title":"moment_kinetics.input_structs.Dict_to_NamedTuple","text":"Convert a Dict whose keys are String or Symbol to a NamedTuple\n\nUseful as NamedTuple is immutable, so option values cannot be accidentally changed.\n\n\n\n\n\n","category":"method"},{"location":"zz_input_structs/#moment_kinetics.input_structs.check_sections!-Tuple{AbstractDict}","page":"input_structs","title":"moment_kinetics.input_structs.check_sections!","text":"check_sections!(options::AbstractDict)\n\nCheck that there are no unexpected sections in options. The 'expected sections' are the ones that were defined with set_defaults_and_check_section!.\n\n\n\n\n\n","category":"method"},{"location":"zz_input_structs/#moment_kinetics.input_structs.options_to_TOML-Tuple","page":"input_structs","title":"moment_kinetics.input_structs.options_to_TOML","text":"options_to_toml(io::IO [=stdout], data::AbstractDict; sorted=false, by=identity)\n\nConvert moment_kinetics 'options' (in the form of a Dict) to TOML format.\n\nThis function is defined so that we can handle some extra types, for example Enum.\n\nFor descriptions of the arguments, see TOML.print.\n\n\n\n\n\n","category":"method"},{"location":"zz_input_structs/#moment_kinetics.input_structs.set_defaults_and_check_section!","page":"input_structs","title":"moment_kinetics.input_structs.set_defaults_and_check_section!","text":"set_defaults_and_check_section!(options::AbstractDict, struct_type::Type,\n name::Union{String,Nothing}=nothing)\n\nAlternative form to be used when the options should be stored in a struct of type struct_type rather than a NamedTuple. struct_type must be defined using @kwdef.\n\nThe returned instance of struct_type is immutable, so if you need to modify the settings\n\ne.g. to apply some logic to set defaults depending on other settings/parameters - then\n\nyou should use the 'standard' version of set_defaults_and_check_section! that returns a Dict that can be modified, and then use that Dict to initialise the struct_type.\n\nThe name of the section in the options that will be read defaults to the name of struct_type, but can be set using the section_name argument.\n\nReturns an instance of struct_type.\n\n\n\n\n\n","category":"function"},{"location":"zz_input_structs/#moment_kinetics.input_structs.set_defaults_and_check_section!-Tuple{AbstractDict, Any}","page":"input_structs","title":"moment_kinetics.input_structs.set_defaults_and_check_section!","text":"Set the defaults for options in a section, and check that there are not any unexpected options (i.e. options that have no default).\n\nModifies the options[section_name]::Dict by adding defaults for any values that are not already present.\n\n\n\n\n\n","category":"method"},{"location":"zz_input_structs/#moment_kinetics.input_structs.set_defaults_and_check_top_level!-Tuple{AbstractDict}","page":"input_structs","title":"moment_kinetics.input_structs.set_defaults_and_check_top_level!","text":"Set the defaults for options in the top level of the input, and check that there are not any unexpected options (i.e. options that have no default).\n\nModifies the options[section_name]::Dict by adding defaults for any values that are not already present.\n\nIgnores any sections, as these will be checked separately.\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#array_allocation","page":"array_allocation","title":"array_allocation","text":"","category":"section"},{"location":"zz_array_allocation/","page":"array_allocation","title":"array_allocation","text":"Modules = [moment_kinetics.array_allocation]","category":"page"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation","page":"array_allocation","title":"moment_kinetics.array_allocation","text":"\n\n\n\n","category":"module"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_bool-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_bool","text":"allocate array with dimensions given by dims and entries of type Bool\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_complex-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_complex","text":"allocate 1d array with dimensions given by dims and entries of type Complex{mk_float}\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_float-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_float","text":"allocate array with dimensions given by dims and entries of type mk_float\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_int-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_int","text":"allocate 1d array with dimensions given by dims and entries of type mk_int\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_shared_bool-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_shared_bool","text":"variant where array is in shared memory for all processors in the 'block'\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_shared_complex-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_shared_complex","text":"variant where array is in shared memory for all processors in the 'block'\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_shared_float-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_shared_float","text":"variant where array is in shared memory for all processors in the 'block'\n\n\n\n\n\n","category":"method"},{"location":"zz_array_allocation/#moment_kinetics.array_allocation.allocate_shared_int-Tuple","page":"array_allocation","title":"moment_kinetics.array_allocation.allocate_shared_int","text":"variant where array is in shared memory for all processors in the 'block'\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#vpa_advection","page":"vpa_advection","title":"vpa_advection","text":"","category":"section"},{"location":"zz_vpa_advection/","page":"vpa_advection","title":"vpa_advection","text":"Modules = [moment_kinetics.vpa_advection]","category":"page"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection","page":"vpa_advection","title":"moment_kinetics.vpa_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.implicit_vpa_advection!-NTuple{24, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.implicit_vpa_advection!","text":"\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_constant!-NTuple{5, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_constant!","text":"update the advection speed dvpa/dt = constant\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_default!-NTuple{13, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_default!","text":"\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_linear-NTuple{5, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_linear","text":"update the advection speed dvpa/dt = const*(vpa + L/2)\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_n_p_evolution!-NTuple{10, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_n_p_evolution!","text":"update the advection speed in the parallel velocity coordinate for the case where density and pressure are evolved independently from the pdf; in this case, the parallel velocity coordinate is the normalized velocity vpahat = vpa/vth\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_n_u_evolution!-NTuple{9, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_n_u_evolution!","text":"update the advection speed in the parallel velocity coordinate for the case where density and flow are evolved independently from the pdf; in this case, the parallel velocity coordinate is the peculiar velocity wpa = vpa-upar\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_n_u_p_evolution!-NTuple{9, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_n_u_p_evolution!","text":"update the advection speed in the parallel velocity coordinate for the case where density, flow and pressure are evolved independently from the pdf; in this case, the parallel velocity coordinate is the normalized peculiar velocity wpahat = (vpa - upar)/vth\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.update_speed_vpa!-NTuple{13, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.update_speed_vpa!","text":"calculate the advection speed in the vpa-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"zz_vpa_advection/#moment_kinetics.vpa_advection.vpa_advection!-NTuple{16, Any}","page":"vpa_advection","title":"moment_kinetics.vpa_advection.vpa_advection!","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#interpolation","page":"interpolation","title":"interpolation","text":"","category":"section"},{"location":"zz_interpolation/","page":"interpolation","title":"interpolation","text":"Modules = [moment_kinetics.interpolation]","category":"page"},{"location":"zz_interpolation/#moment_kinetics.interpolation","page":"interpolation","title":"moment_kinetics.interpolation","text":"Interpolation routines intended for post-processing.\n\nNote these are not guaranteed to be highly optimized!\n\n\n\n\n\n","category":"module"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_1d!","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_1d!","text":"Interpolation from a regular grid to a 1d grid with arbitrary spacing\n\nArguments\n\nresult : Array{mkfloat, 1} Array to be overwritten with the result of the interpolation newgrid : Array{mkfloat, 1} Grid of points to interpolate coord to f : Array{mkfloat} Field to be interpolated coord : coordinate coordinate struct giving the coordinate along which f varies spectral : discretization_info struct containing information for discretization, whose type determines which method is used.\n\n\n\n\n\n","category":"function"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_1d-Tuple{Any, Vararg{Any}}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_1d","text":"Interpolation from a regular grid to a 1d grid with arbitrary spacing\n\nThis version allocates a new array for the result, which is returned.\n\nArguments\n\nnewgrid : Array{mkfloat, 1} Grid of points to interpolate coord to f : Array{mkfloat} Field to be interpolated coord : coordinate coordinate struct giving the coordinate along which f varies spectral : Bool or chebyshevinfo struct containing information for discretization, whose type determines which method is used.\n\nReturns\n\nresult : Array Array with the values of f interpolated to the points in new_grid.\n\n\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_vpa!-Tuple{AbstractVector{Float64}, Any, AbstractVector{Float64}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_vpa!","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_vpa!-Tuple{Array{Float64, 3}, Any, Array{Float64, 3}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_vpa!","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_vpa-Tuple{Any, AbstractVector{Float64}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_vpa","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_vpa-Tuple{Any, Array{Float64, 3}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_vpa","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_z!-Tuple{Array{Float64, 3}, Any, Array{Float64, 3}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_z!","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_z!-Tuple{Matrix{Float64}, Any, Matrix{Float64}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_z!","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_z!-Tuple{Vector{Float64}, Any, Vector{Float64}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_z!","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_z-Tuple{Any, Array{Float64, 3}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_z","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_z-Tuple{Any, Matrix{Float64}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_z","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.interpolate_to_grid_z-Tuple{Any, Vector{Float64}, Any, Any}","page":"interpolation","title":"moment_kinetics.interpolation.interpolate_to_grid_z","text":"\n\n\n\n","category":"method"},{"location":"zz_interpolation/#moment_kinetics.interpolation.single_element_interpolate!","page":"interpolation","title":"moment_kinetics.interpolation.single_element_interpolate!","text":"single_element_interpolate!(result, newgrid, f, imin, imax, coord, spectral)\n\nInterpolation within a single element.\n\nf is an array with the values of the input variable in the element to be interpolated. imin and imax give the start and end points of the element in the grid (used to calculate shift and scale factors to a normalised grid).\n\nnewgrid gives the points within the element where output is required. result is filled with the interpolated values at those points.\n\ncoord is the coordinate struct for the dimension along which interpolation is being done. spectral is the corresponding discretization_info.\n\n\n\n\n\n","category":"function"},{"location":"zz_initial_conditions/#initial_conditions","page":"initial_conditions","title":"initial_conditions","text":"","category":"section"},{"location":"zz_initial_conditions/","page":"initial_conditions","title":"initial_conditions","text":"Modules = [moment_kinetics.initial_conditions]","category":"page"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions","page":"initial_conditions","title":"moment_kinetics.initial_conditions","text":"\n\n\n\n","category":"module"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.allocate_pdf_and_moments-NTuple{13, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.allocate_pdf_and_moments","text":"Creates the structs for the pdf and the velocity-space moments\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.convert_full_f_ion_to_normalised!-NTuple{11, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.convert_full_f_ion_to_normalised!","text":"Take the full ion distribution function, calculate the moments, then normalise and shift to the moment-kinetic grid.\n\nUses input value of f and modifies in place to the normalised distribution functions. Input density, upar, ppar, and vth are not used, the values are overwritten with the moments of f.\n\nInputs/outputs depend on z, vperp, and vpa (should be inside loops over species, r)\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.convert_full_f_neutral_to_normalised!-NTuple{13, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.convert_full_f_neutral_to_normalised!","text":"Take the full neutral-particle distribution function, calculate the moments, then normalise and shift to the moment-kinetic grid.\n\nUses input value of f and modifies in place to the normalised distribution functions. Input density, upar, ppar, and vth are not used, the values are overwritten with the moments of f.\n\nInputs/outputs depend on z, vzeta, vr and vz (should be inside loops over species, r)\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.create_boundary_distributions-NTuple{7, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.create_boundary_distributions","text":"Allocate arrays for distributions to be applied as boundary conditions to the pdf at various boundaries. Also initialise the Knudsen cosine distribution here so it can be used when initialising the neutral pdf.\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.create_pdf-NTuple{8, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.create_pdf","text":"Allocate arrays for pdfs\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_density!-NTuple{5, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_density!","text":"\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_electron_density!-Tuple{Any, Any, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_electron_density!","text":"initialise the electron density\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_electron_pdf_over_density_and_boundary_phi!-NTuple{15, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_electron_pdf_over_density_and_boundary_phi!","text":"initelectronpdfoverdensityandboundaryphi initialises the normalised electron pdf = pdfe * vthe / dense and the boundary values of the electrostatic potential phi; care is taken to ensure that the parallel boundary condition is satisfied; NB: as the electron pdf is obtained via a time-independent equation, this 'initital' value for the electron will just be the first guess in an iterative solution\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_electron_upar!-NTuple{8, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_electron_upar!","text":"initialise the electron parallel flow density\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_electron_vth!-NTuple{4, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_electron_vth!","text":"initialise the electron thermal speed profile. for now the only initialisation option for the temperature is constant in z. returns vth0 = sqrt(2*Ts/Te)\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_ion_pdf_over_density!-NTuple{15, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_ion_pdf_over_density!","text":"\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_neutral_pdf_over_density!-NTuple{19, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_neutral_pdf_over_density!","text":"\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_pdf_and_moments!-NTuple{27, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_pdf_and_moments!","text":"creates the normalised pdfs and the velocity-space moments and populates them with a self-consistent initial condition\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_upar!-NTuple{5, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_upar!","text":"\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_uz!-NTuple{5, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_uz!","text":"\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.init_vth!-NTuple{5, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.init_vth!","text":"for now the only initialisation option for the temperature is constant in z returns vth0 = sqrt(2Ts/ms) / sqrt(2Te/ms) = sqrt(Ts/Te)\n\n\n\n\n\n","category":"method"},{"location":"zz_initial_conditions/#moment_kinetics.initial_conditions.initialize_pdf!-NTuple{14, Any}","page":"initial_conditions","title":"moment_kinetics.initial_conditions.initialize_pdf!","text":"\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing","page":"makie_post_processing","title":"makie_post_processing","text":"","category":"section"},{"location":"zz_makie_post_processing/","page":"makie_post_processing","title":"makie_post_processing","text":"Modules = [makie_post_processing, makie_post_processing.shared_utils]","category":"page"},{"location":"zz_makie_post_processing/#makie_post_processing.makie_post_processing","page":"makie_post_processing","title":"makie_post_processing.makie_post_processing","text":"Post processing functions using Makie.jl\n\nOptions are read by default from a file post_processing_input.toml, if it exists.\n\nThe plots can be generated from the command line by running\n\njulia --project run_makie_post_processing.jl dir1 [dir2 [dir3 ...]]\n\n\n\n\n\n","category":"module"},{"location":"zz_makie_post_processing/#makie_post_processing.input_dict","page":"makie_post_processing","title":"makie_post_processing.input_dict","text":"Global dict containing settings for makiepostprocessing. Can be re-loaded at any time to change settings.\n\nIs an OrderedDict so the order of sections is nicer if input_dict is written out as a TOML file.\n\n\n\n\n\n","category":"constant"},{"location":"zz_makie_post_processing/#makie_post_processing.input_dict_dfns","page":"makie_post_processing","title":"makie_post_processing.input_dict_dfns","text":"Global dict containing settings for makiepostprocessing for files with distribution function output. Can be re-loaded at any time to change settings.\n\nIs an OrderedDict so the order of sections is nicer if input_dict_dfns is written out as a TOML file.\n\n\n\n\n\n","category":"constant"},{"location":"zz_makie_post_processing/#makie_post_processing.Chodura_condition_plots","page":"makie_post_processing","title":"makie_post_processing.Chodura_condition_plots","text":"Chodura_condition_plots(run_info::Tuple; plot_prefix)\nChodura_condition_plots(run_info; plot_prefix=nothing, axes=nothing)\n\nPlot the criterion from the Chodura condition at the sheath boundaries.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots from the different runs are overlayed on the same axis, and heatmap plots are displayed in a horizontal row.\n\nSettings are read from the [Chodura_condition] section of the input.\n\nWhen run_info is a Tuple, plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf. When run_info is not a Tuple, plot_prefix is optional - plots will be saved only if it is passed.\n\nWhen run_info is not a Tuple, a Vector of Axis objects can be passed to axes, and each plot will be added to one of axes.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing._MMS_pdf_plots-NTuple{10, Any}","page":"makie_post_processing","title":"makie_post_processing._MMS_pdf_plots","text":"_MMS_pdf_plots(run_info, input, variable_name, plot_prefix, field_label,\n field_sym_label, norm_label, plot_dims, animate_dims)\n\nUtility function for making plots to avoid duplicated code in compare_ion_pdf_symbolic_test and compare_neutral_pdf_symbolic_test.\n\nThe information for the run to analyse is passed in run_info (as returned by get_run_info).\n\ninput is a NamedTuple of settings to use.\n\nvariable_name is the name of the variable being plotted.\n\nplot_prefix gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nfield_label is the label for the computed variable that will be used in plots/animations, field_sym_label is the label for the manufactured solution, and norm_label is the label for the error.\n\nplot_dims are the dimensions of the variable, and animate_dims are the same but omitting :t.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing._get_steady_state_residual_fig_axes-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing._get_steady_state_residual_fig_axes","text":" _get_steady_state_residual_fig_axes(n_runs)\n\nUtility method to avoid code duplication when creating the figaxes OrderedDict for calculatesteadystateresidual.\n\nn_runs sets the number of axes to create in each entry.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_1d-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.animate_1d","text":"animate_1d(xcoord, data; frame_index=nothing, ax=nothing, fig=nothing,\n xlabel=nothing, ylabel=nothing, title=nothing, yscale=nothing,\n transform=identity, outfile=nothing, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), kwargs...)\n\nMake a 1d animation of data vs xcoord.\n\nxlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\nIf ax is passed, the animation will be added to that existing Axis, otherwise a new Figure and Axis will be created. If ax is passed, you should also pass an Observable{mk_int} to frame_index so that the data for this animation can be updated when frame_index is changed.\n\nIf outfile is passed the animation will be saved to a file with that name. The suffix determines the file type. If ax is passed at the same time as outfile then the Figure containing ax must also be passed (to the fig argument) so that the animation can be saved.\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nOther kwargs are passed to Makie's lines!() function.\n\nIf ax is not passed, returns the Figure, otherwise returns the object returned by lines!().\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_2d-Tuple{Any, Any, Any}","page":"makie_post_processing","title":"makie_post_processing.animate_2d","text":"animate_2d(xcoord, ycoord, data; frame_index=nothing, ax=nothing, fig=nothing,\n colorbar_place=nothing, xlabel=nothing, ylabel=nothing, title=nothing,\n outfile=nothing, colormap=\"reverse_deep\", colorscale=nothing,\n transform=identity, axis_args=Dict{Symbol,Any}(), kwargs...)\n\nMake a 2d animation of data vs xcoord and ycoord.\n\nxlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\nIf ax is passed, the animation will be added to that existing Axis, otherwise a new Figure and Axis will be created. If ax is passed, you should also pass an Observable{mk_int} to frame_index so that the data for this animation can be updated when frame_index is changed.\n\nIf outfile is passed the animation will be saved to a file with that name. The suffix determines the file type. If ax is passed at the same time as outfile then the Figure containing ax must also be passed (to the fig argument) so that the animation can be saved.\n\ncolormap is included explicitly because we do some special handling so that extra Makie functionality can be specified by a prefix to the colormap string, rather than the standard Makie mechanism of creating a struct that modifies the colormap. For example Reverse(\"deep\") can be passed as \"reverse_deep\". This is useful so that these extra colormaps can be specified in an input file, but is not needed for interactive use.\n\nWhen xcoord and ycoord are both one-dimensional, uses Makie's heatmap!() function for the plot. If either or both of xcoord and ycoord are two-dimensional, instead uses irregular_heatmap!.\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nOther kwargs are passed to Makie's heatmap!() function.\n\nIf ax is not passed, returns the Figure, otherwise returns the object returned by heatmap!().\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_f_unnorm_vs_vpa","page":"makie_post_processing","title":"makie_post_processing.animate_f_unnorm_vs_vpa","text":"animate_f_unnorm_vs_vpa(run_info; input=nothing, neutral=false, is=1, iz=nothing,\n fig=nothing, ax=nothing, frame_index=nothing,\n outfile=nothing, yscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), kwargs...)\n\nPlot an unnormalized distribution function against v_parallel at a fixed z.\n\nThis function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.\n\nThe information for the runs to animate is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are overlayed on the same axis.\n\nBy default animates the ion distribution function. If neutrals=true is passed, animates the neutral distribution function instead.\n\nis selects which species to analyse.\n\nit and iz specify the indices of the time- and z-points to choose. By default they are taken from input.\n\nIf input is not passed, it is taken from input_dict_dfns[\"f\"].\n\nThe data needed will be loaded from file.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen run_info is not a Tuple, an Axis can be passed to ax to have the plot added to ax. When ax is passed, if outfile is passed to save the plot, then the Figure containing ax must be passed to fig.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nAny extra kwargs are passed to lines!() (which is used to create the plot, as we have to handle time-varying coordinates so cannot use animate_1d).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_f_unnorm_vs_vpa_z","page":"makie_post_processing","title":"makie_post_processing.animate_f_unnorm_vs_vpa_z","text":"animate_f_unnorm_vs_vpa_z(run_info; input=nothing, neutral=false, is=1,\n fig=nothing, ax=nothing, frame_index=nothing,\n outfile=nothing, yscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), kwargs...)\n\nAnimate an unnormalized distribution function against v_parallel and z.\n\nThis function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are displayed in a horizontal row.\n\nBy default animates the ion distribution function. If neutrals=true is passed, animates the neutral distribution function instead.\n\nis selects which species to analyse.\n\nIf input is not passed, it is taken from input_dict_dfns[\"f\"].\n\nThe data needed will be loaded from file.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen run_info is not a Tuple, an Axis can be passed to ax to have the animation created in ax. When ax is passed, if outfile is passed to save the animation, then the Figure containing ax must be passed to fig.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nAny extra kwargs are passed to plot_2d (which is used to create the plot, as we have to handle time-varying coordinates so cannot use animate_2d).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_r","text":"animate_vs_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vpa","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vpa","text":"animate_vs_vpa(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_vpa(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vpa.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vpa_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vpa_r","text":"animate_vs_vpa_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vpa_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vpa.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vpa_vperp","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vpa_vperp","text":"animate_vs_vpa_vperp(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vpa_vperp(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vperp and vpa.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vpa_z","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vpa_z","text":"animate_vs_vpa_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vpa_z(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vpa.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vperp","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vperp","text":"animate_vs_vperp(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_vperp(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vperp.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vperp_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vperp_r","text":"animate_vs_vperp_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vperp_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vperp.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vperp_z","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vperp_z","text":"animate_vs_vperp_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vperp_z(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vperp.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vr","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vr","text":"animate_vs_vr(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_vr(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vr.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vr_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vr_r","text":"animate_vs_vr_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vr_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vr.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vr_vzeta","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vr_vzeta","text":"animate_vs_vr_vzeta(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vr_vzeta(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vr.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vr_z","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vr_z","text":"animate_vs_vr_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vr_z(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vr.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vz","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vz","text":"animate_vs_vz(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_vz(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vz.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vz_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vz_r","text":"animate_vs_vz_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vz_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vz.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vz_vr","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vz_vr","text":"animate_vs_vz_vr(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vz_vr(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vr and vz.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vz_vzeta","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vz_vzeta","text":"animate_vs_vz_vzeta(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vz_vzeta(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vz.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vz_z","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vz_z","text":"animate_vs_vz_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vz_z(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vz.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vzeta","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vzeta","text":"animate_vs_vzeta(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_vzeta(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vzeta_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vzeta_r","text":"animate_vs_vzeta_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vzeta_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vzeta.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_vzeta_z","page":"makie_post_processing","title":"makie_post_processing.animate_vs_vzeta_z","text":"animate_vs_vzeta_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_vzeta_z(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vzeta.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_z","page":"makie_post_processing","title":"makie_post_processing.animate_vs_z","text":"animate_vs_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\nanimate_vs_z(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, outfile=nothing, yscale=nothing,\n transform=identity, ylims=nothing, label=nothing,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,\n ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,\n ivz=nothing, kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z.\n\nIf a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nWhen a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.animate_vs_z_r","page":"makie_post_processing","title":"makie_post_processing.animate_vs_z_r","text":"animate_vs_z_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nanimate_vs_z_r(run_info, var_name; is=1, data=nothing,\n input=nothing, frame_index=nothing, ax=nothing,\n fig=nothing, colorbar_place=colorbar_place,\n title=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\n\nAnimate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and z.\n\nIf a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.\n\noutfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.\n\nWhen a single run_info is passed, the (sub-)title can be set with the title argument.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case returns nothing.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.calculate_steady_state_residual","page":"makie_post_processing","title":"makie_post_processing.calculate_steady_state_residual","text":"calculatesteadystateresidual(runinfo, variablename; is=1, data=nothing, plotprefix=nothing, figaxes=nothing, irun=1)\n\nCalculate and plot the 'residuals' for variable_name.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are displayed in a horizontal row.\n\nIf the variable has a species dimension, is selects which species to analyse.\n\nBy default the variable will be loaded from file. If the data has already been loaded, it can be passed to data instead. data should be a Tuple of the same length as run_info if run_info is a Tuple.\n\nIf plot_prefix is passed, it gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf.\n\nfig_axes can be passed an OrderedDict of Tuples as returned by _get_steady_state_residual_fig_axes - each tuple contains the Figure fig and Axis or Tuple{Axis} ax to which to add the plot corresponding to its key. If run_info is a Tuple, ax for each entry must be a Tuple of the same length.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.clear_Dict!-Tuple{AbstractDict}","page":"makie_post_processing","title":"makie_post_processing.clear_Dict!","text":"clear_Dict!(d::AbstractDict)\n\nRemove all entries from an AbstractDict, leaving it empty\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.compare_ion_pdf_symbolic_test-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.compare_ion_pdf_symbolic_test","text":"compare_ion_pdf_symbolic_test(run_info, plot_prefix; io=nothing,\n input=nothing)\n\nCompare the computed and manufactured solutions for the ion distribution function.\n\nThe information for the run to analyse is passed in run_info (as returned by get_run_info).\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nIf io is passed then error norms will be written to that file.\n\ninput is a NamedTuple of settings to use. If not given it will be read from the [manufactured_solns] section of [input_dict_dfns][@ref].\n\nNote: when calculating error norms, data is loaded only for 1 time point and for an r-z chunk that is the same size as computed by 1 block of the simulation at run time. This should prevent excessive memory requirements for this function.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.compare_moment_symbolic_test-NTuple{6, Any}","page":"makie_post_processing","title":"makie_post_processing.compare_moment_symbolic_test","text":"compare_moment_symbolic_test(run_info, plot_prefix, field_label, field_sym_label,\n norm_label, variable_name; io=nothing)\n\nCompare the computed and manufactured solutions for a field or moment variable variable_name.\n\nThe information for the run to analyse is passed in run_info (as returned by get_run_info).\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nfield_label is the label that will be used for the name of the computed variable in plots, field_sym_label is the label for the manufactured solution, and norm_label is the label for the error (the difference between the computed and manufactured solutions).\n\nIf io is passed then error norms will be written to that file.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.compare_neutral_pdf_symbolic_test-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.compare_neutral_pdf_symbolic_test","text":"compare_neutral_pdf_symbolic_test(run_info, plot_prefix; io=nothing,\n input=nothing)\n\nCompare the computed and manufactured solutions for the neutral distribution function.\n\nThe information for the run to analyse is passed in run_info (as returned by get_run_info).\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nIf io is passed then error norms will be written to that file.\n\ninput is a NamedTuple of settings to use. If not given it will be read from the [manufactured_solns] section of [input_dict_dfns][@ref].\n\nNote: when calculating error norms, data is loaded only for 1 time point and for an r-z chunk that is the same size as computed by 1 block of the simulation at run time. This should prevent excessive memory requirements for this function.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.constraints_plots-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing.constraints_plots","text":"constraints_plots(run_info; plot_prefix=plot_prefix)\n\nPlot and/or animate the coefficients used to correct the normalised distribution function(s) (aka shape functions) to obey the moment constraints.\n\nIf there were no discretisation errors, we would have A=1, B=0, C=0. The plots/animations show (A-1) so that all three coefficients can be shown nicely on the same axes.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.convert_to_OrderedDicts!-Tuple{AbstractDict}","page":"makie_post_processing","title":"makie_post_processing.convert_to_OrderedDicts!","text":"convert_to_OrderedDicts!(d::AbstractDict)\n\nRecursively convert an AbstractDict to OrderedDict.\n\nAny nested AbstractDicts are also converted to OrderedDict.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.curvilinear_grid_mesh-NTuple{4, Any}","page":"makie_post_processing","title":"makie_post_processing.curvilinear_grid_mesh","text":"curvilinear_grid_mesh(xs, ys, zs, colors)\n\nTesselates the grid defined by xs and ys in order to form a mesh with per-face coloring given by colors.\n\nThe grid defined by xs and ys must have dimensions (nx, ny) == size(colors) .+ 1, as is the case for heatmap/image.\n\nCode from: https://github.com/MakieOrg/Makie.jl/issues/742#issuecomment-1415809653\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.generate_example_input_Dict-Tuple{}","page":"makie_post_processing","title":"makie_post_processing.generate_example_input_Dict","text":"generate_example_input_Dict()\n\nCreate a Dict containing all the makie-post-processing options with default values\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.generate_example_input_file","page":"makie_post_processing","title":"makie_post_processing.generate_example_input_file","text":"generate_example_input_file(filename::String=post_processing_input.toml;\n overwrite::Bool=false)\n\nCreate an example makie-post-processing input file.\n\nEvery option is commented out, but filled with the default value.\n\nPass filename to choose the name of the example file (defaults to the default input file name used by makie_post_process()).\n\nPass overwrite=true to overwrite any existing file at filename.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.get_1d_ax","page":"makie_post_processing","title":"makie_post_processing.get_1d_ax","text":"get_1d_ax(n=nothing; title=nothing, subtitles=nothing, yscale=nothing,\n get_legend_place=nothing, size=nothing, kwargs...)\n\nCreate a new Figure fig and Axis ax intended for 1d plots.\n\ntitle gives an overall title to the Figure.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10.\n\nBy default creates a single Axis, and returns (fig, ax). If a number of axes n is passed, then ax is a Vector{Axis} of length n (even if n is 1). The axes are created in a horizontal row, and the width of the figure is increased in proportion to n.\n\nget_legend_place can be set to one of (:left, :right, :above, :below) to create a GridPosition for a legend in the corresponding place relative to each Axis. If get_legend_place is set, (fig, ax, legend_place) is returned where legend_place is a GridPosition (if n=nothing) or a Tuple of n GridPositions.\n\nWhen n is passed, subtitles can be passed a Tuple of length n which will be used to set a subtitle for each Axis in ax.\n\nsize is passed through to the Figure constructor. Its default value is (600, 400) if n is not passed, or (600*n, 400) if n is passed.\n\nExtra kwargs are passed to the Axis() constructor.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.get_2d_ax","page":"makie_post_processing","title":"makie_post_processing.get_2d_ax","text":"get_2d_ax(n=nothing; title=nothing, subtitles=nothing, size=nothing, kwargs...)\n\nCreate a new Figure fig and Axis ax intended for 2d plots.\n\ntitle gives an overall title to the Figure.\n\nBy default creates a single Axis, and returns (fig, ax, colorbar_place), where colorbar_place is a location in the grid layout that can be passed to Colorbar() located immediately to the right of ax. If a number of axes n is passed, then ax is a Vector{Axis} and colorbar_place is a Vector{GridPosition} of length n (even if n is 1). The axes are created in a horizontal row, and the width of the figure is increased in proportion to n.\n\nWhen n is passed, subtitles can be passed a Tuple of length n which will be used to set a subtitle for each Axis in ax.\n\nsize is passed through to the Figure constructor. Its default value is (600, 400) if n is not passed, or (600*n, 400) if n is passed.\n\nExtra kwargs are passed to the Axis() constructor.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.get_dimension_slice_indices-Tuple","page":"makie_post_processing","title":"makie_post_processing.get_dimension_slice_indices","text":"getdimensionsliceindices(keepdims...; input, it=nothing, is=nothing, ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing)\n\nGet indices for dimensions to slice\n\nThe indices are taken from input, unless they are passed as keyword arguments\n\nThe dimensions in keep_dims are not given a slice (those are the dimensions we want in the variable after slicing).\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.get_run_info-Tuple","page":"makie_post_processing","title":"makie_post_processing.get_run_info","text":"get_run_info(run_dir...; itime_min=1, itime_max=0,\n itime_skip=1, dfns=false, initial_electron=false, do_setup=true,\n setup_input_file=nothing)\nget_run_info((run_dir, restart_index)...; itime_min=1, itime_max=0,\n itime_skip=1, dfns=false, initial_electron=false, do_setup=true,\n setup_input_file=nothing)\n\nGet file handles and other info for a single run\n\nrun_dir is either the directory to read output from (whose name should be the run_name), or a momentkinetics binary output file. If a file is passed, it is only used to infer the directory and `runname, so it is possible for example to pass a.moments.h5output file and alsodfns=trueand the.dfns.h5` file will be the one actually opened (as long as it exists).\n\nrestart_index can be given by passing a Tuple, e.g. (\"runs/example\", 42) as the positional argument. It specifies which restart to read if there are multiple restarts. If no restart_index is given or if nothing is passed, read all restarts and concatenate them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index).\n\nSeveral runs can be loaded at the same time by passing multiple positional arguments. Each argument can be a String run_dir giving a directory to read output from or a Tuple (run_dir, restart_index) giving both a directory and a restart index (it is allowed to mix Strings and Tuples in a call).\n\nBy default load data from moments files, pass dfns=true to load from distribution functions files, or initial_electron=true and dfns=true to load from initial electron state files.\n\nThe itime_min, itime_max and itime_skip options can be used to select only a slice of time points when loading data. In makie_post_process these options are read from the input (if they are set) before get_run_info() is called, so that the run_info returned can be passed to setup_makie_post_processing_input!, to be used for defaults for the remaining options. If either itime_min or itime_max are ≤0, their values are used as offsets from the final time index of the run.\n\nsetup_makie_post_processing_input!() is called at the end of get_run_info(), for convenience when working interactively. Use moment_kinetics.load_data.get_run_info_no_setup if you do not want this. A post-processing input file can be passed to setup_input_file that will be passed to setup_makie_post_processing_input!() if you do not want to use the default input file.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.get_variable_symbol-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing.get_variable_symbol","text":"get_variable_symbol(variable_name)\n\nGet a symbol corresponding to a variable_name\n\nFor example get_variable_symbol(\"phi\") returns \"ϕ\".\n\nIf the symbol has not been defined, just return variable_name.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.grid_points_to_faces","page":"makie_post_processing","title":"makie_post_processing.grid_points_to_faces","text":"grid_points_to_faces(coord::AbstractVector)\ngrid_points_to_faces(coord::Observable{T} where T <: AbstractVector)\ngrid_points_to_faces(coord::AbstractMatrix)\ngrid_points_to_faces(coord::Observable{T} where T <: AbstractMatrix)\n\nTurn grid points in coord into 'cell faces'.\n\nReturns faces, which has a length one greater than coord. The first and last values of faces are the first and last values of coord. The intermediate values are the mid points between grid points.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.instability2D_plots","page":"makie_post_processing","title":"makie_post_processing.instability2D_plots","text":"instability2D_plots(run_info::Tuple, variable_name; plot_prefix, zind=nothing)\ninstability2D_plots(run_info, variable_name; plot_prefix, zind=nothing,\n axes_and_observables=nothing)\n\nMake plots of variable_name for analysis of 2D instability.\n\nThe information for the runs to analyse and plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, make plots comparing the runs, shown in a horizontal row..\n\nSettings are read from the [instability2D] section of the input.\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nWhen run_info is not a Tuple, axes_and_observables can be passed to add plots and animations to existing figures, although this is not very convenient - see the use of this argument when called from the run_info::Tuple method.\n\nIf zind is not passed, it is calculated as the z-index where the mode seems to have the maximum growth rate for this variable. Returns zind.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.irregular_heatmap!-NTuple{4, Any}","page":"makie_post_processing","title":"makie_post_processing.irregular_heatmap!","text":"irregular_heatmap!(ax, xs, ys, zs; kwargs...)\n\nPlot a heatmap onto the Axis ax where xs and ys are allowed to define irregularly spaced, 2d grids. zs gives the value in each cell of the grid.\n\nThe grid defined by xs and ys must have dimensions (nx, ny) == size(zs) .+ 1, as is the case for heatmap/image.\n\nxs be an array of size (nx,ny) or a vector of size (nx).\n\nys be an array of size (nx,ny) or a vector of size (ny).\n\nkwargs are passed to Makie's mesh() function.\n\nCode adapted from: https://github.com/MakieOrg/Makie.jl/issues/742#issuecomment-1415809653\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.irregular_heatmap-Tuple{Any, Any, Any}","page":"makie_post_processing","title":"makie_post_processing.irregular_heatmap","text":"irregular_heatmap(xs, ys, zs; kwargs...)\n\nPlot a heatmap where xs and ys are allowed to define irregularly spaced, 2d grids. zs gives the value in each cell of the grid.\n\nThe grid defined by xs and ys must have dimensions (nx, ny) == size(zs) .+ 1, as is the case for heatmap/image.\n\nxs be an array of size (nx,ny) or a vector of size (nx).\n\nys be an array of size (nx,ny) or a vector of size (ny).\n\nkwargs are passed to Makie's mesh() function.\n\nCode adapted from: https://github.com/MakieOrg/Makie.jl/issues/742#issuecomment-1415809653\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.makie_post_process-Tuple","page":"makie_post_processing","title":"makie_post_processing.makie_post_process","text":"makie_post_process(run_dir...;\n input_file::String=default_input_file_name,\n restart_index::Union{Nothing,mk_int,Tuple}=nothing,\n plot_prefix::Union{Nothing,AbstractString}=nothing)\n\nRun post processing with input read from a TOML file\n\nrun_dir... is the path to the directory to plot from. If more than one run_dir is given, plots comparing the runs in run_dir... are made. A momentkinetics binary output file can also be passed as `rundir, in which case the filename is only used to infer the directory andrun_name, so it is possible for example to pass a.moments.h5output file and still make distribution function plots (as long as the corresponding.dfns.h5` file exists).\n\nrestart_index specifies which restart to read if there are multiple restarts. The default (nothing) reads all restarts and concatenates them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index). A tuple with the same length as run_dir can also be passed to give a different restart_index for each run.\n\nplot_prefix can be specified to give the prefix (directory and first part of file name) to use when saving plots/animations. By default the run directory and run name are used if there is only one run, and \"comparisonplots/compare\" is used if there are multiple runs.\n\nIf input_file does not exist, prints warning and uses default options.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.makie_post_process-Tuple{Union{String, Tuple}, AbstractDict{String, Any}}","page":"makie_post_processing","title":"makie_post_processing.makie_post_process","text":"makie_post_process(run_dir::Union{String,Tuple},\n new_input_dict::Dict{String,Any};\n restart_index::Union{Nothing,mk_int,Tuple}=nothing,\n plot_prefix::Union{Nothing,AbstractString}=nothing)\n\nRun post prossing, with (non-default) input given in a Dict\n\nrun_dir... is the path to the directory to plot from. If more than one run_dir is given, plots comparing the runs in run_dir... are made. A momentkinetics binary output file can also be passed as `rundir, in which case the filename is only used to infer the directory andrun_name, so it is possible for example to pass a.moments.h5output file and still make distribution function plots (as long as the corresponding.dfns.h5` file exists).\n\ninput_dict is a dictionary containing settings for the post-processing.\n\nrestart_index specifies which restart to read if there are multiple restarts. The default (nothing) reads all restarts and concatenates them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index). A tuple with the same length as run_dir can also be passed to give a different restart_index for each run.\n\nplot_prefix can be specified to give the prefix (directory and first part of file name) to use when saving plots/animations. By default the run directory and run name are used if there is only one run, and \"comparisonplots/compare\" is used if there are multiple runs.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.manufactured_solutions_analysis","page":"makie_post_processing","title":"makie_post_processing.manufactured_solutions_analysis","text":"manufactured_solutions_analysis(run_info; plot_prefix)\nmanufactured_solutions_analysis(run_info::Tuple; plot_prefix)\n\nCompare computed and manufactured solutions for field and moment variables for a 'method of manufactured solutions' (MMS) test.\n\nThe information for the run to analyse is passed in run_info (as returned by get_run_info).\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nSettings are read from the [manufactured_solns] section of the input.\n\nWhile a Tuple of run_info can be passed for compatibility with makie_post_process(), at present comparison of multiple runs is not supported - passing a Tuple of length greater than one will result in an error.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.manufactured_solutions_analysis_dfns","page":"makie_post_processing","title":"makie_post_processing.manufactured_solutions_analysis_dfns","text":"manufactured_solutions_analysis_dfns(run_info; plot_prefix)\nmanufactured_solutions_analysis_dfns(run_info::Tuple; plot_prefix)\n\nCompare computed and manufactured solutions for distribution function variables for a 'method of manufactured solutions' (MMS) test.\n\nThe information for the run to analyse is passed in run_info (as returned by get_run_info).\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nSettings are read from the [manufactured_solns] section of the input.\n\nWhile a Tuple of run_info can be passed for compatibility with makie_post_process(), at present comparison of multiple runs is not supported - passing a Tuple of length greater than one will result in an error.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.manufactured_solutions_get_field_and_field_sym-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.manufactured_solutions_get_field_and_field_sym","text":" manufactured_solutions_get_field_and_field_sym(run_info, variable_name;\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing)\n\nGet the data variable for variable_name from the output, and calculate the manufactured solution variable_sym.\n\nThe information for the runs to analyse and plot is passed in run_info (as returned by get_run_info).\n\nit, ir, iz, ivperp, ivpa, ivzeta, ivr, ivz can be used to select a subset of the grid by passing an integer or range for any dimension.\n\nReturns variable, variable_sym.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.parse_colormap-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing.parse_colormap","text":"parse_colormap(colormap)\n\nParse a colormap option\n\nAllows us to have a string option which can be set in the input file and still use Reverse, etc. conveniently.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_1d-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.plot_1d","text":"plot_1d(xcoord, data; ax=nothing, xlabel=nothing, ylabel=nothing, title=nothing,\n yscale=nothing, transform=identity, axis_args=Dict{Symbol,Any}(),\n kwargs...)\n\nMake a 1d plot of data vs xcoord.\n\nxlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\nIf ax is passed, the plot will be added to that existing Axis, otherwise a new Figure and Axis will be created.\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nOther kwargs are passed to Makie's lines!() function.\n\nIf ax is not passed, returns the Figure, otherwise returns the object returned by lines!().\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_2d-Tuple{Any, Any, Any}","page":"makie_post_processing","title":"makie_post_processing.plot_2d","text":"plot_2d(xcoord, ycoord, data; ax=nothing, colorbar_place=nothing, xlabel=nothing,\n ylabel=nothing, title=nothing, colormap=\"reverse_deep\",\n colorscale=nothing, transform=identity, axis_args=Dict{Symbol,Any}(),\n kwargs...)\n\nMake a 2d plot of data vs xcoord and ycoord.\n\nxlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\nIf ax is passed, the plot will be added to that existing Axis, otherwise a new Figure and Axis will be created.\n\ncolormap is included explicitly because we do some special handling so that extra Makie functionality can be specified by a prefix to the colormap string, rather than the standard Makie mechanism of creating a struct that modifies the colormap. For example Reverse(\"deep\") can be passed as \"reverse_deep\". This is useful so that these extra colormaps can be specified in an input file, but is not needed for interactive use.\n\nWhen xcoord and ycoord are both one-dimensional, uses Makie's heatmap!() function for the plot. If either or both of xcoord and ycoord are two-dimensional, instead uses irregular_heatmap!.\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nOther kwargs are passed to Makie's heatmap!() function.\n\nIf ax is not passed, returns the Figure, otherwise returns the object returned by heatmap!().\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_charged_pdf_2D_at_wall-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing.plot_charged_pdf_2D_at_wall","text":"plot_charged_pdf_2D_at_wall(run_info; plot_prefix, electron=false)\n\nMake plots/animations of the ion distribution function at wall boundaries.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots/animations from the different runs are overlayed on the same axis, and heatmap plots/animations are displayed in a horizontal row.\n\nSettings are read from the [wall_pdf] section of the input.\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf. When run_info is not a Tuple, plot_prefix is optional - plots/animations will be saved only if it is passed.\n\nIf electron=true is passed, plot electron distribution function instead of ion distribution function.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_f_unnorm_vs_vpa","page":"makie_post_processing","title":"makie_post_processing.plot_f_unnorm_vs_vpa","text":"plot_f_unnorm_vs_vpa(run_info; input=nothing, neutral=false, it=nothing, is=1,\n iz=nothing, fig=nothing, ax=nothing, outfile=nothing,\n yscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), kwargs...)\n\nPlot an unnormalized distribution function against v_parallel at a fixed z.\n\nThis function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are overlayed on the same axis.\n\nBy default plots the ion distribution function. If neutrals=true is passed, plots the neutral distribution function instead.\n\nis selects which species to analyse.\n\nit and iz specify the indices of the time- and z-points to choose. By default they are taken from input.\n\nIf input is not passed, it is taken from input_dict_dfns[\"f\"].\n\nThe data needed will be loaded from file.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nWhen run_info is not a Tuple, an Axis can be passed to ax to have the plot added to ax. When ax is passed, if outfile is passed to save the plot, then the Figure containing ax must be passed to fig.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nAny extra kwargs are passed to plot_1d.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_f_unnorm_vs_vpa_z","page":"makie_post_processing","title":"makie_post_processing.plot_f_unnorm_vs_vpa_z","text":"plot_f_unnorm_vs_vpa_z(run_info; input=nothing, neutral=false, it=nothing, is=1,\n fig=nothing, ax=nothing, outfile=nothing, yscale=identity,\n transform=identity, rasterize=true, subtitles=nothing,\n axis_args=Dict{Symbol,Any}(), kwargs...)\n\nPlot unnormalized distribution function against v_parallel and z.\n\nThis function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are displayed in a horizontal row.\n\nBy default plots the ion distribution function. If neutrals=true is passed, plots the neutral distribution function instead.\n\nis selects which species to analyse.\n\nit specifies the time-index to choose. By default it is taken from input.\n\nIf input is not passed, it is taken from input_dict_dfns[\"f\"].\n\nThe data needed will be loaded from file.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nWhen run_info is not a Tuple, an Axis can be passed to ax to have the plot created in ax. When ax is passed, if outfile is passed to save the plot, then the Figure containing ax must be passed to fig.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\nrasterize is passed through to Makie's mesh!() function. The default is to rasterize plots as vectorized plots from mesh!() have a very large file size. Pass false to keep plots vectorized. Pass a number to increase the resolution of the rasterized plot by that factor.\n\nWhen run_info is a Tuple, subtitles can be passed a Tuple (with the same length as run_info) to set the subtitle for each subplot.\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nAny extra kwargs are passed to plot_2d.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_neutral_pdf_2D_at_wall-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing.plot_neutral_pdf_2D_at_wall","text":"plot_neutral_pdf_2D_at_wall(run_info; plot_prefix)\n\nMake plots/animations of the neutral particle distribution function at wall boundaries.\n\nThe information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots/animations from the different runs are overlayed on the same axis, and heatmap plots/animations are displayed in a horizontal row.\n\nSettings are read from the [wall_pdf_neutral] section of the input.\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf. When run_info is not a Tuple, plot_prefix is optional - plots/animations will be saved only if it is passed.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_r","text":"plot_vs_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs r.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_r_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_r_t","text":"plot_vs_r_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_r_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and r.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_t","text":"plot_vs_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs t.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vpa","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vpa","text":"plot_vs_vpa(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_vpa(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vpa.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vpa_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vpa_r","text":"plot_vs_vpa_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vpa_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vpa.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vpa_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vpa_t","text":"plot_vs_vpa_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vpa_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vpa.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vpa_vperp","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vpa_vperp","text":"plot_vs_vpa_vperp(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vpa_vperp(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vperp and vpa.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vpa_z","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vpa_z","text":"plot_vs_vpa_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vpa_z(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vpa.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vperp","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vperp","text":"plot_vs_vperp(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_vperp(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vperp.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vperp_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vperp_r","text":"plot_vs_vperp_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vperp_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vperp.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vperp_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vperp_t","text":"plot_vs_vperp_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vperp_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vperp.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vperp_z","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vperp_z","text":"plot_vs_vperp_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vperp_z(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vperp.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vr","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vr","text":"plot_vs_vr(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_vr(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vr.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vr_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vr_r","text":"plot_vs_vr_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vr_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vr.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vr_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vr_t","text":"plot_vs_vr_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vr_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vr.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vr_vzeta","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vr_vzeta","text":"plot_vs_vr_vzeta(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vr_vzeta(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vr.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vr_z","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vr_z","text":"plot_vs_vr_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vr_z(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vr.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vz","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vz","text":"plot_vs_vz(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_vz(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vz.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vz_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vz_r","text":"plot_vs_vz_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vz_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vz.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vz_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vz_t","text":"plot_vs_vz_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vz_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vz.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vz_vr","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vz_vr","text":"plot_vs_vz_vr(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vz_vr(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vr and vz.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vz_vzeta","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vz_vzeta","text":"plot_vs_vz_vzeta(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vz_vzeta(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vz.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vz_z","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vz_z","text":"plot_vs_vz_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vz_z(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vz.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vzeta","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vzeta","text":"plot_vs_vzeta(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_vzeta(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vzeta.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vzeta_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vzeta_r","text":"plot_vs_vzeta_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vzeta_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vzeta.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vzeta_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vzeta_t","text":"plot_vs_vzeta_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vzeta_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vzeta.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_vzeta_z","page":"makie_post_processing","title":"makie_post_processing.plot_vs_vzeta_z","text":"plot_vs_vzeta_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_vzeta_z(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vzeta.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_z","page":"makie_post_processing","title":"makie_post_processing.plot_vs_z","text":"plot_vs_z(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, yscale=nothing,\ntransform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing, kwargs...)\nplot_vs_z(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing, label=nothing,\n outfile=nothing, yscale=nothing, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info) vs z.\n\nIf a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\nyscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's lines!() function.\n\nWhen a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_z_r","page":"makie_post_processing","title":"makie_post_processing.plot_vs_z_r","text":"plot_vs_z_r(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_z_r(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and z.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plot_vs_z_t","page":"makie_post_processing","title":"makie_post_processing.plot_vs_z_t","text":"plot_vs_z_t(run_info::Tuple, var_name; is=1, data=nothing,\n input=nothing, outfile=nothing, colorscale=identity,\n transform=identity, axis_args=Dict{Symbol,Any}(),\n it=nothing, ir=nothing, iz=nothing, ivperp=nothing,\n ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,\n kwargs...)\nplot_vs_z_t(run_info, var_name; is=1, data=nothing,\n input=nothing, ax=nothing,\n colorbar_place=nothing, title=nothing,\n outfile=nothing, colorscale=identity, transform=identity,\n axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,\n iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,\n ivr=nothing, ivz=nothing, kwargs...)\n\nPlot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and z.\n\nIf a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.\n\nit, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.\n\nIf outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.\n\ncolorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).\n\naxis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.\n\nExtra kwargs are passed to Makie's heatmap!() function.\n\nWhen a single run_info is passed, title can be used to set the title for the (sub-)plot.\n\nWhen a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.\n\nBy default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.\n\nReturns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.\n\nBy default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.plots_for_dfn_variable-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.plots_for_dfn_variable","text":"plots_for_dfn_variable(run_info, variable_name; plot_prefix, has_rdim=true,\n has_zdim=true, is_1V=false)\n\nMake plots for the distribution function variable variable_name.\n\nWhich plots to make are determined by the settings in the section of the input whose heading is the variable name.\n\nrun_info is the information returned by get_run_info(). The dfns=true keyword argument must have been passed to get_run_info() so that output files containing the distribution functions are being read.\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nhas_rdim, has_zdim and/or is_1V can be passed to allow the function to skip some plots that do not make sense for 0D/1D or 1V simulations (regardless of the settings).\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.plots_for_variable-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.plots_for_variable","text":"plots_for_variable(run_info, variable_name; plot_prefix, has_rdim=true,\n has_zdim=true, is_1V=false,\n steady_state_residual_fig_axes=nothing)\n\nMake plots for the EM field or moment variable variable_name.\n\nWhich plots to make are determined by the settings in the section of the input whose heading is the variable name.\n\nrun_info is the information returned by get_run_info.\n\nplot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf for plots and plot_prefix.gif, etc. for animations.\n\nhas_rdim, has_zdim and/or is_1V can be passed to allow the function to skip some plots that do not make sense for 0D/1D or 1V simulations (regardless of the settings).\n\nsteady_state_residual_fig_axes contains the figure, axes and legend places for steady state residual plots.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.positive_or_nan-Tuple{Any}","page":"makie_post_processing","title":"makie_post_processing.positive_or_nan","text":"positive_or_nan(x; epsilon=0)\n\nIf the argument x is zero or negative, replace it with NaN, otherwise return x.\n\nepsilon can be passed if the number should be forced to be above some value (typically we would assume epsilon is small and positive, but nothing about this function forces it to be).\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.println_to_stdout_and_file-Tuple{Any, Vararg{Any}}","page":"makie_post_processing","title":"makie_post_processing.println_to_stdout_and_file","text":"println_to_stdout_and_file(io, stuff...)\n\nPrint stuff both to stdout and to a file io.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.put_legend_above-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.put_legend_above","text":"putlegendabove(fig, ax; kwargs...)\n\nAdd a legend corresponding to the plot in ax to fig on the left of a new row at the top of the figure layout.\n\nAdditional kwargs are passed to the Legend() constructor.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.put_legend_below-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.put_legend_below","text":"putlegendbelow(fig, ax; kwargs...)\n\nAdd a legend corresponding to the plot in ax to fig on the left of a new row at the bottom of the figure layout.\n\nAdditional kwargs are passed to the Legend() constructor.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.put_legend_left-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.put_legend_left","text":"putlegendleft(fig, ax; kwargs...)\n\nAdd a legend corresponding to the plot in ax to fig on the bottom of a new column at the left of the figure layout.\n\nAdditional kwargs are passed to the Legend() constructor.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.put_legend_right-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.put_legend_right","text":"putlegendright(fig, ax; kwargs...)\n\nAdd a legend corresponding to the plot in ax to fig on the bottom of a new column at the right of the figure layout.\n\nAdditional kwargs are passed to the Legend() constructor.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.save_animation-NTuple{4, Any}","page":"makie_post_processing","title":"makie_post_processing.save_animation","text":"save_animation(fig, frame_index, nt, outfile)\n\nAnimate fig and save the result in outfile.\n\nframe_index is the Observable{mk_int} that updates the data used to make fig to a new time point. nt is the total number of time points to create.\n\nThe suffix of outfile determines the file type.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.select_slice","page":"makie_post_processing","title":"makie_post_processing.select_slice","text":"select_slice(variable::AbstractArray, dims::Symbol...; input=nothing, it=nothing,\n is=1, ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing)\n\nReturns a slice of variable that includes only the dimensions given in dims..., e.g.\n\nselect_slice(variable, :t, :r)\n\nto get a two dimensional slice with t- and r-dimensions.\n\nAny other dimensions present in variable have a single point selected. By default this point is set by the options in input (which must be a NamedTuple) (or the final point for time or the size of the dimension divided by 3 if input is not given). These defaults can be overridden using the keyword arguments it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, ivz. Ranges can also be passed to these keyword arguments for the 'kept dimensions' in dims to select a subset of those dimensions.\n\nThis function only recognises what the dimensions of variable are by the number of dimensions in the array. It assumes that either the variable has already been sliced to the correct dimensions (if ndims(variable) == length(dims) it just returns variable) or that variable has the full number of dimensions it could have (i.e. 'field' variables have 3 dimensions, 'moment' variables 4, 'ion distribution function' variables 6 and 'neutral distribution function' variables 7).\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.setup_makie_post_processing_input!","page":"makie_post_processing","title":"makie_post_processing.setup_makie_post_processing_input!","text":"setup_makie_post_processing_input!(input_file::Union{AbstractString,Nothing}=nothing;\n run_info_moments=nothing, run_info_dfns=nothing,\n allow_missing_input_file=false)\nsetup_makie_post_processing_input!(new_input_dict::AbstractDict{String,Any};\n run_info_moments=nothing,\n run_info_dfns=nothing)\n\nPass input_file to read the input from an input file other than post_processing_input.toml. You can also pass a Dict{String,Any} of options.\n\nSet up input, storing in the global input_dict and input_dict_dfns to be used in the various plotting and analysis functions.\n\nThe run_info that you are using (as returned by get_run_info) should be passed to run_info_moments (if it contains only the moments), or run_info_dfns (if it also contains the distributions functions), or both (if you have loaded both sets of output). This allows default values to be set based on the grid sizes and number of time points read from the output files. Note that setup_makie_post_processing_input!() is called by default at the end of get_run_info(), for conveinence in interactive use.\n\nBy default an error is raised if input_file does not exist. To continue anyway, using default options, pass allow_missing_input_file=true.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.sound_wave_plots","page":"makie_post_processing","title":"makie_post_processing.sound_wave_plots","text":"sound_wave_plots(run_info::Tuple; plot_prefix)\nsound_wave_plots(run_info; outfile=nothing, ax=nothing, phi=nothing)\n\nCalculate decay rate and frequency for the damped 'sound wave' in a 1D1V simulation in a periodic box. Plot the mode amplitude vs. time along with the fitted decay rate.\n\nThe information for the runs to analyse and plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots from the different runs are overlayed on the same axis.\n\nSettings are read from the [sound_wave] section of the input.\n\nWhen run_info is a Tuple, plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix.pdf. When run_info is not a Tuple, outfile can be passed, to save the plot to outfile.\n\nWhen run_info is not a Tuple, ax can be passed to add the plot to an existing Axis.\n\nWhen run_info is not a Tuple, the array containing data for phi can be passed to phi - by default this data is loaded from the output file.\n\n\n\n\n\n","category":"function"},{"location":"zz_makie_post_processing/#makie_post_processing.timestep_diagnostics-Tuple{Any, Any}","page":"makie_post_processing","title":"makie_post_processing.timestep_diagnostics","text":"timestep_diagnostics(run_info, run_info_dfns; plot_prefix=nothing, it=nothing)\n\nPlot a time-trace of some adaptive-timestep diagnostics: steps per output, timestep failures per output, how many times per output each variable caused a timestep failure, and which factor limited the length of successful timesteps (CFL, accuracy, max_timestep).\n\nIf plot_prefix is passed, it gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix_timestep_diagnostics.pdf.\n\nit can be used to select a subset of the time points by passing a range.\n\n\n\n\n\n","category":"method"},{"location":"zz_makie_post_processing/#makie_post_processing.shared_utils.calculate_and_write_frequencies-NTuple{9, Any}","page":"makie_post_processing","title":"makie_post_processing.shared_utils.calculate_and_write_frequencies","text":"\n\n\n\n","category":"method"},{"location":"zz_z_advection/#z_advection","page":"z_advection","title":"z_advection","text":"","category":"section"},{"location":"zz_z_advection/","page":"z_advection","title":"z_advection","text":"Modules = [moment_kinetics.z_advection]","category":"page"},{"location":"zz_z_advection/#moment_kinetics.z_advection","page":"z_advection","title":"moment_kinetics.z_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_z_advection/#moment_kinetics.z_advection.adjust_advection_speed!-NTuple{5, Any}","page":"z_advection","title":"moment_kinetics.z_advection.adjust_advection_speed!","text":"\n\n\n\n","category":"method"},{"location":"zz_z_advection/#moment_kinetics.z_advection.unnormalize_pdf!-NTuple{6, Any}","page":"z_advection","title":"moment_kinetics.z_advection.unnormalize_pdf!","text":"\n\n\n\n","category":"method"},{"location":"zz_z_advection/#moment_kinetics.z_advection.update_speed_z!-NTuple{13, Any}","page":"z_advection","title":"moment_kinetics.z_advection.update_speed_z!","text":"calculate the advection speed in the z-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"zz_z_advection/#moment_kinetics.z_advection.z_advection!-NTuple{15, Any}","page":"z_advection","title":"moment_kinetics.z_advection.z_advection!","text":"do a single stage time advance (potentially as part of a multi-stage RK scheme)\n\n\n\n\n\n","category":"method"},{"location":"zz_species_input/#species_input","page":"species_input","title":"species_input","text":"","category":"section"},{"location":"zz_species_input/","page":"species_input","title":"species_input","text":"Modules = [moment_kinetics.species_input]","category":"page"},{"location":"zz_species_input/#moment_kinetics.species_input","page":"species_input","title":"moment_kinetics.species_input","text":"Module for handling i/o for species specific input parameters which are hosted in the composition and species structs for passing to functions\n\n\n\n\n\n","category":"module"},{"location":"zz_gyroaverages/#gyroaverages","page":"gyroaverages","title":"gyroaverages","text":"","category":"section"},{"location":"zz_gyroaverages/","page":"gyroaverages","title":"gyroaverages","text":"Modules = [moment_kinetics.gyroaverages]","category":"page"},{"location":"zz_gyroaverages/#moment_kinetics.gyroaverages","page":"gyroaverages","title":"moment_kinetics.gyroaverages","text":"module for supporting gyroaverages at fixed guiding centre R and fixed position r\n\n\n\n\n\n","category":"module"},{"location":"zz_gyroaverages/#moment_kinetics.gyroaverages.elementlist!-Tuple{Any, Any, Any}","page":"gyroaverages","title":"moment_kinetics.gyroaverages.elementlist!","text":"for a given list of coordinate values, determine in which elements they are found -1 indicates that the required element would be outside of the existing grid\n\n– assume here that the coordinates are fully local in memory\n\n\n\n\n\n","category":"method"},{"location":"zz_gyroaverages/#moment_kinetics.gyroaverages.gyroaverage_field!-NTuple{7, Any}","page":"gyroaverages","title":"moment_kinetics.gyroaverages.gyroaverage_field!","text":"function for gyroaveraging a field of shape (z,r) and filling the result into an array of shape (vperp,z,r,s)\n\n\n\n\n\n","category":"method"},{"location":"zz_gyroaverages/#moment_kinetics.gyroaverages.gyroaverage_pdf!-NTuple{8, Any}","page":"gyroaverages","title":"moment_kinetics.gyroaverages.gyroaverage_pdf!","text":"function for gyroaveraging a charge particle pdf of shape (vpa,vperp,z,r,s) and filling the result into an of the same shape\n\n\n\n\n\n","category":"method"},{"location":"zz_derivatives/#derivatives","page":"derivatives","title":"derivatives","text":"","category":"section"},{"location":"zz_derivatives/","page":"derivatives","title":"derivatives","text":"Modules = [moment_kinetics.derivatives]","category":"page"},{"location":"zz_derivatives/#moment_kinetics.derivatives","page":"derivatives","title":"moment_kinetics.derivatives","text":"This module contains all the necessary derivatives needed to carry out distributed memory differential operations on the arrays in moment kinetics. We provide separate derivative functions for each (i) distributed dimension and (ii) array shape. We do not need to provide derivatives for non-distributed dimensions as these can by handled by the derivative! function from calculus.jl\n\n\n\n\n\n","category":"module"},{"location":"zz_calculus/#calculus","page":"calculus","title":"calculus","text":"","category":"section"},{"location":"zz_calculus/","page":"calculus","title":"calculus","text":"Modules = [moment_kinetics.calculus]","category":"page"},{"location":"zz_calculus/#moment_kinetics.calculus","page":"calculus","title":"moment_kinetics.calculus","text":"\n\n\n\n","category":"module"},{"location":"zz_calculus/#moment_kinetics.calculus.derivative!-NTuple{4, Any}","page":"calculus","title":"moment_kinetics.calculus.derivative!","text":"derivative!(df, f, coord, spectral)\n\nNon-upwinding derivative.\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.derivative!-Tuple{Any, Any, Any, Any, moment_kinetics.moment_kinetics_structs.discretization_info}","page":"calculus","title":"moment_kinetics.calculus.derivative!","text":"derivative!(df, f, coord, adv_fac, spectral)\n\nUpwinding derivative.\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.derivative_elements_to_full_grid!-Tuple{Any, Any, Any, AbstractVector{Float64}}","page":"calculus","title":"moment_kinetics.calculus.derivative_elements_to_full_grid!","text":"\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.derivative_elements_to_full_grid!-Tuple{Any, Any, Any}","page":"calculus","title":"moment_kinetics.calculus.derivative_elements_to_full_grid!","text":"\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.elements_to_full_grid_interior_pts!-Tuple{Any, Any, Any}","page":"calculus","title":"moment_kinetics.calculus.elements_to_full_grid_interior_pts!","text":"maps the derivative at points away from element boundaries from the grid/element representation to the full grid representation\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.elementwise_derivative!","page":"calculus","title":"moment_kinetics.calculus.elementwise_derivative!","text":"elementwise_derivative!(coord, f, adv_fac, spectral)\nelementwise_derivative!(coord, f, spectral)\n\nGeneric function for element-by-element derivatives\n\nFirst signature, with adv_fac, calculates an upwind derivative, the second signature calculates a derivative without upwinding information.\n\nResult is stored in coord.scratch_2d.\n\n\n\n\n\n","category":"function"},{"location":"zz_calculus/#moment_kinetics.calculus.integral-NTuple{10, Any}","page":"calculus","title":"moment_kinetics.calculus.integral","text":"Computes the integral of the 3D integrand, using the input wgts\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.integral-NTuple{4, Any}","page":"calculus","title":"moment_kinetics.calculus.integral","text":"Computes the integral of the integrand multiplied by v^n, using the input wgts\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.integral-NTuple{7, Any}","page":"calculus","title":"moment_kinetics.calculus.integral","text":"Computes the integral of the 2D integrand, using the input wgts\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.integral-Tuple{Any, Any, Any}","page":"calculus","title":"moment_kinetics.calculus.integral","text":"Computes the integral of the integrand multiplied by v, using the input wgts\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.integral-Tuple{Any, Any}","page":"calculus","title":"moment_kinetics.calculus.integral","text":"Computes the integral of the integrand, using the input wgts\n\n\n\n\n\n","category":"method"},{"location":"zz_calculus/#moment_kinetics.calculus.mass_matrix_solve!","page":"calculus","title":"moment_kinetics.calculus.mass_matrix_solve!","text":"mass_matrix_solve!(f, b, spectral::weak_discretization_info)\n\nSolve\n\nMf = b\n\nfor a, where M is the mass matrix of a weak-form finite element method and b is an input.\n\n\n\n\n\n","category":"function"},{"location":"zz_calculus/#moment_kinetics.calculus.reconcile_element_boundaries_upwind!-Tuple{Any, Any, Any, AbstractVector{Float64}}","page":"calculus","title":"moment_kinetics.calculus.reconcile_element_boundaries_upwind!","text":"if at the boundary point within the element, must carefully choose which value of df to use; this is because df is multi-valued at the overlapping point at the boundary between neighboring elements. here we choose to use the value of df from the upwind element.\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_vpa_advection/#electron_vpa_advection","page":"electron_vpa_advection","title":"electron_vpa_advection","text":"","category":"section"},{"location":"zz_electron_vpa_advection/","page":"electron_vpa_advection","title":"electron_vpa_advection","text":"Modules = [moment_kinetics.electron_vpa_advection]","category":"page"},{"location":"zz_electron_vpa_advection/#moment_kinetics.electron_vpa_advection","page":"electron_vpa_advection","title":"moment_kinetics.electron_vpa_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_electron_vpa_advection/#moment_kinetics.electron_vpa_advection.electron_vpa_advection!-NTuple{12, Any}","page":"electron_vpa_advection","title":"moment_kinetics.electron_vpa_advection.electron_vpa_advection!","text":"calculate the wpa-advection term for the electron kinetic equation = (vthe / 2 ppare * dppare/dz + wpa / 2 ppare * dqpare/dz - wpa^2 * dvthe/dz) * df/dwpa\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_vpa_advection/#moment_kinetics.electron_vpa_advection.update_electron_speed_vpa!-NTuple{7, Any}","page":"electron_vpa_advection","title":"moment_kinetics.electron_vpa_advection.update_electron_speed_vpa!","text":"calculate the electron advection speed in the wpa-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#numerical_dissipation","page":"numerical_dissipation","title":"numerical_dissipation","text":"","category":"section"},{"location":"zz_numerical_dissipation/","page":"numerical_dissipation","title":"numerical_dissipation","text":"Modules = [moment_kinetics.numerical_dissipation]","category":"page"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation","text":"\n\n\n\n","category":"module"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.force_minimum_pdf_value!-Tuple{Any, Any}","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.force_minimum_pdf_value!","text":"force_minimum_pdf_value!(f, minval)\n\nSet a minimum value for the pdf-sized array f. Any points less than the minimum are set to the minimum. By default, no minimum is applied. The minimum value can be set by\n\n[ion_numerical_dissipation]\nforce_minimum_pdf_value = 0.0\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.force_minimum_pdf_value_neutral!-Tuple{Any, Any}","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.force_minimum_pdf_value_neutral!","text":"force_minimum_pdf_value_neutral!(f, minval)\n\nSet a minimum value for the neutral-pdf-sized array f. Any points less than the minimum are set to the minimum. By default, no minimum is applied. The minimum value can be set by\n\n[neutral_numerical_dissipation]\nforce_minimum_pdf_value = 0.0\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.r_dissipation!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.r_dissipation!","text":"Add diffusion in the r direction to suppress oscillations\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[ion_numerical_dissipation]\nr_dissipation_coefficient = 0.1\n\n\nNote that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.r_dissipation_neutral!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.r_dissipation_neutral!","text":"Add diffusion in the r direction to suppress oscillations for neutrals\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[neutral_numerical_dissipation]\nr_dissipation_coefficient = 0.1\n\n\nNote that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.setup_numerical_dissipation-Tuple{Any}","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.setup_numerical_dissipation","text":"Define the dissipation parameters for each species, which means there need to be three sections in each input file that specify the parameters required of each species, as follows:\n\n[ion_numerical_dissipation]\nvpa_dissipation_coefficient\n...\n\n[electron_numerical_dissipation]\nvpa_dissipation_coefficient\n...\n\n[neutral_numerical_dissipation]\nvz_dissipation_coefficient\n...\n\nThere will still be the -1.0 default parameters.\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.vpa_boundary_buffer_decay!-NTuple{6, Any}","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.vpa_boundary_buffer_decay!","text":"Suppress the distribution function by damping towards a Maxwellian in the last element before the vpa boundaries, to avoid numerical instabilities there.\n\nDisabled by default.\n\nThe damping rate is set in the input TOML file by the parameter\n\n[ion_numerical_dissipation]\nvpa_boundary_buffer_damping_rate = 0.1\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.vpa_boundary_buffer_diffusion!-NTuple{6, Any}","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.vpa_boundary_buffer_diffusion!","text":"Suppress the distribution function by applying diffusion in the last element before the vpa boundaries, to avoid numerical instabilities there.\n\nDisabled by default.\n\nThe maximum diffusion rate in the buffer is set in the input TOML file by the parameter\n\n[ion_numerical_dissipation]\nvpa_boundary_buffer_diffusion_coefficient = 0.1\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.vpa_boundary_force_decreasing!-Tuple{Any, Any}","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.vpa_boundary_force_decreasing!","text":"Try to suppress oscillations near the boundary by ensuring that every point in the final element is ≤ the innermost value. The distribution function should be decreasing near the boundaries, so this should be an OK thing to force.\n\nNote: not currently used.\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.vpa_dissipation!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.vpa_dissipation!","text":"Add diffusion in the vpa direction to suppress oscillations\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[ion_numerical_dissipation]\nvpa_dissipation_coefficient = 0.1\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.vperp_dissipation!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.vperp_dissipation!","text":"Add diffusion in the vperp direction to suppress oscillations\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[ion_numerical_dissipation]\nvperp_dissipation_coefficient = 0.1\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.vz_dissipation_neutral!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.vz_dissipation_neutral!","text":"Add diffusion in the vz direction to suppress oscillations for neutrals\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[neutral_numerical_dissipation]\nvz_dissipation_coefficient = 0.1\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.z_dissipation!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.z_dissipation!","text":"Add diffusion in the z direction to suppress oscillations\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[ion_numerical_dissipation]\nz_dissipation_coefficient = 0.1\n\nNote that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries\n\n\n\n\n\n","category":"method"},{"location":"zz_numerical_dissipation/#moment_kinetics.numerical_dissipation.z_dissipation_neutral!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, T_spectral, Any, Any, Any}} where T_spectral","page":"numerical_dissipation","title":"moment_kinetics.numerical_dissipation.z_dissipation_neutral!","text":"Add diffusion in the z direction to suppress oscillations for neutrals\n\nDisabled by default.\n\nThe diffusion coefficient is set in the input TOML file by the parameter\n\n[neutral_numerical_dissipation]\nz_dissipation_coefficient = 0.1\n\nNote that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries\n\n\n\n\n\n","category":"method"},{"location":"input_options/#Input-Options","page":"Input Options","title":"Input Options","text":"","category":"section"},{"location":"input_options/","page":"Input Options","title":"Input Options","text":"This page describes the input options that can be specified in .toml input files. The input variable name is given first, followed by its default value and a brief description.","category":"page"},{"location":"input_options/#File-I/O","page":"Input Options","title":"File I/O","text":"","category":"section"},{"location":"input_options/","page":"Input Options","title":"Input Options","text":"Option name Default value Description\nrun_name name of the input .toml file with the .toml suffix removed prefix for all output files associated with this run\nbase_directory \"runs\" directory where the simulation data will be stored","category":"page"},{"location":"input_options/#Model-Options","page":"Input Options","title":"Model Options","text":"","category":"section"},{"location":"input_options/#Timestepping-Options","page":"Input Options","title":"Timestepping Options","text":"","category":"section"},{"location":"input_options/","page":"Input Options","title":"Input Options","text":"See timestepping-input-parameters.","category":"page"},{"location":"input_options/#Special-cases","page":"Input Options","title":"Special cases","text":"","category":"section"},{"location":"input_options/","page":"Input Options","title":"Input Options","text":"Some options apply only for certain types of run, etc. These special cases are described in the following subsections.","category":"page"},{"location":"zz_gauss_legendre/#gauss_legendre","page":"gauss_legendre","title":"gauss_legendre","text":"","category":"section"},{"location":"zz_gauss_legendre/","page":"gauss_legendre","title":"gauss_legendre","text":"Modules = [moment_kinetics.gauss_legendre]","category":"page"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre","text":"module for Gauss-Legendre-Lobatto and Gauss-Legendre-Radau spectral element grids\n\n\n\n\n\n","category":"module"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.gausslegendre_base_info","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.gausslegendre_base_info","text":"structs for passing around matrices for taking the derivatives on Gauss-Legendre points in 1D\n\n\n\n\n\n","category":"type"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.GaussLegendre_derivative_vector!-NTuple{5, Any}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.GaussLegendre_derivative_vector!","text":"Gauss-Legendre derivative at arbitrary x values, for boundary condition on radau points D0 – the vector xj – the x location where the derivative is evaluated ngrid – number of points in x x – the grid from -1, 1 Note that D0 is not scaled to the physical grid\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.GaussLegendre_weak_product_matrix!-Tuple{Array{Float64, 3}, Vararg{Any, 4}}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.GaussLegendre_weak_product_matrix!","text":"assign abitrary weak inner product matrix Q on a 1D line with Jacobian = 1 matrix Q acts on two vectors x1 and x2 such that the quadratic form y = x1 * Q * x2 is also a vector\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.GaussLegendre_weak_product_matrix!-Tuple{Matrix{Float64}, Vararg{Any, 4}}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.GaussLegendre_weak_product_matrix!","text":"assign abitrary weak inner product matrix Q on a 1D line with Jacobian = 1 matrix Q acts on a single vector x such that y = Q * x is also a vector\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.Legendre_h_n-Tuple{Any}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.Legendre_h_n","text":"result of the inner product of Legendre polys of order k\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.gausslobattolegendre_differentiation_matrix!-Tuple{Matrix{Float64}, Vector{Float64}, Int64}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.gausslobattolegendre_differentiation_matrix!","text":"Formula for differentiation matrix taken from p196 of Chpt The Spectral Elemtent Method' ofComputational Seismology'. Heiner Igel First Edition. Published in 2017 by Oxford University Press. Or https://doc.nektar.info/tutorials/latest/fundamentals/differentiation/fundamentals-differentiationch2.html\n\nD – differentiation matrix x – Gauss-Legendre-Lobatto points in [-1,1] ngrid – number of points per element (incl. boundary points)\n\nNote that D has does not include a scaling factor\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.gaussradaulegendre_differentiation_matrix!-Tuple{Matrix{Float64}, Vector{Float64}, Int64}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.gaussradaulegendre_differentiation_matrix!","text":"From https://doc.nektar.info/tutorials/latest/fundamentals/differentiation/fundamentals-differentiationch2.html\n\nD – differentiation matrix x – Gauss-Legendre-Radau points in [-1,1) ngrid – number of points per element (incl. boundary points)\n\nNote that D has does not include a scaling factor\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.scaled_gauss_legendre_lobatto_grid-NTuple{7, Any}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.scaled_gauss_legendre_lobatto_grid","text":"function for setting up the full Gauss-Legendre-Lobatto grid and collocation point weights\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.scaled_gauss_legendre_radau_grid-NTuple{8, Any}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.scaled_gauss_legendre_radau_grid","text":"function for setting up the full Gauss-Legendre-Radau grid and collocation point weights see comments of Gauss-Legendre-Lobatto routine above\n\n\n\n\n\n","category":"method"},{"location":"zz_gauss_legendre/#moment_kinetics.gauss_legendre.setup_global_weak_form_matrix!-Tuple{Matrix{Float64}, moment_kinetics.gauss_legendre.gausslegendre_base_info, moment_kinetics.gauss_legendre.gausslegendre_base_info, Any, Any}","page":"gauss_legendre","title":"moment_kinetics.gauss_legendre.setup_global_weak_form_matrix!","text":"A function that assigns the local weak-form matrices to a global array QQ_global for later solving weak form of required 1D equation.\n\nThe 'option' variable is a flag for choosing the type of matrix to be constructed. Currently the function is set up to assemble the elemental matrices without imposing boundary conditions on the first and final rows of the matrix by default. This means that the operators constructed from this function can only be used for differentiation, and not solving 1D ODEs. This assembly function assumes that the coordinate is not distributed. To extend this function to support distributed-memory MPI, addition of off-memory matrix elements to the exterior points would be required.\n\nThe typical use of this function is to assemble matrixes M and K in\n\nM * d2f = K * f \n\nwhere M is the mass matrix and K is the stiffness matrix, and we wish to solve for d2f given f. To solve 1D ODEs\n\nK * f = b = M * d2f \n\nfor f given boundary data on f with periodic or dirichlet boundary conditions, set \n\nperiodic_bc = true, b[end] = 0\n\nor \n\ndirichlet_bc = true, b[1] = f[1] (except for cylindrical coordinates), b[end] = f[end]\n\nin the function call, and create new matrices for this purpose in the gausslegendre_info struct. Currently the Laplacian matrix is supported with boundary conditions.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#fokker_planck_calculus","page":"fokker_planck_calculus","title":"fokker_planck_calculus","text":"","category":"section"},{"location":"zz_fokker_planck_calculus/","page":"fokker_planck_calculus","title":"fokker_planck_calculus","text":"Modules = [moment_kinetics.fokker_planck_calculus]","category":"page"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus","text":"module for functions used in calculating the integrals and doing the numerical differentiation for the implementation of the the Full-F Fokker-Planck Collision Operator moment_kinetics.fokker_planck.\n\nParallelisation of the collision operator uses a special 'anyv' region type, see Collision operator and anyv region.\n\n\n\n\n\n","category":"module"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.boundary_integration_weights_struct","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.boundary_integration_weights_struct","text":"a struct to contain the integration weights for the boundary points in the (vpa,vperp) domain\n\n\n\n\n\n","category":"type"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.fokkerplanck_boundary_data_arrays_struct","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.fokkerplanck_boundary_data_arrays_struct","text":"a struct used for calculating the integration weights for the boundary of the velocity space domain in (vpa,vperp) coordinates\n\n\n\n\n\n","category":"type"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.fokkerplanck_weakform_arrays_struct","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.fokkerplanck_weakform_arrays_struct","text":"a struct of dummy arrays and precalculated coefficients for the weak-form Fokker-Planck collision operator \n\n\n\n\n\n","category":"type"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.calculate_rosenbluth_integrals!-NTuple{20, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.calculate_rosenbluth_integrals!","text":"Function to carry out the integration of the revelant distribution functions to form the required coefficients for the full-F operator. We assume that the weights are precalculated. The function takes as arguments the arrays of coefficients (which we fill), the required distributions, the precomputed weights, the indicies of the `field' velocities, and the sizes of the primed vpa and vperp coordinates arrays.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.enforce_vpavperp_BCs!-NTuple{5, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.enforce_vpavperp_BCs!","text":"function to enforce boundary conditions on the collision operator result to be consistent with the boundary conditions imposed on the the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.get_element_limit_indices-NTuple{4, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.get_element_limit_indices","text":"function for getting the indices used to choose the integration quadrature \n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.get_global_compound_index-NTuple{6, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.get_global_compound_index","text":"get_global_compound_index(vpa,vperp,ielement_vpa,ielement_vperp,ivpa_local,ivperp_local)\n\nFor local (within the single element specified by ielement_vpa and ielement_vperp) indices ivpa_local and ivperp_local, get the global index in the 'linear-indexed' 2d space of size (vperp.n, vpa.n) (as returned by ic_func).\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.ic_func-Tuple{Int64, Int64, Int64}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.ic_func","text":"ic_func(ivpa::mk_int,ivperp::mk_int,nvpa::mk_int)\n\nGet the 'linear index' corresponding to ivpa and ivperp. Defined so that the linear index corresponds to the underlying layout in memory of a 2d array indexed by [ivpa,ivperp], i.e. for a 2d array f2d:\n\nsize(f2d) == (vpa.n, vperp.n)\nFor a reference to f2d that is reshaped to a vector (a 1d array) f1d = vec(f2d) than for any ivpa and ivperp it is true that f1d[ic_func(ivpa,ivperp)] == f2d[ivpa,ivperp].\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.ielement_loopup-Tuple{Any, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.ielement_loopup","text":"function to find the element in which x sits\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.init_Rosenbluth_potential_boundary_integration_weights!-NTuple{8, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.init_Rosenbluth_potential_boundary_integration_weights!","text":"function that precomputes the required integration weights only along the velocity space boundaries\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.init_Rosenbluth_potential_integration_weights!-NTuple{8, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.init_Rosenbluth_potential_integration_weights!","text":"function that precomputes the required integration weights\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.interpolate_2D_vspace!-NTuple{5, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.interpolate_2D_vspace!","text":"function to interpolate f(vpa,vperp) from one velocity grid to another, assuming that both grids are represented by vpa, vperp in normalised units, but have different normalisation factors defining the meaning of these grids in physical units.\n\nE.g. vpai, vperpi = ci * vpa, ci * vperp vpae, vperpe = ce * vpa, ce * vperp\n\nwith ci = sqrt(Ti/mi), ce = sqrt(Te/mi)\n\nscalefac = ci / ce is the ratio of the two reference speeds\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.ivpa_func-Tuple{Int64, Int64}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.ivpa_func","text":"ivpa_func(ic::mk_int,nvpa::mk_int)\n\nGet the vpa index ivpa that corresponds to a 'linear index' ic that spans a 2d velocity space.\n\nDefined so that ivpa_func(inc_func(ivpa,ivperp,nvpa), nvpa) == ivpa.\n\nSee also ic_func, ivperp_func.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.ivperp_func-Tuple{Int64, Int64}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.ivperp_func","text":"ivperp_func(ic::mk_int,nvpa::mk_int)\n\nGet the vperp index ivperp that corresponds to a 'linear index' ic that spans a 2d velocity space.\n\nDefined so that ivperp_func(inc_func(ivpa,ivperp,nvpa), nvpa) == ivperp.\n\nSee also ic_func, ivpa_func.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_calculus/#moment_kinetics.fokker_planck_calculus.setup_basic_quadratures-Tuple{Any, Any}","page":"fokker_planck_calculus","title":"moment_kinetics.fokker_planck_calculus.setup_basic_quadratures","text":"function for getting the basic quadratures used for the numerical integration of the Lagrange polynomials and the Green's function.\n\n\n\n\n\n","category":"method"},{"location":"zz_maxwell_diffusion/#maxwell_diffusion","page":"maxwell_diffusion","title":"maxwell_diffusion","text":"","category":"section"},{"location":"zz_maxwell_diffusion/","page":"maxwell_diffusion","title":"maxwell_diffusion","text":"Modules = [moment_kinetics.maxwell_diffusion]","category":"page"},{"location":"zz_maxwell_diffusion/#moment_kinetics.maxwell_diffusion.ion_vpa_maxwell_diffusion!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, Any, Any, T_spectral, Any, Any}} where T_spectral","page":"maxwell_diffusion","title":"moment_kinetics.maxwell_diffusion.ion_vpa_maxwell_diffusion!","text":"Calculate the Maxwellian associated with the current ion pdf moments, and then subtract this from current pdf. Then take second derivative of this function to act as the diffusion operator. \n\n\n\n\n\n","category":"method"},{"location":"zz_maxwell_diffusion/#moment_kinetics.maxwell_diffusion.neutral_vz_maxwell_diffusion!-Union{Tuple{T_spectral}, Tuple{Any, Any, Any, Any, Any, Any, T_spectral, Any, Any}} where T_spectral","page":"maxwell_diffusion","title":"moment_kinetics.maxwell_diffusion.neutral_vz_maxwell_diffusion!","text":"Calculate the Maxwellian associated with the current neutral pdf moments, and then subtract this from current pdf. Then take second derivative of this function to act as the diffusion operator. \n\n\n\n\n\n","category":"method"},{"location":"zz_maxwell_diffusion/#moment_kinetics.maxwell_diffusion.setup_mxwl_diff_collisions_input-Tuple{Dict}","page":"maxwell_diffusion","title":"moment_kinetics.maxwell_diffusion.setup_mxwl_diff_collisions_input","text":"Function for reading Maxwell diffusion operator input parameters. Structure the namelist as follows.\n\n[maxwelldiffusioncollisions] usemaxwelldiffusion = true Dii = 1.0 diffusioncoefficient_option = \"manual\"\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#load_data","page":"load_data","title":"load_data","text":"","category":"section"},{"location":"zz_load_data/","page":"load_data","title":"load_data","text":"Modules = [moment_kinetics.load_data]","category":"page"},{"location":"zz_load_data/#moment_kinetics.load_data","page":"load_data","title":"moment_kinetics.load_data","text":"\n\n\n\n","category":"module"},{"location":"zz_load_data/#moment_kinetics.load_data.close_run_info-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.close_run_info","text":"close_run_info(run_info)\n\nClose all the files in a run_info NamedTuple.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.construct_global_zr_coords-Tuple{Any, Any}","page":"load_data","title":"moment_kinetics.load_data.construct_global_zr_coords","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.get_run_info_no_setup-Tuple{Vararg{Union{AbstractString, Tuple{AbstractString, Union{Nothing, Int64}}}}}","page":"load_data","title":"moment_kinetics.load_data.get_run_info_no_setup","text":"get_run_info_no_setup(run_dir...; itime_min=1, itime_max=0, itime_skip=1, dfns=false,\n initial_electron=false)\nget_run_info_no_setup((run_dir, restart_index)...; itime_min=1, itime_max=0,\n itime_skip=1, dfns=false, initial_electron=false)\n\nGet file handles and other info for a single run\n\nrun_dir is either the directory to read output from (whose name should be the run_name), or a momentkinetics binary output file. If a file is passed, it is only used to infer the directory and `runname, so it is possible for example to pass a.moments.h5output file and alsodfns=trueand the.dfns.h5` file will be the one actually opened (as long as it exists).\n\nrestart_index can be given by passing a Tuple, e.g. (\"runs/example\", 42) as the positional argument. It specifies which restart to read if there are multiple restarts. If no restart_index is given or if nothing is passed, read all restarts and concatenate them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index).\n\nSeveral runs can be loaded at the same time by passing multiple positional arguments. Each argument can be a String run_dir giving a directory to read output from or a Tuple (run_dir, restart_index) giving both a directory and a restart index (it is allowed to mix Strings and Tuples in a call).\n\nBy default load data from moments files, pass dfns=true to load from distribution functions files, or initial_electron=true and dfns=true to load from initial electron state files.\n\nThe itime_min, itime_max and itime_skip options can be used to select only a slice of time points when loading data. In makie_post_process these options are read from the input (if they are set) before get_run_info_no_setup() is called, so that the run_info returned can be passed to makie_post_processing.setup_makie_post_processing_input!(), to be used for defaults for the remaining options. If either itime_min or itime_max are ≤0, their values are used as offsets from the final time index of the run.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.get_variable","page":"load_data","title":"moment_kinetics.load_data.get_variable","text":"get_variable(run_info::Tuple, variable_name; kwargs...)\nget_variable(run_info, variable_name; kwargs...)\n\nGet an array (or Tuple of arrays, if run_info is a Tuple) of the data for variable_name from run_info.\n\nSome derived variables need to be calculated from the saved output, not just loaded from file (with postproc_load_variable). This function takes care of that calculation, and handles the case where run_info is a Tuple (which postproc_load_data does not handle).\n\nkwargs... are passed through to postproc_load_variable().\n\n\n\n\n\n","category":"function"},{"location":"zz_load_data/#moment_kinetics.load_data.get_z_derivative-Tuple{Any, Any}","page":"load_data","title":"moment_kinetics.load_data.get_z_derivative","text":"get_z_derivative(run_info, variable_name; kwargs...)\n\nGet (i.e. load or calculate) variable_name from run_info and calculate its z-derivative. Returns the z-derivative\n\nkwargs... are passed through to get_variable().\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_block_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_block_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_coordinate_data-Tuple{Any, Any}","page":"load_data","title":"moment_kinetics.load_data.load_coordinate_data","text":"load_coordinate_data(fid, name; printout=false, irank=nothing, nrank=nothing,\n run_directory=nothing, ignore_MPI=true)\n\nLoad data for the coordinate name from a file-handle fid.\n\nReturns (coord, spectral, chunk_size). coord is a coordinate object. spectral is the object used to implement the discretization in this coordinate. chunk_size is the size of chunks in this coordinate that was used when writing to the output file.\n\nIf printout is set to true a message will be printed when this function is called.\n\nIf irank and nrank are passed, then the coord and spectral objects returned will be set up for the parallelisation specified by irank and nrank, rather than the one implied by the output file.\n\nUnless ignore_MPI=false is passed, the returned coordinates will be created without shared memory scratch arrays (ignore_MPI=true will be passed through to define_coordinate).\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_distributed_electron_pdf_slice-Tuple{Tuple, Tuple, Any, Int64, Vararg{moment_kinetics.coordinates.coordinate, 4}}","page":"load_data","title":"moment_kinetics.load_data.load_distributed_electron_pdf_slice","text":"Read a slice of an electron distribution function\n\nrun_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.\n\nThe slice to take is specified by the keyword arguments.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_distributed_ion_pdf_slice-Tuple{Tuple, Tuple, Any, Int64, Vararg{moment_kinetics.coordinates.coordinate, 4}}","page":"load_data","title":"moment_kinetics.load_data.load_distributed_ion_pdf_slice","text":"Read a slice of an ion distribution function\n\nrun_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.\n\nThe slice to take is specified by the keyword arguments.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_distributed_neutral_pdf_slice-Tuple{Tuple, Tuple, Any, Int64, Vararg{moment_kinetics.coordinates.coordinate, 5}}","page":"load_data","title":"moment_kinetics.load_data.load_distributed_neutral_pdf_slice","text":"Read a slice of a neutral distribution function\n\nrun_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.\n\nThe slice to take is specified by the keyword arguments.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_electron_moments_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_electron_moments_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_fields_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_fields_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_input-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_input","text":"Load saved input settings\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_ion_moments_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_ion_moments_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_mk_options-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_mk_options","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_neutral_pdf_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_neutral_pdf_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_pdf_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_pdf_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_rank_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_rank_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_slice","page":"load_data","title":"moment_kinetics.load_data.load_slice","text":"Load a slice of a single variable from a file\n\n\n\n\n\n","category":"function"},{"location":"zz_load_data/#moment_kinetics.load_data.load_species_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_species_data","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_time_data-Tuple{Any}","page":"load_data","title":"moment_kinetics.load_data.load_time_data","text":"If a tuple is given for fid, concatenate the \"time\" output from each file in the tuple\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.load_variable","page":"load_data","title":"moment_kinetics.load_data.load_variable","text":"Load a single variable from a file\n\n\n\n\n\n","category":"function"},{"location":"zz_load_data/#moment_kinetics.load_data.open_readonly_output_file-Tuple{Any, Any}","page":"load_data","title":"moment_kinetics.load_data.open_readonly_output_file","text":"\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.postproc_load_variable-Tuple{Any, Any}","page":"load_data","title":"moment_kinetics.load_data.postproc_load_variable","text":"postproc_load_variable(run_info, variable_name; it=nothing, is=nothing,\n ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,\n ivzeta=nothing, ivr=nothing, ivz=nothing)\n\nLoad a variable\n\nrun_info is the information about a run returned by makie_post_processing.get_run_info().\n\nvariable_name is the name of the variable to load.\n\nThe keyword arguments it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be set to an integer or a range (e.g. 3:8 or 3:2:8) to select subsets of the data. Only the data for the subset requested will be loaded from the output file (mostly - when loading fields or moments from runs which used parallel_io = false, the full array will be loaded and then sliced).\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.read_Dict_from_section-Tuple{Any, Any}","page":"load_data","title":"moment_kinetics.load_data.read_Dict_from_section","text":"read_Dict_from_section(file_or_group, section_name; ignore_subsections=false)\n\nRead information from section_name in file_or_group, returning a Dict.\n\nBy default, any subsections are included as nested Dicts. If ignore_subsections=true they are ignored.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.read_distributed_zr_data!-Union{Tuple{N}, Tuple{Array{Float64, N}, String, Tuple, String, Tuple, Int64, Int64, Int64}} where N","page":"load_data","title":"moment_kinetics.load_data.read_distributed_zr_data!","text":"Read data which is a function of (z,r,t) or (z,r,species,t)\n\nrun_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.reload_electron_data!-NTuple{13, Any}","page":"load_data","title":"moment_kinetics.load_data.reload_electron_data!","text":"Reload electron pdf and moments from an existing output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_load_data/#moment_kinetics.load_data.reload_evolving_fields!-NTuple{15, Any}","page":"load_data","title":"moment_kinetics.load_data.reload_evolving_fields!","text":"Reload pdf and moments from an existing output file.\n\n\n\n\n\n","category":"method"},{"location":"post_processing_notes/#Post-processing","page":"Post processing","title":"Post processing","text":"","category":"section"},{"location":"post_processing_notes/#How-to","page":"Post processing","title":"How to","text":"","category":"section"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"Post processing functionality is provided by the makie_post_processing.makie_post_processing module. To run the post processing, call makie_post_processing.makie_post_process e.g.","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> using makie_post_processing\njulia> makie_post_process(\"runs/example-run/\")","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"or","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> makie_post_process(\"runs/example-run1/\", \"runs/example-run2/\", \"runs/example-run3/\")","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"What this function does is controlled by the settings in an input file, by default post_processing_input.toml.","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"To run from the command line","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia --project run_makie_post_processing.jl dir1 [dir2 [dir3 ...]]","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"If multiple directories are passed, comparison plots will be made. This usually means that for line plots and animations the output for all the runs will be drawn on the same plot. For heatmap plots, the runs will be plotted side by side.","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"If there is output from several restarts of the same run in a directory, by default they will all be read and plotted. A single restart can be started by passing the restart_id argument to makie_post_process().","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"It is also possible to pass an output file (*.moments.h5 or *.dfns.h5) instead of a directory. The file name is just used to find the directory and run_name (which is the prefix of the file name), so for example you can pass a *.moments.h5 file and ask for distribution function plots (as long as the corresponding *.dfns.h5 file exists). This is useful if some output files were moved to a different directory, or the run directory was renamed (e.g. for backup, or to compare some different input options or code versions).","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"To see all the options that can be set, makie_post_processing.generate_example_input_file can be used to create an example file containing all the options with their default values. The options are all commented out when the file is created.","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"note: Viewing animations\nAnimations are produced in .gif format. Most utilities just play gifs, but provide no options to pause them, etc. One that provides a few more features is multigifview (developed by @johnomotani).","category":"page"},{"location":"post_processing_notes/#Interactive-use","page":"Post processing","title":"Interactive use","text":"","category":"section"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"The functions in makie_post_processing.makie_post_processing can be used interactively (or in standalone scripts). To do so, first get the 'info' for a run (file names, metadata, etc.) using makie_post_processing.get_run_info","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> using makie_post_processing\njulia> run_info = get_run_info(\"runs/example-run/\")","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"or to load from the distribution functions output file .dfns.h5","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> run_info_dfns = get_run_info(\"runs/example-run/\"; dfns=true)","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"Settings for post-processing are read from an input file, by default post_processing_input.toml (you can select a different one using the setup_input_file argument to get_run_info()). The relevant settings for interactive use are the default indices (iz0, ivpa0, etc.) that are used to select slices for 1D/2D plots and animations. The settings are read by setup_makie_post_processing!() which is called by default as part of get_run_info(). You might want to call it directly if you load both 'moments' and 'distribution functions' data, to get sensible settings for both at the same time.","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"Then you can make 1d or 2d plots, e.g.","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> fig1 = plot_vs_z(run_info, \"phi\")\njulia> fig2 = plot_vs_r_t(run_info, \"density\"; outfile=\"density_vs_r_t.pdf\")","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"using makie_post_processing.plot_vs_t, etc. for 1d and makie_post_processing.plot_vs_r_t, etc. for 2d plots. The outfile argument can be used to save the plot. You can also change the default values used to select from the other dimensions","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> plot_vs_z(run_info, \"phi\"; outfile=\"phi_vs_z.pdf\", it=42, ir=7)","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"You can make animations in a similar way","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"julia> fig1 = animate_vs_z(run_info, \"phi\"; outfile=\"phi_vs_z.gif\", it=8:12, ir=1)\njulia> fig2 = animate_vs_z_r(run_info, \"density\"; outfile=\"density_vs_z_r.mp4\")","category":"page"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"using makie_post_processing.animate_vs_r, etc. for 1d and makie_post_processing.animate_vs_z_r, etc. for 2d animations. Note that outfile is required for animations.","category":"page"},{"location":"post_processing_notes/#API","page":"Post processing","title":"API","text":"","category":"section"},{"location":"post_processing_notes/","page":"Post processing","title":"Post processing","text":"See makie_post_processing.","category":"page"},{"location":"zz_chebyshev/#chebyshev","page":"chebyshev","title":"chebyshev","text":"","category":"section"},{"location":"zz_chebyshev/","page":"chebyshev","title":"chebyshev","text":"Modules = [moment_kinetics.chebyshev]","category":"page"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev","page":"chebyshev","title":"moment_kinetics.chebyshev","text":"\n\n\n\n","category":"module"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshev_base_info","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshev_base_info","text":"Chebyshev pseudospectral discretization\n\n\n\n\n\n","category":"type"},{"location":"zz_chebyshev/#moment_kinetics.calculus.elementwise_derivative!-Tuple{Any, Any, Any, moment_kinetics.chebyshev.chebyshev_info}","page":"chebyshev","title":"moment_kinetics.calculus.elementwise_derivative!","text":"elementwise_derivative!(coord, ff, adv_fac, spectral::chebyshev_info)\n\nChebyshev transform f to get Chebyshev spectral coefficients and use them to calculate f'.\n\nNote: Chebyshev derivative does not make use of upwinding information within each element.\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.calculus.elementwise_derivative!-Tuple{Any, Any, moment_kinetics.chebyshev.chebyshev_info}","page":"chebyshev","title":"moment_kinetics.calculus.elementwise_derivative!","text":"elementwise_derivative!(coord, ff, chebyshev::chebyshev_info)\n\nChebyshev transform f to get Chebyshev spectral coefficients and use them to calculate f'.\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.cheb_derivative_matrix_elementwise!-Tuple{Matrix{Float64}, Int64}","page":"chebyshev","title":"moment_kinetics.chebyshev.cheb_derivative_matrix_elementwise!","text":"derivative matrix for Gauss-Lobatto points using the analytical specification from Chapter 8.2 from Trefethen 1994 https://people.maths.ox.ac.uk/trefethen/8all.pdf full list of Chapters may be obtained here https://people.maths.ox.ac.uk/trefethen/pdetext.html\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.cheb_derivative_matrix_elementwise_radau_by_FFT!-Tuple{Matrix{Float64}, Vararg{Any, 5}}","page":"chebyshev","title":"moment_kinetics.chebyshev.cheb_derivative_matrix_elementwise_radau_by_FFT!","text":"Derivative matrix for Chebyshev-Radau grid using the FFT. Note that a similar function could be constructed for the Chebyshev-Lobatto grid, if desired.\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshev_backward_transform!-NTuple{5, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshev_backward_transform!","text":"\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshev_derivative_single_element!-NTuple{7, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshev_derivative_single_element!","text":"\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshev_forward_transform!-NTuple{5, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshev_forward_transform!","text":"takes the real function ff on a Chebyshev grid in z (domain [-1, 1]), which corresponds to the domain [π, 2π] in variable theta = ArcCos(z). interested in functions of form f(z) = sumn cn Tn(z) using Tn(cos(theta)) = cos(ntheta) and z = cos(theta) gives f(z) = sumn cn cos(ntheta) thus a Chebyshev transform is equivalent to a discrete cosine transform doing this directly turns out to be slower than extending the domain from [0, 2pi] and using the fact that f(z) must be even (as cosines are all even) on this extended domain, can do a standard complex-to-complex fft fext is an array used to store f(theta) on the extended grid theta ∈ [0,2π) ff is f(theta) on the grid [π,2π] the Chebyshev coefficients of ff are calculated and stored in chebyf n is the number of grid points on the Chebyshev-Gauss-Lobatto grid transform is the plan for the complex-to-complex, in-place fft\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshev_radau_backward_transform!-NTuple{5, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshev_radau_backward_transform!","text":"\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshev_spectral_derivative!-Tuple{Any, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshev_spectral_derivative!","text":"use Chebyshev basis to compute the first derivative of f\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshevmoments-Tuple{Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshevmoments","text":"compute and return modified Chebyshev moments of the first kind: ∫dx Tᵢ(x) over range [-1,1]\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.chebyshevpoints-Tuple{Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.chebyshevpoints","text":"returns the Chebyshev-Gauss-Lobatto grid points on an n point grid\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.clenshaw_curtis_weights-NTuple{6, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.clenshaw_curtis_weights","text":"returns wgts array containing the integration weights associated with all grid points for Clenshaw-Curtis quadrature\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.scaled_chebyshev_grid-NTuple{7, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.scaled_chebyshev_grid","text":"initialize chebyshev grid scaled to interval [-boxlength/2, boxlength/2] we no longer pass the boxlength to this function, but instead pass precomputed arrays elementscale and element_shift that are needed to compute the grid.\n\nngrid – number of points per element (including boundary points) nelementlocal – number of elements in the local (distributed memory MPI) grid n – total number of points in the local grid (excluding duplicate points) elementscale – the scale factor in the transform from the coordinates where the element limits are -1, 1 to the coordinate where the limits are Aj = coord.grid[imin[j]-1] and Bj = coord.grid[imax[j]] elementscale = 0.5*(Bj - Aj) elementshift – the centre of the element in the extended grid coordinate element_shift = 0.5*(Aj + Bj) imin – the array of minimum indices of each element on the extended grid. By convention, the duplicated points are not included, so for element index j > 1 the lower boundary point is actually imin[j] - 1 imax – the array of maximum indices of each element on the extended grid.\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.setup_chebyshev_pseudospectral-Tuple{Any, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.setup_chebyshev_pseudospectral","text":"create arrays needed for explicit Chebyshev pseudospectral treatment and create the plans for the forward and backward fast Fourier transforms\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.update_df_chebyshev!-Tuple{Any, Any, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.update_df_chebyshev!","text":"compute the Chebyshev spectral coefficients of the spatial derivative of f\n\n\n\n\n\n","category":"method"},{"location":"zz_chebyshev/#moment_kinetics.chebyshev.update_fcheby!-Tuple{Any, Any, Any}","page":"chebyshev","title":"moment_kinetics.chebyshev.update_fcheby!","text":"Chebyshev transform f to get Chebyshev spectral coefficients\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_constraints/#moment_constraints","page":"moment_constraints","title":"moment_constraints","text":"","category":"section"},{"location":"zz_moment_constraints/","page":"moment_constraints","title":"moment_constraints","text":"Modules = [moment_kinetics.moment_constraints]","category":"page"},{"location":"zz_moment_constraints/#moment_kinetics.moment_constraints","page":"moment_constraints","title":"moment_kinetics.moment_constraints","text":"Functions for enforcing integral constraints on the normalised distribution function. Ensures consistency of evolution split into moments and normalised distribution function.\n\n\n\n\n\n","category":"module"},{"location":"zz_moment_constraints/#moment_kinetics.moment_constraints.hard_force_moment_constraints!-Tuple{Any, Any, Any}","page":"moment_constraints","title":"moment_kinetics.moment_constraints.hard_force_moment_constraints!","text":"hard_force_moment_constraints!(f, moments, vpa)\n\nForce the moment constraints needed for the system being evolved to be applied to f. Not guaranteed to be a small correction, if f does not approximately obey the constraints to start with, but can be useful at initialisation to ensure a consistent initial state, and when applying boundary conditions.\n\nNote this function assumes the input is given at a single spatial position.\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_constraints/#moment_kinetics.moment_constraints.hard_force_moment_constraints_neutral!-Tuple{Any, Any, Any}","page":"moment_constraints","title":"moment_kinetics.moment_constraints.hard_force_moment_constraints_neutral!","text":"hard_force_moment_constraints_neutral!(f, moments, vz)\n\nForce the moment constraints needed for the system being evolved to be applied to f. Not guaranteed to be a small correction, if f does not approximately obey the constraints to start with, but can be useful at initialisation to ensure a consistent initial state, and when applying boundary conditions.\n\nNotes:\n\nthis function assumes the input is given at a single spatial position.\ncurrently only works with '1V' runs, where vz is the only velocity-space dimension\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_constraints/#moment_kinetics.moment_constraints.moment_constraints_on_residual!-Union{Tuple{N}, Tuple{T}, Tuple{AbstractArray{T, N}, AbstractArray{T, N}, Any, Any}} where {T, N}","page":"moment_constraints","title":"moment_kinetics.moment_constraints.moment_constraints_on_residual!","text":"moment_constraints_on_residual!(residual, f, moments, vpa)\n\nA 'residual' (used in implicit timestepping) is an update to the distribution function f_mathrmnew = f_mathrmold + mathttresidual. f_mathrmnew should obey the moment constraints (Constraints on normalized distribution function), and f_mathrmold already obeys the constraints, which means that the first 3 moments of residual should be zero. We impose this constraint by adding corrections proportional to f.\n\nr = hatr + (A + B w_ + C w_^2) f\n\nNote this function assumes the input is given at a single spatial position.\n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#source_terms","page":"source_terms","title":"source_terms","text":"","category":"section"},{"location":"zz_source_terms/","page":"source_terms","title":"source_terms","text":"Modules = [moment_kinetics.source_terms]","category":"page"},{"location":"zz_source_terms/#moment_kinetics.source_terms","page":"source_terms","title":"moment_kinetics.source_terms","text":"\n\n\n\n","category":"module"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms!-NTuple{11, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms!","text":"calculate the source terms due to redefinition of the pdf to split off density, flow and/or pressure, and use them to update the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_evolve_density!-NTuple{12, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_evolve_density!","text":"\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_evolve_density_neutral!-NTuple{12, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_evolve_density_neutral!","text":"\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_evolve_ppar_collisions!-NTuple{13, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_evolve_ppar_collisions!","text":"update the evolved pdf to account for the charge exchange and ionization source terms in the kinetic equation arising due to the re-normalization of the pdf as g = f * vth / n\n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_evolve_ppar_collisions_neutral!-NTuple{13, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_evolve_ppar_collisions_neutral!","text":"update the evolved pdf to account for the charge exchange and ionization source terms in the kinetic equation arising due to the re-normalization of the pdf as g = f * vth / n\n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_evolve_ppar_no_collisions!-NTuple{16, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_evolve_ppar_no_collisions!","text":"update the evolved pdf to account for the collisionless source terms in the kinetic equation arising due to the re-normalization of the pdf as g = f * vth / n\n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_evolve_ppar_no_collisions_neutral!-NTuple{16, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_evolve_ppar_no_collisions_neutral!","text":"update the evolved pdf to account for the collisionless source terms in the kinetic equation arising due to the re-normalization of the pdf as g = f * vth / n\n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_manufactured!-NTuple{13, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_manufactured!","text":"advance the dfn with an arbitrary source function \n\n\n\n\n\n","category":"method"},{"location":"zz_source_terms/#moment_kinetics.source_terms.source_terms_neutral!-NTuple{11, Any}","page":"source_terms","title":"moment_kinetics.source_terms.source_terms_neutral!","text":"calculate the source terms due to redefinition of the pdf to split off density, flow and/or pressure, and use them to update the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_constants/#constants","page":"constants","title":"constants","text":"","category":"section"},{"location":"zz_constants/","page":"constants","title":"constants","text":"Modules = [moment_kinetics.constants]","category":"page"},{"location":"zz_constants/#moment_kinetics.constants","page":"constants","title":"moment_kinetics.constants","text":"Some physical constants\n\n\n\n\n\n","category":"module"},{"location":"zz_force_balance/#force_balance","page":"force_balance","title":"force_balance","text":"","category":"section"},{"location":"zz_force_balance/","page":"force_balance","title":"force_balance","text":"Modules = [moment_kinetics.force_balance]","category":"page"},{"location":"zz_force_balance/#moment_kinetics.force_balance","page":"force_balance","title":"moment_kinetics.force_balance","text":"\n\n\n\n","category":"module"},{"location":"zz_force_balance/#moment_kinetics.force_balance.force_balance!-NTuple{12, Any}","page":"force_balance","title":"moment_kinetics.force_balance.force_balance!","text":"use the force balance equation d(nu)/dt + d(ppar + nuparupar)/dz = -(dens/2)dphi/dz + Rdensi*densn(uparn-upari) to update the parallel particle flux densupar for each species\n\n\n\n\n\n","category":"method"},{"location":"zz_krook_collisions/#krook_collisions","page":"krook_collisions","title":"krook_collisions","text":"","category":"section"},{"location":"zz_krook_collisions/","page":"krook_collisions","title":"krook_collisions","text":"Modules = [moment_kinetics.krook_collisions]","category":"page"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions","page":"krook_collisions","title":"moment_kinetics.krook_collisions","text":"\n\n\n\n","category":"module"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions.electron_krook_collisions!-NTuple{10, Any}","page":"krook_collisions","title":"moment_kinetics.krook_collisions.electron_krook_collisions!","text":"Add Krook collision operator for electrons\n\n\n\n\n\n","category":"method"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions.get_collision_frequency_ee-Tuple{Any, Any, Any}","page":"krook_collisions","title":"moment_kinetics.krook_collisions.get_collision_frequency_ee","text":"get_collision_frequency_ee(collisions, n, vthe)\n\nCalculate the electron-electron collision frequency, depending on the settings/parameters in collisions, for the given density n and electron thermal speed vthe.\n\nn and vthe may be scalars or arrays, but should have shapes that can be broadcasted together.\n\n\n\n\n\n","category":"method"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions.get_collision_frequency_ei-Tuple{Any, Any, Any}","page":"krook_collisions","title":"moment_kinetics.krook_collisions.get_collision_frequency_ei","text":"get_collision_frequency_ei(collisions, n, vthe)\n\nCalculate the electron-electron collision frequency, depending on the settings/parameters in collisions, for the given density n and electron thermal speed vthe.\n\nn and vthe may be scalars or arrays, but should have shapes that can be broadcasted together.\n\n\n\n\n\n","category":"method"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions.get_collision_frequency_ii-Tuple{Any, Any, Any}","page":"krook_collisions","title":"moment_kinetics.krook_collisions.get_collision_frequency_ii","text":"get_collision_frequency_ii(collisions, n, vth)\n\nCalculate the ion-ion collision frequency, depending on the settings/parameters in collisions, for the given density n and thermal speed vth.\n\nn and vth may be scalars or arrays, but should have shapes that can be broadcasted together.\n\n\n\n\n\n","category":"method"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions.krook_collisions!-NTuple{8, Any}","page":"krook_collisions","title":"moment_kinetics.krook_collisions.krook_collisions!","text":"Add collision operator\n\nCurrently Krook collisions\n\n\n\n\n\n","category":"method"},{"location":"zz_krook_collisions/#moment_kinetics.krook_collisions.setup_krook_collisions_input-Tuple{Dict}","page":"krook_collisions","title":"moment_kinetics.krook_collisions.setup_krook_collisions_input","text":"Function for reading Krook collision operator input parameters. Structure the namelist as follows.\n\n[krookcollisions] usekrook = true nuii0 = 1.0 frequency_option = \"manual\"\n\n\n\n\n\n","category":"method"},{"location":"zz_plot_MMS_sequence/#plot_MMS_sequence","page":"plot_MMS_sequence","title":"plot_MMS_sequence","text":"","category":"section"},{"location":"zz_plot_MMS_sequence/","page":"plot_MMS_sequence","title":"plot_MMS_sequence","text":"Modules = [plots_post_processing.plot_MMS_sequence]","category":"page"},{"location":"zz_plot_MMS_sequence/#plots_post_processing.plot_MMS_sequence","page":"plot_MMS_sequence","title":"plots_post_processing.plot_MMS_sequence","text":"\n\n\n\n","category":"module"},{"location":"zz_external_sources/#external_sources","page":"external_sources","title":"external_sources","text":"","category":"section"},{"location":"zz_external_sources/","page":"external_sources","title":"external_sources","text":"Modules = [moment_kinetics.external_sources]","category":"page"},{"location":"zz_external_sources/#moment_kinetics.external_sources","page":"external_sources","title":"moment_kinetics.external_sources","text":"Maxwellian source terms with spatially varying parameters representing external sources of particles and energy.\n\nNote there is no parallel momentum input from the external sources.\n\nThe sources can be controlled by a PI controller to set density to a target value or profile. Note that the PI controller should not be used with operator splitting - implementing it in a way that would be compatible with splitting is complicated because the source contributes to several terms.\n\n\n\n\n\n","category":"module"},{"location":"zz_external_sources/#moment_kinetics.external_sources.external_electron_source!-NTuple{11, Any}","page":"external_sources","title":"moment_kinetics.external_sources.external_electron_source!","text":"external_electron_source!(pdf_out, pdf_in, electron_density, electron_upar,\n moments, composition, electron_source, index, vperp,\n vpa, dt)\n\nAdd external source term to the electron kinetic equation.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.external_electron_source_controller!-NTuple{5, Any}","page":"external_sources","title":"moment_kinetics.external_sources.external_electron_source_controller!","text":"external_electron_source_controller!(fvec_in, moments, electron_source_settings, dt)\n\nCalculate the amplitude, e.g. when using a PI controller for the density to set the external source amplitude.\n\nAs the electron density source must be equal to the ion density source in order not to inject charge into the simulation, the electron source (at least in some modes of operation) depends on the ion source, so external_ion_source_controller! must be called before this function is called so that moments.ion.external_source_amplitude is up to date.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.external_ion_source!-NTuple{9, Any}","page":"external_sources","title":"moment_kinetics.external_sources.external_ion_source!","text":"external_ion_source!(pdf, fvec, moments, ion_source_settings, vperp, vpa, dt)\n\nAdd external source term to the ion kinetic equation.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.external_ion_source_controller!-NTuple{5, Any}","page":"external_sources","title":"moment_kinetics.external_sources.external_ion_source_controller!","text":"external_ion_source_controller!(fvec_in, moments, ion_source_settings, dt)\n\nCalculate the amplitude when using a PI controller for the density to set the external source amplitude.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.external_neutral_source!-NTuple{9, Any}","page":"external_sources","title":"moment_kinetics.external_sources.external_neutral_source!","text":"external_neutral_source!(pdf, fvec, moments, neutral_source_settings, vzeta, vr,\n vz, dt)\n\nAdd external source term to the neutral kinetic equation.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.external_neutral_source_controller!-NTuple{7, Any}","page":"external_sources","title":"moment_kinetics.external_sources.external_neutral_source_controller!","text":"external_neutral_source_controller!(fvec_in, moments, neutral_source_settings, r,\n z, dt)\n\nCalculate the amplitude when using a PI controller for the density to set the external source amplitude.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.get_source_profile-NTuple{4, Any}","page":"external_sources","title":"moment_kinetics.external_sources.get_source_profile","text":"get_source_profile(profile_type, width, min_val, coord)\n\nCreate a profile of type profile_type with width width for coordinate coord.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.initialize_external_source_amplitude!-NTuple{6, Any}","page":"external_sources","title":"moment_kinetics.external_sources.initialize_external_source_amplitude!","text":"initialize_external_source_amplitude!(moments, external_source_settings, vperp,\n vzeta, vr, n_neutral_species)\n\nInitialize the arrays moments.ion.external_source_amplitude, moments.ion.external_source_density_amplitude, moments.ion.external_source_momentum_amplitude, moments.ion.external_source_pressure_amplitude, moments.electron.external_source_amplitude, moments.electron.external_source_density_amplitude, moments.electron.external_source_momentum_amplitude, moments.electron.external_source_pressure_amplitude, moments.neutral.external_source_amplitude, moments.neutral.external_source_density_amplitude, moments.neutral.external_source_momentum_amplitude, and moments.neutral.external_source_pressure_amplitude, using the settings in external_source_settings\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.initialize_external_source_controller_integral!-Tuple{Any, Any, Any}","page":"external_sources","title":"moment_kinetics.external_sources.initialize_external_source_controller_integral!","text":"function initializeexternalsourcecontrollerintegral!( moments, externalsourcesettings, nneutralspecies)\n\nInitialize the arrays moments.ion.external_source_controller_integral and moments.neutral.external_source_controller_integral, using the settings in external_source_settings\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.setup_external_sources!-NTuple{4, Any}","page":"external_sources","title":"moment_kinetics.external_sources.setup_external_sources!","text":"setup_external_sources!(input_dict, r, z)\n\nSet up parameters for the external sources using settings in input_dict.\n\nUpdates input_dict with defaults for unset parameters.\n\nr and z are the coordinates.coordinate objects for the r- and z-coordinates.\n\nReturns a NamedTuple (ion=ion_source_settings, neutral=neutral_source_settings) containing two NamedTuples of settings.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.total_external_electron_source_controllers!-NTuple{4, Any}","page":"external_sources","title":"moment_kinetics.external_sources.total_external_electron_source_controllers!","text":"total_external_electron_source_controllers!(fvec_in, moments, electron_sources, dt)\n\nContribute all of the electron source controllers to fvec_in, one by one.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.total_external_electron_sources!-NTuple{10, Any}","page":"external_sources","title":"moment_kinetics.external_sources.total_external_electron_sources!","text":"total_external_electron_sources!(pdf, fvec, moments, electron_sources, vperp, vpa, dt, scratch_dummy)\n\nContribute all of the electron sources to the electron pdf, one by one.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.total_external_ion_source_controllers!-NTuple{4, Any}","page":"external_sources","title":"moment_kinetics.external_sources.total_external_ion_source_controllers!","text":"total_external_ion_source_controllers!(fvec_in, moments, ion_sources, dt)\n\nContribute all of the ion source controllers to fvec_in, one by one.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.total_external_ion_sources!-NTuple{8, Any}","page":"external_sources","title":"moment_kinetics.external_sources.total_external_ion_sources!","text":"total_external_ion_sources!(pdf, fvec, moments, ion_sources, vperp, vpa, dt, scratch_dummy)\n\nContribute all of the ion sources to the ion pdf, one by one.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.total_external_neutral_source_controllers!-NTuple{6, Any}","page":"external_sources","title":"moment_kinetics.external_sources.total_external_neutral_source_controllers!","text":"total_external_neutral_source_controllers!(fvec_in, moments, neutral_sources, dt)\n\nContribute all of the neutral source controllers to fvec_in, one by one.\n\n\n\n\n\n","category":"method"},{"location":"zz_external_sources/#moment_kinetics.external_sources.total_external_neutral_sources!-NTuple{8, Any}","page":"external_sources","title":"moment_kinetics.external_sources.total_external_neutral_sources!","text":"total_external_neutral_sources!(pdf, fvec, moments, neutral_sources, vperp, vpa, dt, scratch_dummy)\n\nContribute all of the neutral sources to the neutral pdf, one by one.\n\n\n\n\n\n","category":"method"},{"location":"zz_clenshaw_curtis/#clenshaw_curtis","page":"clenshaw_curtis","title":"clenshaw_curtis","text":"","category":"section"},{"location":"zz_clenshaw_curtis/","page":"clenshaw_curtis","title":"clenshaw_curtis","text":"Modules = [moment_kinetics.clenshaw_curtis]","category":"page"},{"location":"zz_clenshaw_curtis/#moment_kinetics.clenshaw_curtis","page":"clenshaw_curtis","title":"moment_kinetics.clenshaw_curtis","text":"\n\n\n\n","category":"module"},{"location":"zz_clenshaw_curtis/#moment_kinetics.clenshaw_curtis.chebyshevpoints-Tuple{Any}","page":"clenshaw_curtis","title":"moment_kinetics.clenshaw_curtis.chebyshevpoints","text":"\n\n\n\n","category":"method"},{"location":"zz_clenshaw_curtis/#moment_kinetics.clenshaw_curtis.clenshawcurtisnodes-Union{Tuple{T}, Tuple{Type{T}, Int64}} where T","page":"clenshaw_curtis","title":"moment_kinetics.clenshaw_curtis.clenshawcurtisnodes","text":"Compute nodes of the Clenshaw—Curtis quadrature rule.\n\n\n\n\n\n","category":"method"},{"location":"zz_clenshaw_curtis/#moment_kinetics.clenshaw_curtis.clenshawcurtisweights-Tuple{}","page":"clenshaw_curtis","title":"moment_kinetics.clenshaw_curtis.clenshawcurtisweights","text":"Compute weights of the Clenshaw—Curtis quadrature rule with modified Chebyshev moments of the first kind (μ)\n\n\n\n\n\n","category":"method"},{"location":"zz_clenshaw_curtis/#moment_kinetics.clenshaw_curtis.plan_clenshawcurtis-Tuple{Any}","page":"clenshaw_curtis","title":"moment_kinetics.clenshaw_curtis.plan_clenshawcurtis","text":"\n\n\n\n","category":"method"},{"location":"zz_lagrange_polynomials/#lagrange_polynomials","page":"lagrange_polynomials","title":"lagrange_polynomials","text":"","category":"section"},{"location":"zz_lagrange_polynomials/","page":"lagrange_polynomials","title":"lagrange_polynomials","text":"Modules = [moment_kinetics.lagrange_polynomials]","category":"page"},{"location":"zz_lagrange_polynomials/#moment_kinetics.lagrange_polynomials","page":"lagrange_polynomials","title":"moment_kinetics.lagrange_polynomials","text":"Lagrange polynomials can be useful for finite element methods on any set of basis points, as they give a representation of the interpolating function within an element whose coefficients are just the function values at the grid points.\n\nThis module collects some functions related to the use of Lagrange polynomials, to avoid their being scattered (and possibly duplicated) in other modules.\n\n\n\n\n\n","category":"module"},{"location":"zz_lagrange_polynomials/#moment_kinetics.lagrange_polynomials.lagrange_poly-Tuple{Any, Any, Any}","page":"lagrange_polynomials","title":"moment_kinetics.lagrange_polynomials.lagrange_poly","text":"Lagrange polynomial args: j - index of lj from list of nodes xnodes - array of x node values x - point where interpolated value is returned\n\n\n\n\n\n","category":"method"},{"location":"zz_lagrange_polynomials/#moment_kinetics.lagrange_polynomials.lagrange_poly_optimised-Tuple{Any, Any, Any}","page":"lagrange_polynomials","title":"moment_kinetics.lagrange_polynomials.lagrange_poly_optimised","text":"lagrange_poly_optimised(other_nodes, one_over_denominator, x)\n\nOptimised version of Lagrange polynomial calculation, making use of pre-calculated quantities.\n\nother_nodes is a vector of the grid points in this element where this Lagrange polynomial is zero (the other nodes than the one where it is 1).\n\none_over_denominator is 1/prod(x0 - n for n ∈ other_nodes) where x0 is the grid point where this Lagrange polynomial is 1.\n\nx is the point to evaluate the Lagrange polynomial at.\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing","page":"plots_post_processing","title":"plots_post_processing","text":"","category":"section"},{"location":"zz_plots_post_processing/","page":"plots_post_processing","title":"plots_post_processing","text":"Modules = [plots_post_processing, plots_post_processing.post_processing_input, plots_post_processing.shared_utils]","category":"page"},{"location":"zz_plots_post_processing/#plots_post_processing.plots_post_processing","page":"plots_post_processing","title":"plots_post_processing.plots_post_processing","text":"\n\n\n\n","category":"module"},{"location":"zz_plots_post_processing/#plots_post_processing.allocate_global_zr_fields-Tuple{Any, Any, Any}","page":"plots_post_processing","title":"plots_post_processing.allocate_global_zr_fields","text":"functions to allocate arrays that are used at run-time to postprocess data that is stored in the netcdf files\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.analyze_and_plot_data-Tuple","page":"plots_post_processing","title":"plots_post_processing.analyze_and_plot_data","text":"analyze_and_plot_data(prefix...; run_index=nothing)\n\nMake some plots for the simulation at prefix. If more than one argument is passed to prefix, plot all the simulations together.\n\nThe strings passed to prefix should be either a directory (which contains run output) or the prefix of output files, like / where the output files are /.moments.h5 and /.dfns.h5.\n\nIf a single value is passed for prefix the plots/movies are created in the same directory as the run, and given names based on the name of the run. If multiple values are passed, the plots/movies are given names beginning with compare_ and are created in the comparison_plots/ subdirectory.\n\nBy default plots output from all restarts in a directory. To select a single run, pass the run_index argument - the value corresponds to the _ suffix given to output files when restarting. run_index can be an integer (which is applied to all directories in prefix...), or a tuple of integers (which should have the same length as the number of directories passed to prefix...). Use run_index=-1 to get the most recent run (which does not have a _ suffix). Note that run_index is only used when a directory (rather than the prefix of a specific output file) is passed to prefix...\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.calculate_differences-Tuple","page":"plots_post_processing","title":"plots_post_processing.calculate_differences","text":"Find the maximum difference, as a function of time, between two or more outputs for each variable.\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.compare_fields_symbolic_test-NTuple{13, Any}","page":"plots_post_processing","title":"plots_post_processing.compare_fields_symbolic_test","text":"\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.draw_v_parallel_zero!-Tuple{Plots.Plot, AbstractVector, Any, Any, Bool, Bool}","page":"plots_post_processing","title":"plots_post_processing.draw_v_parallel_zero!","text":"Add a thin, red, dashed line showing vparallel=(vth*wparallel+upar)=0 to a 2d plot with axes (z,vpa).\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.get_tuple_of_return_values-Tuple{Any, Vararg{Any}}","page":"plots_post_processing","title":"plots_post_processing.get_tuple_of_return_values","text":"get_tuple_of_return_values(func, arg_tuples...)\n\nSuppose func(args...) returns a tuple of return values, then get_tuple_of_return_values(func, arg_tuples...) returns a tuple (with an entry for each return value of func) of tuples (one for each argument in each of arg_tuples...) of return values.\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.init_postprocessing_options-NTuple{10, Any}","page":"plots_post_processing","title":"plots_post_processing.init_postprocessing_options","text":"\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_1D_1V_diagnostics-NTuple{52, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_1D_1V_diagnostics","text":"\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_dfns-NTuple{21, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_dfns","text":"\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_fields-NTuple{11, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_fields","text":"\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_ion_pdf-NTuple{21, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_ion_pdf","text":"plots various slices of the ion pdf (1d and 2d, stills and animations)\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_moments-NTuple{25, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_moments","text":"\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_neutral_pdf-NTuple{23, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_neutral_pdf","text":"plots various slices of the neutral pdf (1d and 2d, stills and animations)\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.plot_unnormalised_f2d-Tuple{Any, Any, Any}","page":"plots_post_processing","title":"plots_post_processing.plot_unnormalised_f2d","text":"Make a 2d plot of an unnormalised f on unnormalised coordinates, as returned from getunnormalisedf_coords()\n\nNote this function requires using the PyPlot backend to support 2d coordinates being passed to heatmap().\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.read_distributed_zwallr_data!-Union{Tuple{N}, Tuple{Array{Float64, N}, String, Tuple, String, Tuple, Int64, Int64, String}} where N","page":"plots_post_processing","title":"plots_post_processing.read_distributed_zwallr_data!","text":"Read data which is a function of (r,t) or (r,species,t) and associated to one of the wall boundaries\n\nrun_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.trygif-Tuple{Any, Any}","page":"plots_post_processing","title":"plots_post_processing.trygif","text":"Call gif, but catch the exception if there is an error\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.trysavefig-Tuple{Any}","page":"plots_post_processing","title":"plots_post_processing.trysavefig","text":"Call savefig, but catch the exception if there is an error\n\n\n\n\n\n","category":"method"},{"location":"zz_plots_post_processing/#plots_post_processing.post_processing_input","page":"plots_post_processing","title":"plots_post_processing.post_processing_input","text":"\n\n\n\n","category":"module"},{"location":"zz_plots_post_processing/#plots_post_processing.shared_utils.calculate_and_write_frequencies-NTuple{9, Any}","page":"plots_post_processing","title":"plots_post_processing.shared_utils.calculate_and_write_frequencies","text":"\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#fokker_planck","page":"fokker_planck","title":"fokker_planck","text":"","category":"section"},{"location":"zz_fokker_planck/","page":"fokker_planck","title":"fokker_planck","text":"Modules = [moment_kinetics.fokker_planck]","category":"page"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck","page":"fokker_planck","title":"moment_kinetics.fokker_planck","text":"module for including the Full-F Fokker-Planck Collision Operator\n\nThe functions in this module are split into two groups. \n\nThe first set of functions implement the weak-form Collision operator using the Rosenbluth-MacDonald-Judd formulation in a divergence form. The Green's functions for the Rosenbluth potentials are used to obtain the Rosenbluth potentials at the boundaries. To find the potentials everywhere else elliptic solves of the PDEs for the Rosenbluth potentials are performed with Dirichlet boundary conditions. These routines provide the default collision operator used in the code.\n\nThe second set of functions are used to set up the necessary arrays to compute the Rosenbluth potentials everywhere in vpa, vperp by direct integration of the Green's functions. These functions are supported for the purposes of testing and debugging.\n\nLower-level routines are provided by functions from moment_kinetics.fokker_planck_calculus.\n\nParallelisation of the collision operator uses a special 'anyv' region type, see Collision operator and anyv region.\n\n\n\n\n\n","category":"module"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.allocate_fokkerplanck_arrays_direct_integration-Tuple{Any, Any}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.allocate_fokkerplanck_arrays_direct_integration","text":"allocate the required ancilliary arrays \n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.explicit_fokker_planck_collisions_weak_form!-Tuple{Any, Any, Any, Any, Any, Any, moment_kinetics.fokker_planck_calculus.fokkerplanck_weakform_arrays_struct, Vararg{Any, 7}}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.explicit_fokker_planck_collisions_weak_form!","text":"Function for advancing with the explicit, weak-form, self-collision operator\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.explicit_fp_collisions_weak_form_Maxwellian_cross_species!-Tuple{Any, Any, Any, Any, Any, Any, moment_kinetics.fokker_planck_calculus.fokkerplanck_weakform_arrays_struct, Vararg{Any, 6}}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.explicit_fp_collisions_weak_form_Maxwellian_cross_species!","text":"Function for advancing with the explicit, weak-form, self-collision operator using the existing method for computing the Rosenbluth potentials, with the addition of cross-species collisions against fixed Maxwellian distribution functions\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.fokker_planck_collision_operator_weak_form!-Tuple{Any, Any, Any, Any, Any, moment_kinetics.fokker_planck_calculus.fokkerplanck_weakform_arrays_struct, Vararg{Any, 4}}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.fokker_planck_collision_operator_weak_form!","text":"Function for evaluating C_ss = C_ssF_sF_s\n\nThe result is stored in the array fkpl_arrays.CC.\n\nThe normalised collision frequency for collisions between species s and s' is defined by\n\ntildenu_ss = fracL_mathrmrefc_mathrmreffracgamma_ss n_mathrmrefm_s^2 c_mathrmref^3\n\nwith gamma_ss = 2 pi (Z_s Z_s)^2 e^4 ln Lambda_ss (4 pi epsilon_0)^2. The input parameter to this code is \n\ntildenu_ii = fracL_mathrmrefc_mathrmreffracgamma_mathrmref n_mathrmrefm_mathrmref^2 c_mathrmref^3\n\nwith gamma_mathrmref = 2 pi e^4 ln Lambda_ii (4 pi epsilon_0)^2. This means that tildenu_ss = (Z_s Z_s)^2tildenu_mathrmref and this conversion is handled explicitly in the code with the charge number input provided by the user.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.fokker_planck_collision_operator_weak_form_Maxwellian_Fsp!-Tuple{Any, Float64, Float64, Float64, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, Vector{Float64}, moment_kinetics.fokker_planck_calculus.fokkerplanck_weakform_arrays_struct, Vararg{Any, 4}}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.fokker_planck_collision_operator_weak_form_Maxwellian_Fsp!","text":"Function for computing the collision operator\n\nsum_s^prime CF_sF_s^prime\n\nwhen \n\nF_s^prime\n\nis an analytically specified Maxwellian distribution\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.init_fokker_planck_collisions_direct_integration-Tuple{Any, Any}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.init_fokker_planck_collisions_direct_integration","text":"function that initialises the arrays needed to calculate the Rosenbluth potentials by direct integration. As this function is only supported to keep the testing of the direct integration method, the struct 'fka' created here does not contain all of the arrays necessary to compute the weak-form operator. This functionality could be ported if necessary.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.init_fokker_planck_collisions_weak_form-NTuple{4, Any}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.init_fokker_planck_collisions_weak_form","text":"function that initialises the arrays needed for Fokker Planck collisions using numerical integration to compute the Rosenbluth potentials only at the boundary and using an elliptic solve to obtain the potentials in the rest of the velocity space domain.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck/#moment_kinetics.fokker_planck.setup_fkpl_collisions_input-Tuple{Dict}","page":"fokker_planck","title":"moment_kinetics.fokker_planck.setup_fkpl_collisions_input","text":"Function for reading Fokker Planck collision operator input parameters. Structure the namelist as follows.\n\n[fokkerplanckcollisions] usefokkerplanck = true nuii = 1.0 frequency_option = \"manual\"\n\n\n\n\n\n","category":"method"},{"location":"zz_reference_parameters/#reference_parameters","page":"reference_parameters","title":"reference_parameters","text":"","category":"section"},{"location":"zz_reference_parameters/","page":"reference_parameters","title":"reference_parameters","text":"Modules = [moment_kinetics.reference_parameters]","category":"page"},{"location":"zz_reference_parameters/#moment_kinetics.reference_parameters","page":"reference_parameters","title":"moment_kinetics.reference_parameters","text":"Reference parameters\n\nReference parameters are not needed or used by the main part of the code, but define the physical units of the simulation, and are needed for a few specific steps during setup (e.g. calculation of normalised collision frequency).\n\n\n\n\n\n","category":"module"},{"location":"zz_reference_parameters/#moment_kinetics.reference_parameters.get_reference_collision_frequency_ee-Tuple{Any}","page":"reference_parameters","title":"moment_kinetics.reference_parameters.get_reference_collision_frequency_ee","text":"Calculate normalized electron-electron collision frequency at reference parameters for Coulomb collisions.\n\n\n\n\n\n","category":"method"},{"location":"zz_reference_parameters/#moment_kinetics.reference_parameters.get_reference_collision_frequency_ei-Tuple{Any}","page":"reference_parameters","title":"moment_kinetics.reference_parameters.get_reference_collision_frequency_ei","text":"Calculate normalized electron-ion collision frequency at reference parameters for Coulomb collisions.\n\nCurrently valid only for hydrogenic ions (Z=1)\n\n\n\n\n\n","category":"method"},{"location":"zz_reference_parameters/#moment_kinetics.reference_parameters.get_reference_collision_frequency_ii-Tuple{Any}","page":"reference_parameters","title":"moment_kinetics.reference_parameters.get_reference_collision_frequency_ii","text":"Calculate normalized ion-ion collision frequency at reference parameters for Coulomb collisions.\n\nCurrently valid only for hydrogenic ions (Z=1)\n\n\n\n\n\n","category":"method"},{"location":"zz_reference_parameters/#moment_kinetics.reference_parameters.setup_reference_parameters-Tuple{Any}","page":"reference_parameters","title":"moment_kinetics.reference_parameters.setup_reference_parameters","text":"\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#electron_fluid_equations","page":"electron_fluid_equations","title":"electron_fluid_equations","text":"","category":"section"},{"location":"zz_electron_fluid_equations/","page":"electron_fluid_equations","title":"electron_fluid_equations","text":"Modules = [moment_kinetics.electron_fluid_equations]","category":"page"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.calculate_Epar_from_electron_force_balance!-NTuple{11, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.calculate_Epar_from_electron_force_balance!","text":"solve the electron force balance (parallel momentum) equation for the parallel electric field, Epar: Epar = -dphi/dz = (2/ne) * (-dppare/dz + frictionforce + ne * me * nn * Ren * (un - ue)) NB: in 1D only Epar is needed for update of ion pdf, so boundary phi is irrelevant inputs: dense = electron density dppardz = zed derivative of electron parallel pressure nuei = electron-ion collision frequency friction = electron-ion parallel friction force nneutralspecies = number of evolved neutral species chargeexchange = electron-neutral charge exchange frequency meovermi = electron-ion mass ratio densn = neutral density uparn = neutral parallel flow upare = electron parallel flow output: Epar = parallel electric field\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.calculate_electron_density!-Tuple{Any, Any, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.calculate_electron_density!","text":"use quasineutrality to obtain the electron density from the initial densities of the various ion species: sumi densi = dense inputs: dense = electron density at previous time level updated = flag indicating if the electron density is updated densi = updated ion density output: dense = updated electron density updated = flag indicating that the electron density has been updated\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.calculate_electron_parallel_friction_force!-NTuple{8, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.calculate_electron_parallel_friction_force!","text":"\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.calculate_electron_qpar!-NTuple{9, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.calculate_electron_qpar!","text":"calculate the parallel component of the electron heat flux. there are currently two supported options for the parallel heat flux: Braginskii collisional closure - qpare = -3.16*ppare/(me*nuei)dT/dz - 0.71ppare*(upari-upare) collisionless closure - d(qpare)/dz = 0 ==> qpare = constant inputs: qpare = parallel electron heat flux at the previous time level qparupdated = flag indicating whether qpar is updated already pdf = electron pdf ppare = electron parallel pressure upare = electron parallel flow vthe = electron thermal speed dTedz = zed derivative of electron temperature upari = ion parallel flow nuei = electron-ion collision frequency meovermi = electron-to-ion mass ratio electronmodel = choice of model for electron physics vpa = struct containing information about the vpa coordinate output: qpare = updated parallel electron heat flux qparupdated = flag indicating that the parallel electron heat flux is updated\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.calculate_electron_qpar_from_pdf!-NTuple{5, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.calculate_electron_qpar_from_pdf!","text":"calculate the parallel component of the electron heat flux, defined as qpar = 2 * ppar * vth * int dwpa (pdf * wpa^3)\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.calculate_electron_upar_from_charge_conservation!-NTuple{8, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.calculate_electron_upar_from_charge_conservation!","text":"use charge conservation equation to solve for the electron parallel flow density: d/dz(sumi ni upari - ne upare) = 0 ==> {sumi ni upari}(z) - {sumi ni upari}(zbound) = {ne upare}(z) - {ne upare}(zbound) inputs: upare = should contain updated electron parallel flow at boundaries in zed updated = flag indicating whether the electron parallel flow is already updated dense = electron particle density upari = ion parallel flow density densi = ion particle density output: upare = contains the updated electron parallel flow\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.electron_braginskii_conduction!-Tuple{AbstractVector{Float64}, AbstractVector{Float64}, AbstractVector{Float64}, AbstractVector{Float64}, AbstractVector{Float64}, Vararg{Any, 8}}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.electron_braginskii_conduction!","text":"Add just the braginskii conduction contribution to the electron pressure, and assume that we have to calculate qpar and dqpar_dz from ppar within this function (they are not pre-calculated).\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.electron_energy_equation!-NTuple{17, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.electron_energy_equation!","text":"use the electron energy or temperature equation to evolve the electron temperature via an explicit time advance. NB: so far, this is only set up for 1D problem, where we can assume an isotropic distribution in fe so that pe = ne Te = ppar_e\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.electron_energy_residual!-NTuple{10, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.electron_energy_residual!","text":"electron_energy_residual!(residual, electron_ppar_out, fvec_in, moments,\n collisions, composition, external_source_settings,\n num_diss_params, z, dt)\n\nThe residual is a function whose input is electron_ppar, so that when it's output residual is zero, electronppar is the result of a backward-Euler timestep: (fout - fin) / dt = RHS(fout) ⇒ (fout - fin) - dt*RHS(f_out) = 0\n\nThis function assumes any needed moment derivatives are already calculated using electron_ppar_out and stored in moments.electron.\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_fluid_equations/#moment_kinetics.electron_fluid_equations.electron_fluid_qpar_boundary_condition!-NTuple{5, Any}","page":"electron_fluid_equations","title":"moment_kinetics.electron_fluid_equations.electron_fluid_qpar_boundary_condition!","text":"electron_fluid_qpar_boundary_condition!(electron_moments, z)\n\nImpose fluid approximation to electron sheath boundary condition on the parallel heat flux. See Stangeby textbook, equations (2.89) and (2.90).\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_z_advection/#neutral_z_advection","page":"neutral_z_advection","title":"neutral_z_advection","text":"","category":"section"},{"location":"zz_neutral_z_advection/","page":"neutral_z_advection","title":"neutral_z_advection","text":"Modules = [moment_kinetics.neutral_z_advection]","category":"page"},{"location":"zz_neutral_z_advection/#moment_kinetics.neutral_z_advection","page":"neutral_z_advection","title":"moment_kinetics.neutral_z_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_neutral_z_advection/#moment_kinetics.neutral_z_advection.adjust_advection_speed!-NTuple{5, Any}","page":"neutral_z_advection","title":"moment_kinetics.neutral_z_advection.adjust_advection_speed!","text":"\n\n\n\n","category":"method"},{"location":"zz_neutral_z_advection/#moment_kinetics.neutral_z_advection.neutral_advection_z!-NTuple{14, Any}","page":"neutral_z_advection","title":"moment_kinetics.neutral_z_advection.neutral_advection_z!","text":"do a single stage time advance (potentially as part of a multi-stage RK scheme)\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_z_advection/#moment_kinetics.neutral_z_advection.unnormalize_pdf!-NTuple{6, Any}","page":"neutral_z_advection","title":"moment_kinetics.neutral_z_advection.unnormalize_pdf!","text":"\n\n\n\n","category":"method"},{"location":"zz_neutral_z_advection/#moment_kinetics.neutral_z_advection.update_speed_neutral_z!-NTuple{11, Any}","page":"neutral_z_advection","title":"moment_kinetics.neutral_z_advection.update_speed_neutral_z!","text":"calculate the advection speed in the z-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_grid_transforms/#velocity_grid_transforms","page":"velocity_grid_transforms","title":"velocity_grid_transforms","text":"","category":"section"},{"location":"zz_velocity_grid_transforms/","page":"velocity_grid_transforms","title":"velocity_grid_transforms","text":"Modules = [moment_kinetics.velocity_grid_transforms]","category":"page"},{"location":"zz_velocity_grid_transforms/#moment_kinetics.velocity_grid_transforms","page":"velocity_grid_transforms","title":"moment_kinetics.velocity_grid_transforms","text":"\n\n\n\n","category":"module"},{"location":"manual_setup/#Manual-setup","page":"Manual setup","title":"Manual setup","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"If you want or need to set up moment_kinetics without using machines/machine_setup.sh, you will need to follow at least the steps in the following sections.","category":"page"},{"location":"manual_setup/#Install-Julia","page":"Manual setup","title":"Install Julia","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"Download Julia from https://julialang.org/downloads/, and add it to your $PATH so you can execute it from the command line.","category":"page"},{"location":"manual_setup/#Add-moment_kinetics-packages","page":"Manual setup","title":"Add moment_kinetics packages","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"Create a 'project' in the top-level directory by creating an empty Project.toml file, e.g.","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"$ touch Project.toml","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"Without this Project.toml file, running julia --project will activate a global project, not one linked specificially to the repo you are in, which is likely to cause confusion if you have more than one copy of the moment_kinetics repo (experience suggests you are likely to end up with multiple copies eventually!).","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"To add the moment_kinetics package to your project, start Julia, enter 'Package mode' by pressing ']' at the prompt and use develop (to exit 'Package mode' and return to the usual julia> prompt, press backspace):","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"$ julia --project\njulia> ]\npkg> develop ./moment_kinetics/","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"To allow post-processing add one or both of the post processing packages","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> develop ./makie_post_processing/makie_post_processing/","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"and/or","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> develop ./plots_post_processing/plots_post_processing/","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"To use the run_moment_kinetics.jl script, you will need to install MPI into the top-level project","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> add MPI","category":"page"},{"location":"manual_setup/#Set-up-MPI","page":"Manual setup","title":"Set up MPI","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"You probably want to use your system's MPI rather than a Julia-provided version. To do this add (in 'Package mode') the MPIPreferences package (documentation here) and then use its use_system_binary() function.","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> add MPIPreferences\npkg> \njulia> using MPIPreferences\njulia> MPIPreferences.use_system_binary()","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"Normally this should 'just work'. Sometimes, for example if the MPI library file is named something other than libmpi.so, you might have to pass some keyword arguments to use_system_binary() - see https://juliaparallel.org/MPI.jl/stable/reference/mpipreferences/#MPIPreferences.use_system_binary.","category":"page"},{"location":"manual_setup/#Link-HDF5","page":"Manual setup","title":"Link HDF5","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"To enable parallel I/O, you need to get HDF5.jl to use the system HDF5 library (which must be MPI-enabled and compiled using the same MPI as you run Julia with). To do this (see the HDF5.jl docs) add the HDF5 package and use its HDF5.API.set_libraries!() function","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> add HDF5\npkg> \njulia> using HDF5\njulia> HDF5.API.set_libraries!(\"/path/to/your/hdf5/directory/libhdf5.so\", \"/path/to/your/hdf5/directory/libhdf5_hl.so\")","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"JTO also found that (on a Linux laptop) it was necessary to compile HDF5 from source. The system-provided, MPI-linked libhdf5 depended on libcurl, and Julia links to an incompatible libcurl, causing an error. When compiled from source (enabling MPI!), HDF5 does not require libcurl (guess it is an optional dependency), avoiding the problem.","category":"page"},{"location":"manual_setup/#Enable-MMS-features","page":"Manual setup","title":"Enable MMS features","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"To enable the \"method of manufactured solutions\" (MMS) features, install the Symbolics package (for more explanation, see Optional dependencies)","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> add Symbolics","category":"page"},{"location":"manual_setup/#Enable-NetCDF-output","page":"Manual setup","title":"Enable NetCDF output","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"If you want the option to output to NetCDF instead of HDF5, install the NCDatasets package (for more explanation, see Optional dependencies)","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"pkg> add NCDatasets","category":"page"},{"location":"manual_setup/#Set-up-Plots-based-plotting-routines","page":"Manual setup","title":"Set up Plots-based plotting routines","text":"","category":"section"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"The plots_post_processing package has some functions that have to use PyPlot directly to access features not available through the Plots wrapper. This means that Julia has to be able to access an instance of Python which has matplotlib available. If you are going to use plots_post_processing you may well want to use the same Python that you use outside Julia (e.g. a system-provided Python) - to do so:","category":"page"},{"location":"manual_setup/","page":"Manual setup","title":"Manual setup","text":"Check that matplotlib is installed, e.g. check that\n$ python\n>>> import matplotlib\ncompletes without an error. If not, install matplotlib, for example with a command like\npip install --user matplotlib\nSet up Julia to use your chosen Python\n$ which python\n/your/python/location\n$ julia -O3 --project\njulia> ENV[\"PYTHON\"]=\"/your/python/location\"\njulia> using Pkg; Pkg.build(\"PyCall\")","category":"page"},{"location":"zz_electron_z_advection/#electron_z_advection","page":"electron_z_advection","title":"electron_z_advection","text":"","category":"section"},{"location":"zz_electron_z_advection/","page":"electron_z_advection","title":"electron_z_advection","text":"Modules = [moment_kinetics.electron_z_advection]","category":"page"},{"location":"zz_electron_z_advection/#moment_kinetics.electron_z_advection","page":"electron_z_advection","title":"moment_kinetics.electron_z_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_electron_z_advection/#moment_kinetics.electron_z_advection.electron_z_advection!-NTuple{10, Any}","page":"electron_z_advection","title":"moment_kinetics.electron_z_advection.electron_z_advection!","text":"calculate the z-advection term for the electron kinetic equation = wpa * vthe * df/dz\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_z_advection/#moment_kinetics.electron_z_advection.update_electron_speed_z!-NTuple{4, Any}","page":"electron_z_advection","title":"moment_kinetics.electron_z_advection.update_electron_speed_z!","text":"calculate the electron advection speed in the z-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"constraints_on_normalized_distribution_function/#Constraints-on-normalized-distribution-function","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"","category":"section"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"Note: Equation references give the Excalibur/Neptune report number and equation number, e.g. (TN-04;1) is equation (1) from report TN-04.pdf.","category":"page"},{"location":"constraints_on_normalized_distribution_function/#Constraints","page":"Constraints on normalized distribution function","title":"Constraints","text":"","category":"section"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"The normalized particle distribution function that is evolved when using the moment-kinetic approach has to satisfy integral constraints related to particle number, momentum and energy conservation (TN-04;70-72)","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n frac1sqrtpiint dw_tildeg_s =1\n frac1sqrtpiint dw_w_tildeg_s =0\n frac1sqrtpiint dw_w_^2tildeg_s =frac12\nendalign","category":"page"},{"location":"constraints_on_normalized_distribution_function/#Old-algorithm","page":"Constraints on normalized distribution function","title":"Old algorithm","text":"","category":"section"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"The algorithm described in TN-04 used the distribution function from the previous time step and also made use of a symmetrized distribution function tildeg_E(w_)=frac12left(tildeg(w_)+tildeg(-w_)right). These choices caused problems when in combination with the boundary conditions as: applying the boundary condition at the new timestep (with an updated tildeu_) to the old tildeg_s could mean that it no longer satisfied the moment constraints (e.g. if a grid point that was previously non-zero is now set to zero by the ion sheath boundary condition); the symmetrized tildeg_E will be non-zero at places where the boundary condition forces tildeg_s to be zero. It is possible to extend the algorithm to allow the constraints to be enforced using only the initial guess of the distribution function at the new timestep, as described below.","category":"page"},{"location":"constraints_on_normalized_distribution_function/#Current-algorithm","page":"Constraints on normalized distribution function","title":"Current algorithm","text":"","category":"section"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"After the time advance updates the distribution function, it will in general not obey the constraints, but the errors will be small, with the size depending on the accuracy of the spatial and temporal discretizations. We can take this updated value hatg_s as an initial guess, to be corrected to give the actual updated value tildeg_s, which does obey the constraints to machine precision.","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"We define the corrected distribution function as","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n tildeg_s=Ahatg_s+Bw_hatg_s+Cw_^2hatg_s\nendalign","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"and define the moments of hatg_s","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n I_n=frac1sqrtpiint dw_w_^nhatg_s\nendalign","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"Then the moments of tildeg_s are","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n frac1sqrtpiint dw_tildeg_s=1 =frac1sqrtpiint dw_left(Ahatg_s+Bw_hatg_s+Cw_^2hatg_sright)=AI_0+BI_1+CI_2\n frac1sqrtpiint dw_w_tildeg_s=0 =frac1sqrtpiint dw_left(Aw_hatg_s+Bw_^2hatg_s+Cw_^3hatg_sright)=AI_1+BI_2+CI_3\n frac1sqrtpiint dw_w_^2tildeg_s=frac12 =frac1sqrtpiint dw_left(Aw_^2hatg_s+Bw_^3hatg_s+Cw_^4hatg_sright)=AI_2+BI_3+CI_4\nendalign","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"Solving the simultaneous equations for A, B, C gives","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n C =fracfrac12-AI_2-BI_3I_4\n B =fracleft(I_2I_3-I_1I_4right)A-fracI_32I_2I_4-I_3^2\n A =fracI_2I_4-fracI_2^22+I_3left(fracI_12-I_3right)I_0left(I_2I_4-I_3^2right)+I_1left(I_2I_3-I_1I_4right)+I_2left(I_1I_3-I_2^2right)\nendalign","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"Note that there is no guarantee that tildeg_s is geq0 even if hatg_sgeq0, although if the violations of the integral constraints are small, it should be true that Aapprox1 while B and C are small.","category":"page"},{"location":"constraints_on_normalized_distribution_function/#Evolving-u_\\parallel","page":"Constraints on normalized distribution function","title":"Evolving u_parallel","text":"","category":"section"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"When evolving fewer moments separately, the constraints become simpler. When evolving n and u_parallel, only the first two constraints are needed. This corresponds to C=0 so that","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n 1 = AI_0 + BI_1 \n 0 = AI_1 + BI_2 \n Rightarrow B = -fracAI_1I_2 \n AI_0 = 1 - BI_1 = 1 + fracAI_1^2I_2 \n A = frac1I_0 - I_1^2I_2\nendalign","category":"page"},{"location":"constraints_on_normalized_distribution_function/#Evolving-n","page":"Constraints on normalized distribution function","title":"Evolving n","text":"","category":"section"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"When evolving only n separately, we only need one constraint and the correction is just a re-scaling. This corresponds to B=0C=0 so that","category":"page"},{"location":"constraints_on_normalized_distribution_function/","page":"Constraints on normalized distribution function","title":"Constraints on normalized distribution function","text":"beginalign\n 1 = AI_0 \n A = frac1I_0\nendalign","category":"page"},{"location":"zz_command_line_options/#command_line_options","page":"command_line_options","title":"command_line_options","text":"","category":"section"},{"location":"zz_command_line_options/","page":"command_line_options","title":"command_line_options","text":"Modules = [moment_kinetics.command_line_options]","category":"page"},{"location":"zz_command_line_options/#moment_kinetics.command_line_options","page":"command_line_options","title":"moment_kinetics.command_line_options","text":"Parse command line arguments\n\nHave to include test options here too, because ArgParse errors on unrecognized options.\n\n\n\n\n\n","category":"module"},{"location":"zz_command_line_options/#moment_kinetics.command_line_options.get_options-Tuple{}","page":"command_line_options","title":"moment_kinetics.command_line_options.get_options","text":"\n\n\n\n","category":"method"},{"location":"zz_em_fields/#em_fields","page":"em_fields","title":"em_fields","text":"","category":"section"},{"location":"zz_em_fields/","page":"em_fields","title":"em_fields","text":"Modules = [moment_kinetics.em_fields]","category":"page"},{"location":"zz_em_fields/#moment_kinetics.em_fields","page":"em_fields","title":"moment_kinetics.em_fields","text":"\n\n\n\n","category":"module"},{"location":"zz_em_fields/#moment_kinetics.em_fields.setup_em_fields-NTuple{5, Any}","page":"em_fields","title":"moment_kinetics.em_fields.setup_em_fields","text":"\n\n\n\n","category":"method"},{"location":"zz_em_fields/#moment_kinetics.em_fields.update_phi!-Tuple{Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, moment_kinetics.gyroaverages.gyro_operators}","page":"em_fields","title":"moment_kinetics.em_fields.update_phi!","text":"update_phi updates the electrostatic potential, phi\n\n\n\n\n\n","category":"method"},{"location":"#Home","page":"Home","title":"Home","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Documentation for moment_kinetics.jl","category":"page"},{"location":"#Contents","page":"Home","title":"Contents","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Pages = [\"getting_started.md\",\n \"input_options.md\",\n \"post_processing_notes.md\",\n \"timestepping.md\",\n \"moment_kinetic_equations.md\",\n \"moment_constraints_notes.md\",\n \"boundary_conditions_notes.md\",\n \"external_sources_notes.md\",\n \"debugging-hints.md\",\n \"developing.md\",\n \"manual_setup.md\",\n \"machine_setup_notes.md\",\n \"parameter_scans.md\",\n \"manufactured_solution_test_examples.md\",\n ]","category":"page"},{"location":"#Modules","page":"Home","title":"Modules","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"Order = [:module]","category":"page"},{"location":"zz_manufactured_solns/#manufactured_solns","page":"manufactured_solns","title":"manufactured_solns","text":"","category":"section"},{"location":"zz_manufactured_solns/","page":"manufactured_solns","title":"manufactured_solns","text":"Modules = [moment_kinetics.manufactured_solns]","category":"page"},{"location":"zz_manufactured_solns/#moment_kinetics.manufactured_solns","page":"manufactured_solns","title":"moment_kinetics.manufactured_solns","text":"\n\n\n\n","category":"module"},{"location":"zz_neutral_vz_advection/#neutral_vz_advection","page":"neutral_vz_advection","title":"neutral_vz_advection","text":"","category":"section"},{"location":"zz_neutral_vz_advection/","page":"neutral_vz_advection","title":"neutral_vz_advection","text":"Modules = [moment_kinetics.neutral_vz_advection]","category":"page"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.neutral_advection_vz!-NTuple{15, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.neutral_advection_vz!","text":"\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_constant_neutral!-NTuple{6, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_constant_neutral!","text":"update the advection speed dvpa/dt = constant\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_default_neutral!-NTuple{10, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_default_neutral!","text":"\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_linear_neutral-NTuple{6, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_linear_neutral","text":"update the advection speed dvpa/dt = const*(vpa + L/2)\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_n_p_evolution_neutral!-NTuple{10, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_n_p_evolution_neutral!","text":"update the advection speed in the parallel velocity coordinate for the case where density and pressure are evolved independently from the pdf; in this case, the parallel velocity coordinate is the normalized velocity vpahat = vpa/vth\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_n_u_evolution_neutral!-NTuple{9, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_n_u_evolution_neutral!","text":"update the advection speed in the parallel velocity coordinate for the case where density and flow are evolved independently from the pdf; in this case, the parallel velocity coordinate is the peculiar velocity wpa = vpa-upar\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_n_u_p_evolution_neutral!-NTuple{9, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_n_u_p_evolution_neutral!","text":"update the advection speed (for the neutral distribution function) in the z-velocity coordinate for the case where density, flow and pressure are evolved independently from the pdf; in this case, the parallel velocity coordinate is the normalized peculiar velocity wpahat = (vpa - upar)/vth\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_vz_advection/#moment_kinetics.neutral_vz_advection.update_speed_neutral_vz!-NTuple{12, Any}","page":"neutral_vz_advection","title":"moment_kinetics.neutral_vz_advection.update_speed_neutral_vz!","text":"calculate the advection speed in the vz-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#nonlinear_solvers","page":"nonlinear_solvers","title":"nonlinear_solvers","text":"","category":"section"},{"location":"zz_nonlinear_solvers/","page":"nonlinear_solvers","title":"nonlinear_solvers","text":"Modules = [moment_kinetics.nonlinear_solvers]","category":"page"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers","text":"Nonlinear solvers, using Jacobian-free Newton-Krylov methods.\n\nThese solvers use an outer Newton iteration. Each step of the Newton iteration requires a linear solve of the Jacobian. An 'inexact Jacobian' method is used, and the GMRES method (GMRES is a type of Krylov solver) is used to (approximately) solve the (approximate) linear system.\n\nwarning: parallelisation\nThis module uses shared- and distributed-memory parallelism, so the functions in it should not be called inside any kind of parallelised loop. This restriction should be lifted somehow in future...\n\nparallel_map() is used to apply elementwise functions to arbitrary numbers of arguments using shared-memory parallelism. We do this rather than writing the loops out explicitly so that newton_solve!() and linear_solve!() can work for arrays with any combination of dimensions.\n\nUseful references: [1] V.A. Mousseau and D.A. Knoll, \"Fully Implicit Kinetic Solution of Collisional Plasmas\", Journal of Computational Physics 136, 308–323 (1997), https://doi.org/10.1006/jcph.1997.5736. [2] V.A. Mousseau, \"Fully Implicit Kinetic Modelling of Collisional Plasmas\", PhD thesis, Idaho National Engineering Laboratory (1996), https://inis.iaea.org/collection/NCLCollectionStore/Public/27/067/27067141.pdf. [3] https://en.wikipedia.org/wiki/Generalizedminimalresidualmethod [4] https://www.rikvoorhaar.com/blog/gmres [5] E. Carson , J. Liesen, Z. Strakoš, \"Towards understanding CG and GMRES through examples\", Linear Algebra and its Applications 692, 241–291 (2024), https://doi.org/10.1016/j.laa.2024.04.003. \n\n\n\n\n\n","category":"module"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.gather_nonlinear_solver_counters!-Tuple{Any}","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.gather_nonlinear_solver_counters!","text":"gather_nonlinear_solver_counters!(nl_solver_params)\n\nWhere necessary, gather the iteration counters for the nonlinear solvers.\n\nWhere each solve runs in parallel using all processes, this is unnecessary as the count on each process already represents the global count. Where each solve uses only a subset of processes, the counters from different solves need to be added together to get the global total.\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.get_distributed_dot-NTuple{4, Any}","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.get_distributed_dot","text":"get_distributed_dot(coords, rtol, atol, x)\n\nGet a 'distributed_dot' function that acts on arrays with dimensions given by the entries in coords.\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.get_distributed_norm-NTuple{4, Any}","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.get_distributed_norm","text":"get_distributed_norm(coords, rtol, atol, x)\n\nGet a 'distributed_norm' function that acts on arrays with dimensions given by the entries in coords.\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.get_parallel_delta_x_calc-Tuple{Any}","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.get_parallel_delta_x_calc","text":"get_parallel_delta_x_calc(coords)\n\nGet a parallelised function that calculates the update delta_x from the V matrix and the minimum residual coefficients y.\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.get_parallel_map-Tuple{Any}","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.get_parallel_map","text":"get_parallel_map(coords)\n\nGet a 'parallel_map' function that acts on arrays with dimensions given by the entries in coords.\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.linear_solve!-NTuple{6, Any}","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.linear_solve!","text":"Apply the GMRES algorithm to solve the 'linear problem' J.δx^n = R(x^n), which is needed at each step of the outer Newton iteration (in newton_solve!()).\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.newton_solve!-NTuple{8, Any}","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.newton_solve!","text":"newton_solve!(x, rhs_func!, residual, delta_x, rhs_delta, w, nl_solver_params;\n left_preconditioner=nothing, right_preconditioner=nothing, coords)\n\nx is the initial guess at the solution, and is overwritten by the result of the Newton solve.\n\nrhs_func!(residual, x) is the function we are trying to find a solution of. It calculates\n\nmathttresidual = F(mathttx)\n\nwhere we are trying to solve F(x)=0.\n\nresidual, delta_x, rhs_delta and w are buffer arrays, with the same size as x, used internally.\n\nleft_preconditioner or right_preconditioner apply preconditioning. They should be passed a function that solves Px = b where P is the preconditioner matrix, b is given by the values passed to the function as the argument, and the result x is returned by overwriting the argument.\n\ncoords is a NamedTuple containing the coordinate structs corresponding to each dimension in x.\n\nTolerances\n\nNote that the meaning of the relative tolerance rtol and absolute tolerance atol is very different for the outer Newton iteration and the inner GMRES iteration.\n\nFor the outer Newton iteration the residual R(x^n) measures the departure of the system from the solution (at each grid point). Its size can be compared to the size of the solution x, so it makes sense to define an `error norm' for R(x^n) as\n\nE(x^n) = leftlVert fracR(x^n)mathttrtol x^n mathttatol rightrVert_2\n\nwhere leftlVert cdot rightrVert is the 'L2 norm' (square-root of sum of squares). We can further try to define a grid-size independent error norm by dividing out the number of grid points to get a root-mean-square (RMS) error rather than an L2 norm.\n\nE_mathrmRMS(x^n) = sqrt frac1N sum_i fracR(x^n)_imathttrtol x^n_i mathttatol \n\nwhere N is the total number of grid points.\n\nIn contrast, GMRES is constructed to minimise the L2 norm of r_k = b - Acdot x_k where GMRES is solving the linear system Acdot x = b, x_k is the approximation to the solution x at the k'th iteration and r_k is the residual at the k'th iteration. There is no flexibility to measure error relative to x in any sense. For GMRES, a `relative tolerance' is relative to the residual of the right-hand-side b, which is the first iterate x_0 (when no initial guess is given). [Where a non-zero initial guess is given it might be better to use a different stopping criterion, see Carson et al. section 3.8.]. The stopping criterion for the GMRES iteration is therefore\n\n\\left\\lVert r_k \\right\\rVert < \\max(\\mathtt{linear\\_rtol} \\left\\lVert r_0 \\right\\rVert, \\mathtt{linear\\_atol}) = \\max(\\mathtt{linear\\_rtol} \\left\\lVert b \\right\\rVert, \\mathtt{linear\\_atol})\n\nAs the GMRES solve is only used to get the right direction' for the next Newton step, it is not necessary to have a very tightlinear_rtol` for the GMRES solve.\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.reset_nonlinear_per_stage_counters-Tuple{Union{Nothing, moment_kinetics.nonlinear_solvers.nl_solver_info}}","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.reset_nonlinear_per_stage_counters","text":"reset_nonlinear_per_stage_counters(nl_solver_params::Union{nl_solver_info,Nothing})\n\nReset the counters that hold per-step totals or maximums in nl_solver_params.\n\n\n\n\n\n","category":"method"},{"location":"zz_nonlinear_solvers/#moment_kinetics.nonlinear_solvers.setup_nonlinear_solve","page":"nonlinear_solvers","title":"moment_kinetics.nonlinear_solvers.setup_nonlinear_solve","text":"coords is a NamedTuple of coordinates corresponding to the dimensions of the variable that will be solved. The entries in coords should be ordered the same as the memory layout of the variable to be solved (i.e. fastest-varying first).\n\nThe nonlinear solver will be called inside a loop over outer_coords, so we might need for example a preconditioner object for each point in that outer loop.\n\n\n\n\n\n","category":"function"},{"location":"zz_advection/#advection","page":"advection","title":"advection","text":"","category":"section"},{"location":"zz_advection/","page":"advection","title":"advection","text":"Modules = [moment_kinetics.advection]","category":"page"},{"location":"zz_advection/#moment_kinetics.advection","page":"advection","title":"moment_kinetics.advection","text":"\n\n\n\n","category":"module"},{"location":"zz_advection/#moment_kinetics.advection.advection_info","page":"advection","title":"moment_kinetics.advection.advection_info","text":"structure containing the basic arrays associated with the advection terms appearing in the advection equation for each coordinate\n\n\n\n\n\n","category":"type"},{"location":"zz_advection/#moment_kinetics.advection.advance_f_local!-NTuple{9, Any}","page":"advection","title":"moment_kinetics.advection.advance_f_local!","text":"do all the work needed to update f(coord) at a single value of other coords\n\n\n\n\n\n","category":"method"},{"location":"zz_advection/#moment_kinetics.advection.calculate_explicit_advection!-NTuple{4, Any}","page":"advection","title":"moment_kinetics.advection.calculate_explicit_advection!","text":"calculate the explicit advection terms on the rhs of the equation; i.e., -Δt⋅δv⋅f'\n\n\n\n\n\n","category":"method"},{"location":"zz_advection/#moment_kinetics.advection.setup_advection-Tuple{Any, Vararg{Any}}","page":"advection","title":"moment_kinetics.advection.setup_advection","text":"create arrays needed to compute the advection term(s) for a 1D problem\n\n\n\n\n\n","category":"method"},{"location":"zz_advection/#moment_kinetics.advection.setup_advection_per_species-Tuple","page":"advection","title":"moment_kinetics.advection.setup_advection_per_species","text":"create arrays needed to compute the advection term(s)\n\n\n\n\n\n","category":"method"},{"location":"zz_advection/#moment_kinetics.advection.update_advection_factor!-NTuple{4, Any}","page":"advection","title":"moment_kinetics.advection.update_advection_factor!","text":"calculate the factor appearing in front of f' in the advection term at time level n in the frame moving with the approximate characteristic\n\n\n\n\n\n","category":"method"},{"location":"zz_advection/#moment_kinetics.advection.update_f!-Tuple{Any, Any, Any}","page":"advection","title":"moment_kinetics.advection.update_f!","text":"\n\n\n\n","category":"method"},{"location":"zz_advection/#moment_kinetics.advection.update_rhs!-NTuple{8, Any}","page":"advection","title":"moment_kinetics.advection.update_rhs!","text":"update the righthand side of the equation to account for 1d advection in this coordinate\n\n\n\n\n\n","category":"method"},{"location":"debugging-hints/#Debugging","page":"Debugging","title":"Debugging","text":"","category":"section"},{"location":"debugging-hints/#Shared-memory-parallelism","page":"Debugging","title":"Shared-memory parallelism","text":"","category":"section"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"For information on race conditions and debugging, see Shared memory debugging.","category":"page"},{"location":"debugging-hints/#Dumping-state-of-physics-variables","page":"Debugging","title":"Dumping state of physics variables","text":"","category":"section"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"There is a function moment_kinetics.file_io.debug_dump provided in the moment_kinetics.file_io module that can be inserted to save the distribution function, moments, etc. These can include a label so that if there are several 'dumps' within a timestep, they can be easily identified.","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"To use, first import the function","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"using ..file_io: debug_dump","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"then insert calls at the point where you want to save the variables, e.g.","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"debug_dump(f, density, upar, ppar, phi, t, istage=istage, label=\"foo\")","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"where f, density, upar, ppar, and phi are arrays and t is an mk_float. istage is an optional mk_int, and can be used to identify the stage in the ssp_rk!() function. label is optional and can be any string, intended to distinguish different calls to debug_dump().","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"There is an alternative method (implementation) of the function that takes moment_kinetics.moment_kinetics_structs.scratch_pdf and moment_kinetics.moment_kinetics_structs.em_fields_struct arguments. This can be convenient within the functions in moment_kinetics.time_advance, e.g.","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"debug_dump(fvec_out, fields, t, istage=istage, label=\"bar\")","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"Any of the positional arguments can be replaced by nothing if they are not available in a certain place, or just not needed. If nothing is passed, then arrays filled with 0.0 are written into the output.","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"The output is written into a NetCDF file debug_output.cdf in the current directory (the filename is currently hard-coded because that was simpler than adding more command line arguments, etc.).","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"For debugging, a script util/compare_debug_files.jl is provided to compare two output files, assumed to have similar structure (i.e. the same set of debug_dump() calls). An example workflow could be:","category":"page"},{"location":"debugging-hints/","page":"Debugging","title":"Debugging","text":"Checkout master branch.\nCreate new branch, git checkout -b newfeature.\nWork on newfeature...\nAt some point, a bug is introduced which breaks some test or example - i.e. changes its output. Commit the current state of the code.\nAdd debug_dump() calls before and after locations where the bug is likely to be.\nRun the broken case.\nmv debug_output.cdf debug_after.cdf, so the file does not get overwritten.\ngit stash to 'save' the debug_dump() statements.\ngit checkout a commit where the test/example was working.\ngit stash pop to add the debug_dump() statements on top of the working commit (fingers crossed there are no merge conflicts).\nRun the test example again.\nmv debug_output.cdf debug_before.cdf\nRun the comparison script julia util/compare_debug_files.jl debug_before.cdf debug_after.cdf\nThe script identifies the first point (by t, istage and label) where any variable in the two output files has a maximum difference that is larger than some very tight (1.e-14) absolute and relative tolerances, and reports which variables were different and their maximum difference.","category":"page"},{"location":"zz_file_io/#file_io","page":"file_io","title":"file_io","text":"","category":"section"},{"location":"zz_file_io/","page":"file_io","title":"file_io","text":"Modules = [moment_kinetics.file_io]","category":"page"},{"location":"zz_file_io/#moment_kinetics.file_io","page":"file_io","title":"moment_kinetics.file_io","text":"\n\n\n\n","category":"module"},{"location":"zz_file_io/#moment_kinetics.file_io.debug_output_counter","page":"file_io","title":"moment_kinetics.file_io.debug_output_counter","text":"Global counter for calls to debug_dump\n\n\n\n\n\n","category":"constant"},{"location":"zz_file_io/#moment_kinetics.file_io.debug_output_file","page":"file_io","title":"moment_kinetics.file_io.debug_output_file","text":"An nc_info instance that may be initialised for writing debug output\n\nThis is a non-const module variable, so does cause type instability, but it is only used for debugging (from debug_dump()) so performance is not critical.\n\n\n\n\n\n","category":"constant"},{"location":"zz_file_io/#moment_kinetics.file_io.ascii_ios","page":"file_io","title":"moment_kinetics.file_io.ascii_ios","text":"structure containing the various input/output streams\n\n\n\n\n\n","category":"type"},{"location":"zz_file_io/#moment_kinetics.file_io.io_dfns_info","page":"file_io","title":"moment_kinetics.file_io.io_dfns_info","text":"structure containing the data/metadata needed for binary file i/o distribution function data only\n\n\n\n\n\n","category":"type"},{"location":"zz_file_io/#moment_kinetics.file_io.io_initial_electron_info","page":"file_io","title":"moment_kinetics.file_io.io_initial_electron_info","text":"structure containing the data/metadata needed for binary file i/o for electron initialization\n\n\n\n\n\n","category":"type"},{"location":"zz_file_io/#moment_kinetics.file_io.io_input_struct","page":"file_io","title":"moment_kinetics.file_io.io_input_struct","text":"Container for I/O settings\n\n\n\n\n\n","category":"type"},{"location":"zz_file_io/#moment_kinetics.file_io.io_moments_info","page":"file_io","title":"moment_kinetics.file_io.io_moments_info","text":"structure containing the data/metadata needed for binary file i/o moments & fields only\n\n\n\n\n\n","category":"type"},{"location":"zz_file_io/#moment_kinetics.file_io.add_attribute!","page":"file_io","title":"moment_kinetics.file_io.add_attribute!","text":"Add an attribute to a file, group or variable\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.append_to_dynamic_var","page":"file_io","title":"moment_kinetics.file_io.append_to_dynamic_var","text":"append_to_dynamic_var(io_var, data, t_idx, parallel_io, coords...; only_root=false)\n\nAppend data to the dynamic variable io_var. The time-index of the data being appended is t_idx. parallel_io indicates whether parallel I/O is being used. coords... is used to get the ranges to write from/to (needed for parallel I/O) - the entries in the coords tuple can be either coordinate instances or integers (for an integer n the range is 1:n).\n\nIf only_root=true is passed, the data is only written once - from the global root process if parallel I/O is being used (if parallel I/O is not used, this has no effect as each file is only written by one process).\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.check_io_implementation-Tuple{Any}","page":"file_io","title":"moment_kinetics.file_io.check_io_implementation","text":"check_io_implementation(binary_format)\n\nCheck that an implementation is available for binary_format, raising an error if not.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.create_dynamic_variable!","page":"file_io","title":"moment_kinetics.file_io.create_dynamic_variable!","text":"create_dynamic_variable!(file_or_group, name, type,\n coords::{coordinate,NamedTuple}...;\n description=nothing, units=nothing)\n\nCreate a time-evolving variable in file_or_group named name of type type. coords are the coordinates corresponding to the dimensions of the array, in the order of the array dimensions - they may be either coordinate structs or NamedTuples that contain at least the fields name, n. The species dimension does not have a coordinate, so the number of species is passed as nspecies. A description and/or units can be added with the keyword arguments.\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.debug_dump","page":"file_io","title":"moment_kinetics.file_io.debug_dump","text":"debug_dump(ff, dens, upar, ppar, phi, t; istage=0, label=\"\")\ndebug_dump(fvec::scratch_pdf, fields::em_fields_struct, t; istage=0, label=\"\")\n\nDump variables into a NetCDF file for debugging\n\nIntended to be called more frequently than write_data_to_binary(), possibly several times within a timestep, so includes a label argument to identify the call site.\n\nWrites to a file called debug_output.h5 in the current directory.\n\nCan either be called directly with the arrays to be dumped (fist signature), or using scratch_pdf and em_fields_struct structs.\n\nnothing can be passed to any of the positional arguments (if they are unavailable at a certain point in the code, or just not interesting). t=nothing will set t to the value saved in the previous call (or 0.0 on the first call). Passing nothing to the other arguments will set that array to 0.0 for this call (need to write some value so all the arrays have the same length, with an entry for each call to debug_dump()).\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.define_dynamic_dfn_variables!-NTuple{16, Any}","page":"file_io","title":"moment_kinetics.file_io.define_dynamic_dfn_variables!","text":"define dynamic (time-evolving) distribution function variables for writing to the output file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_dynamic_electron_moment_variables!-Tuple{Any, moment_kinetics.coordinates.coordinate, moment_kinetics.coordinates.coordinate, Vararg{Any, 9}}","page":"file_io","title":"moment_kinetics.file_io.define_dynamic_electron_moment_variables!","text":"define dynamic (time-evolving) electron moment variables for writing to the hdf5 file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_dynamic_em_field_variables!-Tuple{Any, moment_kinetics.coordinates.coordinate, moment_kinetics.coordinates.coordinate, Any}","page":"file_io","title":"moment_kinetics.file_io.define_dynamic_em_field_variables!","text":"define dynamic (time-evolving) electromagnetic field variables for writing to the hdf5 file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_dynamic_ion_moment_variables!-Tuple{Any, Any, moment_kinetics.coordinates.coordinate, moment_kinetics.coordinates.coordinate, Vararg{Any, 7}}","page":"file_io","title":"moment_kinetics.file_io.define_dynamic_ion_moment_variables!","text":"define dynamic (time-evolving) ion moment variables for writing to the hdf5 file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_dynamic_moment_variables!-Tuple{Any, Any, Any, moment_kinetics.coordinates.coordinate, moment_kinetics.coordinates.coordinate, Vararg{Any, 8}}","page":"file_io","title":"moment_kinetics.file_io.define_dynamic_moment_variables!","text":"define dynamic (time-evolving) moment variables for writing to the hdf5 file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_dynamic_neutral_moment_variables!-Tuple{Any, Any, moment_kinetics.coordinates.coordinate, moment_kinetics.coordinates.coordinate, Vararg{Any, 7}}","page":"file_io","title":"moment_kinetics.file_io.define_dynamic_neutral_moment_variables!","text":"define dynamic (time-evolving) neutral moment variables for writing to the hdf5 file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_io_coordinate!-NTuple{5, Any}","page":"file_io","title":"moment_kinetics.file_io.define_io_coordinate!","text":"define a sub-group for each code coordinate and write to output file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.define_io_coordinates!-NTuple{9, Any}","page":"file_io","title":"moment_kinetics.file_io.define_io_coordinates!","text":"Define coords group for coordinate information in the output file and write information about spatial and velocity space coordinate grids\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.finish_electron_io-Tuple{Union{Nothing, Bool, Tuple, moment_kinetics.file_io.io_initial_electron_info}}","page":"file_io","title":"moment_kinetics.file_io.finish_electron_io","text":"close output files for electron initialization\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.finish_file_io-Tuple{Union{Nothing, moment_kinetics.file_io.ascii_ios}, Union{Nothing, Tuple, moment_kinetics.file_io.io_moments_info}, Union{Nothing, Tuple, moment_kinetics.file_io.io_dfns_info}}","page":"file_io","title":"moment_kinetics.file_io.finish_file_io","text":"close all opened output files\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.get_electron_io_info-Tuple{Any, Any}","page":"file_io","title":"moment_kinetics.file_io.get_electron_io_info","text":"Get the file_info for an existing electron I/O file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.get_group","page":"file_io","title":"moment_kinetics.file_io.get_group","text":"Get a (sub-)group from a file or group\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.get_subgroup_keys","page":"file_io","title":"moment_kinetics.file_io.get_subgroup_keys","text":"Get names of all subgroups\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.get_variable_keys","page":"file_io","title":"moment_kinetics.file_io.get_variable_keys","text":"Get names of all variables\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.hdf5_get_dynamic_dim_sizes-Tuple{Any, Any}","page":"file_io","title":"moment_kinetics.file_io.hdf5_get_dynamic_dim_sizes","text":"given a tuple, fixed_coords, containing all dimensions except the time dimension, get the dimension sizes and chunk sizes\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.hdf5_get_fixed_dim_sizes-Tuple{Any, Any}","page":"file_io","title":"moment_kinetics.file_io.hdf5_get_fixed_dim_sizes","text":"Get sizes of fixed dimensions and chunks (i.e. everything but time) for I/O\n\ncoords should be a tuple whose elements are coordinate structs or integers (e.g. number of species).\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.input_option_error-Tuple{Any, Any}","page":"file_io","title":"moment_kinetics.file_io.input_option_error","text":"accepts an option name which has been identified as problematic and returns an appropriate error message\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.io_has_parallel","page":"file_io","title":"moment_kinetics.file_io.io_has_parallel","text":"io_has_parallel(Val(binary_format))\n\nTest if the backend supports parallel I/O.\n\nbinary_format should be one of the values of the binary_format_type enum\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.is_group","page":"file_io","title":"moment_kinetics.file_io.is_group","text":"Test if a member of a (sub-)group is a group\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.modify_attribute!","page":"file_io","title":"moment_kinetics.file_io.modify_attribute!","text":"Modify an attribute to a file, group or variable\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.open_ascii_output_file-Tuple{Any, Any}","page":"file_io","title":"moment_kinetics.file_io.open_ascii_output_file","text":"opens an output file with the requested prefix and extension and returns the corresponding io stream (identifier)\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.open_output_file-Tuple{Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.open_output_file","text":"Open an output file, selecting the backend based on io_option\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.open_output_file_implementation","page":"file_io","title":"moment_kinetics.file_io.open_output_file_implementation","text":"Low-level function to open a binary output file\n\nEach implementation (HDF5, NetCDF, etc.) defines a method of this function to open a file of the corresponding type.\n\n\n\n\n\n","category":"function"},{"location":"zz_file_io/#moment_kinetics.file_io.reopen_dfns_io-Tuple{Any}","page":"file_io","title":"moment_kinetics.file_io.reopen_dfns_io","text":"Reopen an existing distribution-functions output file to append more data\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.reopen_initial_electron_io-Tuple{Any}","page":"file_io","title":"moment_kinetics.file_io.reopen_initial_electron_io","text":"Reopen an existing initial electron output file to append more data\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.reopen_moments_io-Tuple{Any}","page":"file_io","title":"moment_kinetics.file_io.reopen_moments_io","text":"Reopen an existing moments output file to append more data\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.reopen_output_file-Tuple{Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.reopen_output_file","text":"Re-open an existing output file, selecting the backend based on io_option\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.setup_dfns_io-NTuple{24, Any}","page":"file_io","title":"moment_kinetics.file_io.setup_dfns_io","text":"setup file i/o for distribution function variables\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.setup_electron_io-NTuple{16, Any}","page":"file_io","title":"moment_kinetics.file_io.setup_electron_io","text":"open output file to save the initial electron pressure and distribution function\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.setup_file_io-NTuple{21, Any}","page":"file_io","title":"moment_kinetics.file_io.setup_file_io","text":"open the necessary output files\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.setup_io_input-Tuple{Any, Any}","page":"file_io","title":"moment_kinetics.file_io.setup_io_input","text":"Read the settings for I/O\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.setup_moments_io-NTuple{23, Any}","page":"file_io","title":"moment_kinetics.file_io.setup_moments_io","text":"setup file i/o for moment variables\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_Dict_to_section-Tuple{Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.write_Dict_to_section","text":"write_Dict_to_section(section_io, section_dict, parallel_io)\n\nWrite the contents of section_dict into the I/O group section_io.\n\nAny nested Dicts in section_dict are written to subsections.\n\nAll the keys in section_dict (and any nested Dicts) should be Strings.\n\nparallel_io is a Bool indicating whether parallel I/O is being used.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_all_dfns_data_to_binary-NTuple{18, Any}","page":"file_io","title":"moment_kinetics.file_io.write_all_dfns_data_to_binary","text":"write time-dependent distribution function data for ions, electrons and neutrals to the binary output file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_all_moments_data_to_binary-NTuple{12, Any}","page":"file_io","title":"moment_kinetics.file_io.write_all_moments_data_to_binary","text":"write time-dependent moments data for ions, electrons and neutrals to the binary output file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_boundary_distributions!-NTuple{10, Any}","page":"file_io","title":"moment_kinetics.file_io.write_boundary_distributions!","text":"Write the distributions that may be used for boundary conditions to the output file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_data_to_ascii-Tuple{Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Union{Nothing, moment_kinetics.file_io.ascii_ios}}","page":"file_io","title":"moment_kinetics.file_io.write_data_to_ascii","text":"\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_electron_dfns_data_to_binary-Tuple{Any, Any, Union{moment_kinetics.file_io.io_dfns_info, moment_kinetics.file_io.io_initial_electron_info}, Vararg{Any, 5}}","page":"file_io","title":"moment_kinetics.file_io.write_electron_dfns_data_to_binary","text":"write time-dependent distribution function data for electrons to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_electron_moments_data_to_binary-Tuple{Any, Any, Any, Any, Union{moment_kinetics.file_io.io_initial_electron_info, moment_kinetics.file_io.io_moments_info}, Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.write_electron_moments_data_to_binary","text":"write time-dependent moments data for electrons to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_electron_state-NTuple{9, Any}","page":"file_io","title":"moment_kinetics.file_io.write_electron_state","text":"write_electron_state(scratch_electron, moments, t_params, io_initial_electron,\n t_idx, r, z, vperp, vpa; pdf_electron_converged=false)\n\nWrite the electron state to an output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_em_fields_data_to_binary-Tuple{Any, moment_kinetics.file_io.io_moments_info, Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.write_em_fields_data_to_binary","text":"write time-dependent EM fields data to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_f_ascii-NTuple{5, Any}","page":"file_io","title":"moment_kinetics.file_io.write_f_ascii","text":"write the function f(z,vpa) at this time slice\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_fields_ascii-NTuple{5, Any}","page":"file_io","title":"moment_kinetics.file_io.write_fields_ascii","text":"write electrostatic potential at this time slice\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_input!-Tuple{Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.write_input!","text":"Save info from the dict with input settings to the output file\n\nNote: assumes all keys in input_dict are strings.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_ion_dfns_data_to_binary-Tuple{Any, Any, Any, moment_kinetics.file_io.io_dfns_info, Vararg{Any, 5}}","page":"file_io","title":"moment_kinetics.file_io.write_ion_dfns_data_to_binary","text":"write time-dependent distribution function data for ions to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_ion_moments_data_to_binary-Tuple{Any, Any, Any, Any, moment_kinetics.file_io.io_moments_info, Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.write_ion_moments_data_to_binary","text":"write time-dependent moments data for ions to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_moments_electron_ascii-NTuple{5, Any}","page":"file_io","title":"moment_kinetics.file_io.write_moments_electron_ascii","text":"write moments of the ion species distribution function f at this time slice\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_moments_ion_ascii-NTuple{6, Any}","page":"file_io","title":"moment_kinetics.file_io.write_moments_ion_ascii","text":"write moments of the ion species distribution function f at this time slice\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_moments_neutral_ascii-NTuple{6, Any}","page":"file_io","title":"moment_kinetics.file_io.write_moments_neutral_ascii","text":"write moments of the neutral species distribution function f_neutral at this time slice\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_neutral_dfns_data_to_binary-Tuple{Any, Any, Any, moment_kinetics.file_io.io_dfns_info, Vararg{Any, 6}}","page":"file_io","title":"moment_kinetics.file_io.write_neutral_dfns_data_to_binary","text":"write time-dependent distribution function data for neutrals to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_neutral_moments_data_to_binary-Tuple{Any, Any, Any, Any, moment_kinetics.file_io.io_moments_info, Any, Any, Any}","page":"file_io","title":"moment_kinetics.file_io.write_neutral_moments_data_to_binary","text":"write time-dependent moments data for neutrals to the binary output file\n\nNote: should only be called from within a function that (re-)opens the output file.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_overview!-NTuple{8, Any}","page":"file_io","title":"moment_kinetics.file_io.write_overview!","text":"write some overview information for the simulation to the binary file\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_provenance_tracking_info!-NTuple{6, Any}","page":"file_io","title":"moment_kinetics.file_io.write_provenance_tracking_info!","text":"Write provenance tracking information, to allow runs to be reproduced.\n\n\n\n\n\n","category":"method"},{"location":"zz_file_io/#moment_kinetics.file_io.write_single_value!","page":"file_io","title":"moment_kinetics.file_io.write_single_value!","text":"write_single_value!(file_or_group, name,\n data::Union{Number, AbstractString, AbstractArray{T,N}},\n coords::Union{coordinate,mk_int,NamedTuple}...; parallel_io,\n description=nothing, units=nothing) where {T,N}\n\nWrite a single variable to a file or group. If a description or units are passed, add as attributes of the variable.\n\n\n\n\n\n","category":"function"},{"location":"zz_velocity_moments/#velocity_moments","page":"velocity_moments","title":"velocity_moments","text":"","category":"section"},{"location":"zz_velocity_moments/","page":"velocity_moments","title":"velocity_moments","text":"Modules = [moment_kinetics.velocity_moments]","category":"page"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments","page":"velocity_moments","title":"moment_kinetics.velocity_moments","text":"\n\n\n\n","category":"module"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.calculate_electron_moment_derivatives!-NTuple{7, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.calculate_electron_moment_derivatives!","text":"Pre-calculate spatial derivatives of the electron moments that will be needed for the time advance\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.calculate_ion_moment_derivatives!-NTuple{6, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.calculate_ion_moment_derivatives!","text":"Pre-calculate spatial derivatives of the moments that will be needed for the time advance\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.calculate_neutral_moment_derivatives!-NTuple{6, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.calculate_neutral_moment_derivatives!","text":"Pre-calculate spatial derivatives of the neutral moments that will be needed for the time advance\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.create_moments_electron-NTuple{5, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.create_moments_electron","text":"create a moment struct containing information about the electron moments\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.create_moments_ion-NTuple{8, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.create_moments_ion","text":"\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.get_pressure-Tuple{Float64, Float64}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.get_pressure","text":"compute the isotropic pressure from the already computed ppar and pperp\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.integrate_over_negative_vpa-NTuple{6, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.integrate_over_negative_vpa","text":"computes the integral over vpa <= 0 of the integrand, using the input vpa_wgts this could be made more efficient for the case that dz/dt = vpa is time-independent, but it has been left general for the cases where, e.g., dz/dt = wpa*vth + upar varies in time\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.integrate_over_positive_vpa-NTuple{6, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.integrate_over_positive_vpa","text":"computes the integral over vpa >= 0 of the integrand, using the input vpa_wgts this could be made more efficient for the case that dz/dt = vpa is time-independent, but it has been left general for the cases where, e.g., dz/dt = wpa*vth + upar varies in time\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.integrate_over_vspace-Tuple","page":"velocity_moments","title":"moment_kinetics.velocity_moments.integrate_over_vspace","text":"computes the integral over vpa of the integrand, using the input vpa_wgts\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.reset_moments_status!-Tuple{Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.reset_moments_status!","text":"\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_chodura_integral_species!-NTuple{14, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_chodura_integral_species!","text":"compute the integral needed for the generalised Chodura condition\n\nIChodura = (Z^2 vBohm^2 / cref^2) * int ( f bz^2 / vz^2 + dfdr*rhostar/vz ) vBohm = sqrt(Z Te/mi) with Z = 1 and mref = mi cref = sqrt(2Ti/mi) and normalise to the local ion density, appropriate to assessing the Chodura condition \n\nIChodura <= (Te/e)d ne / dphi |(sheath entrance) = ni\n\nto a single species plasma with Z = 1\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_density!-NTuple{8, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_density!","text":"NB: if this function is called and if dens_updated is false, then the incoming pdf is the un-normalized pdf that satisfies int dv pdf = density\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_density_species!-NTuple{6, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_density_species!","text":"calculate the updated density (dens) for a given species; should only be called when evolvedensity = false, in which case the vpa coordinate is vpa/cs\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_derived_moments!-NTuple{13, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_derived_moments!","text":"update velocity moments that are calculable from the evolved ion pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_derived_moments_neutral!-NTuple{8, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_derived_moments_neutral!","text":"update velocity moments that are calculable from the evolved neutral pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_moments!-Tuple{Any, Any, moment_kinetics.gyroaverages.gyro_operators, Vararg{Any, 9}}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_moments!","text":"calculate the updated density (dens) and parallel pressure (ppar) for all species this function is only used once after initialisation the function used to update moments at run time is updatederivedmoments! in time_advance.jl\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_moments_neutral!-NTuple{8, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_moments_neutral!","text":"update velocity moments of the evolved neutral pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_density!-NTuple{9, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_density!","text":"calculate the neutral density from the neutral pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_density_species!-NTuple{7, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_density_species!","text":"calculate the updated density (dens) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_pr_species!-NTuple{7, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_pr_species!","text":"calculate the updated pressure in the rr direction (pr) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_pz_species!-NTuple{11, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_pz_species!","text":"calculate the updated pressure in zz direction (pz) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_pzeta_species!-NTuple{7, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_pzeta_species!","text":"calculate the updated pressure in the zeta zeta direction (pzeta) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_qz_species!-NTuple{13, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_qz_species!","text":"calculate the updated heat flux zzz direction (qz) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_ur_species!-NTuple{8, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_ur_species!","text":"calculate the updated ur (mean velocity in r) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_uz_species!-NTuple{11, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_uz_species!","text":"calculate the updated uz (mean velocity in z) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_neutral_uzeta_species!-NTuple{8, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_neutral_uzeta_species!","text":"calculate the updated uzeta (mean velocity in zeta) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_ppar!-NTuple{12, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_ppar!","text":"NB: if this function is called and if ppar_updated is false, then the incoming pdf is the un-normalized pdf that satisfies int dv pdf = density\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_ppar_species!-NTuple{10, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_ppar_species!","text":"calculate the updated energy density (or parallel pressure, ppar) for a given species; which of these is calculated depends on the definition of the vpa coordinate\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_pperp_species!-NTuple{6, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_pperp_species!","text":"calculate the updated perpendicular pressure (pperp) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_qpar!-NTuple{14, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_qpar!","text":"NB: the incoming pdf is the normalized pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_qpar_species!-NTuple{12, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_qpar_species!","text":"calculate the updated parallel heat flux (qpar) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_upar!-NTuple{12, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_upar!","text":"NB: if this function is called and if upar_updated is false, then the incoming pdf is the un-normalized pdf that satisfies int dv pdf = density\n\n\n\n\n\n","category":"method"},{"location":"zz_velocity_moments/#moment_kinetics.velocity_moments.update_upar_species!-NTuple{10, Any}","page":"velocity_moments","title":"moment_kinetics.velocity_moments.update_upar_species!","text":"calculate the updated parallel flow (upar) for a given species\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#coordinates","page":"coordinates","title":"coordinates","text":"","category":"section"},{"location":"zz_coordinates/","page":"coordinates","title":"coordinates","text":"Modules = [moment_kinetics.coordinates]","category":"page"},{"location":"zz_coordinates/#moment_kinetics.coordinates","page":"coordinates","title":"moment_kinetics.coordinates","text":"\n\n\n\n","category":"module"},{"location":"zz_coordinates/#moment_kinetics.coordinates.coordinate","page":"coordinates","title":"moment_kinetics.coordinates.coordinate","text":"structure containing basic information related to coordinates\n\n\n\n\n\n","category":"type"},{"location":"zz_coordinates/#moment_kinetics.coordinates.define_coordinate","page":"coordinates","title":"moment_kinetics.coordinates.define_coordinate","text":"define_coordinate(input_dict, name; parallel_io::Bool=false,\n run_directory=nothing, ignore_MPI=false,\n collision_operator_dim::Bool=true)\ndefine_coordinate(coord_input::NamedTuple; parallel_io::Bool=false,\n run_directory=nothing, ignore_MPI=false,\n collision_operator_dim::Bool=true, irank=0, nrank=1,\n comm=MPI.COMM_NULL)\n\nCreate arrays associated with a given coordinate, setup the coordinate grid, and populate the coordinate structure containing all of this information.\n\nWhen input_dict is passed, any missing settings will be set with default values.\n\nWhen coord_input is passed, it should be a NamedTuple as generated by get_coordinate_input, which contains a field for every coordinate input option.\n\n\n\n\n\n","category":"function"},{"location":"zz_coordinates/#moment_kinetics.coordinates.define_test_coordinate","page":"coordinates","title":"moment_kinetics.coordinates.define_test_coordinate","text":"define_test_coordinate(input_dict::AbstractDict; kwargs...)\ndefine_test_coordinate(name; collision_operator_dim=true, kwargs...)\n\nWrapper for define_coordinate() to make creating a coordinate for tests slightly less verbose.\n\nWhen passing input_dict, it must contain a \"name\" field, and can contain other settings\n\n\"ngrid\", \"nelement\", etc. Options other than \"name\" will be set using defaults if they\n\nare not passed. kwargs are the keyword arguments for define_coordinate.\n\nThe 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.\n\n\n\n\n\n","category":"function"},{"location":"zz_coordinates/#moment_kinetics.coordinates.elemental_to_full_grid_map-Tuple{Any, Any}","page":"coordinates","title":"moment_kinetics.coordinates.elemental_to_full_grid_map","text":"returns imin and imax, which contain the minimum and maximum indices on the full grid for each element\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#moment_kinetics.coordinates.equally_spaced_grid-NTuple{4, Any}","page":"coordinates","title":"moment_kinetics.coordinates.equally_spaced_grid","text":"setup an equally spaced grid with n_global grid points between [-L/2,L/2]\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#moment_kinetics.coordinates.equally_spaced_grid_shifted-NTuple{4, Any}","page":"coordinates","title":"moment_kinetics.coordinates.equally_spaced_grid_shifted","text":"setup an equally spaced grid with n_global grid points between [0,L]\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#moment_kinetics.coordinates.full_to_elemental_grid_map-Tuple{Any, Any, Any}","page":"coordinates","title":"moment_kinetics.coordinates.full_to_elemental_grid_map","text":"setup arrays containing a map from the unpacked grid point indices to the element index and the grid point index within each element\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#moment_kinetics.coordinates.get_coordinate_input-Tuple{Any, Any}","page":"coordinates","title":"moment_kinetics.coordinates.get_coordinate_input","text":"get_coordinate_input(input_dict, name)\n\nRead the input for coordinate name from input_dict, setting defaults, etc.\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#moment_kinetics.coordinates.grid_spacing-Tuple{Any, Any}","page":"coordinates","title":"moment_kinetics.coordinates.grid_spacing","text":"given a set of grid point locations calculate and return the length associated with the cell between adjacent grid points\n\n\n\n\n\n","category":"method"},{"location":"zz_coordinates/#moment_kinetics.coordinates.init_grid-NTuple{13, Any}","page":"coordinates","title":"moment_kinetics.coordinates.init_grid","text":"setup a grid with n_global grid points on the interval [-L/2,L/2]\n\n\n\n\n\n","category":"method"},{"location":"zz_type_definitions/#type_definitions","page":"type_definitions","title":"type_definitions","text":"","category":"section"},{"location":"zz_type_definitions/","page":"type_definitions","title":"type_definitions","text":"Modules = [moment_kinetics.type_definitions]","category":"page"},{"location":"zz_type_definitions/#moment_kinetics.type_definitions","page":"type_definitions","title":"moment_kinetics.type_definitions","text":"\n\n\n\n","category":"module"},{"location":"zz_type_definitions/#moment_kinetics.type_definitions.OptionsDict","page":"type_definitions","title":"moment_kinetics.type_definitions.OptionsDict","text":"\n\n\n\n","category":"type"},{"location":"zz_type_definitions/#moment_kinetics.type_definitions.mk_float","page":"type_definitions","title":"moment_kinetics.type_definitions.mk_float","text":"\n\n\n\n","category":"type"},{"location":"zz_type_definitions/#moment_kinetics.type_definitions.mk_int","page":"type_definitions","title":"moment_kinetics.type_definitions.mk_int","text":"\n\n\n\n","category":"type"},{"location":"zz_communication/#communication","page":"communication","title":"communication","text":"","category":"section"},{"location":"zz_communication/","page":"communication","title":"communication","text":"Modules = [moment_kinetics.communication]","category":"page"},{"location":"zz_communication/#moment_kinetics.communication","page":"communication","title":"moment_kinetics.communication","text":"Communication functions and setup\n\nSplit the grid into 'blocks'. Each block can use shared memory (MPI shared memory arrays). At the moment only works with a single 'block' containing the whole grid - eventually add more MPI communication functions to communicate between blocks. A block should probably be a 'NUMA region' for maximum efficiency.\n\nNote: charge-exchange collisions loop over neutral species for each ion species. At the moment this loop is not parallelised (although it could be, by introducing some more loop ranges), as at the moment we only run with 1 ion species and 1 neutral species.\n\n\n\n\n\n","category":"module"},{"location":"zz_communication/#moment_kinetics.communication.anyv_isubblock_index","page":"communication","title":"moment_kinetics.communication.anyv_isubblock_index","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.anyv_nsubblocks_per_block","page":"communication","title":"moment_kinetics.communication.anyv_nsubblocks_per_block","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.anyv_subblock_rank","page":"communication","title":"moment_kinetics.communication.anyv_subblock_rank","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.anyv_subblock_size","page":"communication","title":"moment_kinetics.communication.anyv_subblock_size","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.block_rank","page":"communication","title":"moment_kinetics.communication.block_rank","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.block_size","page":"communication","title":"moment_kinetics.communication.block_size","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.comm_anyv_subblock","page":"communication","title":"moment_kinetics.communication.comm_anyv_subblock","text":"Communicator for the local velocity-space subset of a shared-memory block in a 'anyv' region\n\nThe 'anyv' region is used to parallelise the collision operator. See moment_kinetics.looping.get_best_anyv_split.\n\nMust use a Ref{MPI.Comm} to allow a non-const MPI.Comm to be stored. Need to actually assign to this and not just copy a pointer into the .val member because otherwise the MPI.Comm object created by MPI.Comm_split() would be deleted, which probably makes MPI.jl delete the communicator.\n\n\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.comm_block","page":"communication","title":"moment_kinetics.communication.comm_block","text":"Communicator connecting a shared-memory region\n\nMust use a Ref{MPI.Comm} to allow a non-const MPI.Comm to be stored. Need to actually assign to this and not just copy a pointer into the .val member because otherwise the MPI.Comm object created by MPI.Comm_split() would be deleted, which probably makes MPI.jl delete the communicator.\n\n\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.comm_inter_block","page":"communication","title":"moment_kinetics.communication.comm_inter_block","text":"Communicator connecting the root processes of each shared memory block\n\nMust use a Ref{MPI.Comm} to allow a non-const MPI.Comm to be stored. Need to actually assign to this and not just copy a pointer into the .val member because otherwise the MPI.Comm object created by MPI.Comm_split() would be deleted, which probably makes MPI.jl delete the communicator.\n\n\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.comm_world","page":"communication","title":"moment_kinetics.communication.comm_world","text":"Can use a const MPI.Comm for comm_world and just copy the pointer from MPI.COMM_WORLD because MPI.COMM_WORLD is never deleted, so pointer stays valid.\n\n\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.global_Win_store","page":"communication","title":"moment_kinetics.communication.global_Win_store","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.global_rank","page":"communication","title":"moment_kinetics.communication.global_rank","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.global_size","page":"communication","title":"moment_kinetics.communication.global_size","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.iblock_index","page":"communication","title":"moment_kinetics.communication.iblock_index","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.n_blocks","page":"communication","title":"moment_kinetics.communication.n_blocks","text":"\n\n\n\n","category":"constant"},{"location":"zz_communication/#moment_kinetics.communication.MPISharedArray","page":"communication","title":"moment_kinetics.communication.MPISharedArray","text":"Type used to declare a shared-memory array. When debugging is not active MPISharedArray is just an alias for Array, but when @debug_shared_array is activated, it is instead defined as an alias for DebugMPISharedArray.\n\n\n\n\n\n","category":"type"},{"location":"zz_communication/#moment_kinetics.communication.__init__-Tuple{}","page":"communication","title":"moment_kinetics.communication.__init__","text":"\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication._anyv_subblock_synchronize-Tuple{}","page":"communication","title":"moment_kinetics.communication._anyv_subblock_synchronize","text":"Call an MPI Barrier for all processors in an 'anyv' sub-block.\n\nThe 'anyv' region is used to parallelise the collision operator. See moment_kinetics.looping.get_best_anyv_split.\n\nUsed to synchronise processors that are working on the same shared-memory array(s) between operations, to avoid race conditions. Should be even cheaper than _block_synchronize because it only requires communication on a smaller communicator.\n\nNote: _anyv_subblock_synchronize() may be called different numbers of times on different sub-blocks, depending on how the species and spatial dimensions are split up. @debug_detect_redundant_block_synchronize is not implemented (yet?) for _anyv_subblock_synchronize().\n\n\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication._block_synchronize-Tuple{}","page":"communication","title":"moment_kinetics.communication._block_synchronize","text":"Call an MPI Barrier for all processors in a block.\n\nUsed to synchronise processors that are working on the same shared-memory array(s) between operations, to avoid race conditions. Should be (much) cheaper than a global MPI Barrier because it only requires communication within a single node.\n\nNote: some debugging code currently assumes that if blocksynchronize() is called on one block, it is called simultaneously on all blocks. It seems likely that this will always be true, but if it ever changes (i.e. different blocks doing totally different work), the debugging routines need to be updated.\n\n\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication.allocate_shared-Tuple{Any, Any}","page":"communication","title":"moment_kinetics.communication.allocate_shared","text":"Get a shared-memory array of mk_float (shared by all processes in a 'block')\n\nCreate a shared-memory array using MPI.Win_allocate_shared(). Pointer to the memory allocated is wrapped in a Julia array. Memory is not managed by the Julia array though. A reference to the MPI.Win needs to be freed - this is done by saving the MPI.Win into a Vector in the Communication module, which has all its entries freed by the finalize_comms!() function, which should be called when moment_kinetics is done running a simulation/test.\n\nArguments\n\ndims - mkint or Tuple{mkint} Dimensions of the array to be created. Dimensions passed define the size of the array which is being handled by the 'block' (rather than the global array, or a subset for a single process). comm - MPI.Comm, default comm_block[] MPI communicator containing the processes that share the array. maybe_debug - Bool Can be set to false to force not creating a DebugMPISharedArray when debugging is active. This avoids recursion when including a shared-memory array as a member of a DebugMPISharedArray for debugging purposes.\n\nReturns\n\nArray{mk_float}\n\n\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication.finalize_comms!-Tuple{}","page":"communication","title":"moment_kinetics.communication.finalize_comms!","text":"Clean up from communications\n\nDo any needed clean-up for MPI, etc. Does not call MPI.Finalize() - this is called anyway when Julia exits, and we do not want to call it explicitly so that multiple runs can be done in a single Julia session.\n\nFrees any shared-memory arrays.\n\n\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication.free_shared_arrays-Tuple{}","page":"communication","title":"moment_kinetics.communication.free_shared_arrays","text":"\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication.initialize_comms!-Tuple{}","page":"communication","title":"moment_kinetics.communication.initialize_comms!","text":"Set up communications\n\nCheck that global variables are in the correct state (i.e. caches were emptied correctly if they were used before).\n\nAlso does some set up for debugging routines, if they are active.\n\n\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication.setup_distributed_memory_MPI-NTuple{4, Any}","page":"communication","title":"moment_kinetics.communication.setup_distributed_memory_MPI","text":"Function to take information from user about r z grids and number of processes allocated to set up communicators notation definitions: - block: group of processes that share data with shared memory - z group: group of processes that need to communicate data for z derivatives - r group: group of processes that need to communicate data for r derivatives This routine assumes that the number of processes is selected by the user to match exactly the number the ratio \n\nnblocks = (rnelementglobal/rnelementlocal)*(znelementglobal/znelementlocal)\n\nThis guarantees perfect load balancing. Shared memory is used to parallelise the other dimensions within each distributed-memory parallelised rz block. \n\n\n\n\n\n","category":"method"},{"location":"zz_communication/#moment_kinetics.communication.setup_distributed_memory_MPI_for_weights_precomputation-NTuple{5, Any}","page":"communication","title":"moment_kinetics.communication.setup_distributed_memory_MPI_for_weights_precomputation","text":"Function to take information from user about vpa vperp grids and number of processes allocated to set up communicators for precomputation of the Rosenbluth potential integration weights notation definitions: - block: group of processes that share data with shared memory - vpa group: group of processes that need to communicate data for vpa derivatives/integrals - vperp group: group of processes that need to communicate data for vperp derivatives/integrals This routine assumes that the number of processes is selected by the user to match or be larger than the ratio \n\nnblocks = (vpanelementglobal/vpanelementlocal)*(vperpnelementglobal/vperpnelementlocal)\n\nWe also need to know (from user input) the maximum number of cores per shared memory region. A fraction of the cores will not contribute to the calculation, as we cannot guarantee that the same number of cores is required for the rz parallelisation as the vpa vperp parallelisation \n\n\n\n\n\n","category":"method"},{"location":"geometry/#Magnetic-Geometry","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"","category":"section"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"We take the magnetic field mathbfB to have the form ","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"beginequation\nmathbfB = B_z hatmathbfz + B_zeta hatmathbfzeta\nendequation","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"with B_zeta = B(rz) b_zeta, B_z = B(rz) b_z and b_z and b_zeta the direction cosines of the magnetic field vector. Here the basis vectors are those of cylindrical geometry (rzzeta), i.e., hatmathbfr = nabla r hatmathbfz = nabla z, and hatmathbfzeta = r nabla zeta. The unit vectors hatmathbfr, hatmathbfz, and hatmathbfzeta form a right-handed orthonormal basis.","category":"page"},{"location":"geometry/#Supported-options","page":"Magnetic Geometry","title":"Supported options","text":"","category":"section"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"To choose the type of geometry, set the value of \"option\" in the geometry namelist. The namelist will have the following appearance in the TOML file.","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"[geometry]\noption=\"constant-helical\" # ( or \"1D-mirror\" )\npitch = 1.0\nrhostar = 1.0\nDeltaB = 0.0","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"If rhostar is not set then it is computed from reference parameters.","category":"page"},{"location":"geometry/#[geometry]-option-\"constant-helical\"","page":"Magnetic Geometry","title":"[geometry] option = \"constant-helical\"","text":"","category":"section"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"Here b_zeta = sqrt1 - b_z^2 is a constant, b_z is a constant input parameter (\"pitch\") and B is taken to be 1 with respect to the reference value B_rm ref.","category":"page"},{"location":"geometry/#[geometry]-option-\"1D-mirror\"","page":"Magnetic Geometry","title":"[geometry] option = \"1D-mirror\"","text":"","category":"section"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"Here b_zeta = sqrt1 - b_z^2 is a constant, b_z is a constant input parameter (\"pitch\") and B = B(z) is taken to be the function ","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"beginequation\nfracB(z)B_rm ref = \n 1 + Delta B left( 2left(frac2zL_zright)^2 - left(frac2zL_zright)^4right)\nendequation","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"where Delta B is an input parameter (DeltaB) that must satisfy Delta B -1. Recalling that the coordinate z runs from z = -L_z2 to L_z2, if Delta B 0 than the field represents a magnetic mirror which traps particles, whereas if Delta B 0 then the magnetic field accelerates particles by the mirror force as they approach the wall. Note that this field does not satisfy nabla cdot mathbfB = 0, and is only used to test the implementation of the magnetic mirror terms. 2D simulations with a radial domain andmathbfEtimesmathbfB drifts are supported in the \"1D-mirror\" geometry option.","category":"page"},{"location":"geometry/#Geometric-coefficients","page":"Magnetic Geometry","title":"Geometric coefficients","text":"","category":"section"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"Here, we write the geometric coefficients appearing in the characteristic equations explicitly.","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"The z component of the mathbfEtimesmathbfB drift is given by","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"beginequation fracmathbfEtimesmathbfBB^2 cdot nabla z = fracE_r B_zetaB^2 nabla r times hatmathbfzeta cdot nabla z \n= - J fracE_r B_zetaB^2\nendequation","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"where we have defined J = r nabla r times nabla z cdot nabla zeta. Note that J is dimensionless. The r component of the mathbfEtimesmathbfB drift is given by","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"beginequation fracmathbfEtimesmathbfBB^2 cdot nabla r = fracE_z B_zetaB^2 nabla z times hatmathbfzeta cdot nabla r \n= J fracE_z B_zetaB^2\nendequation","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"Due to the axisymmetry of the system, the differential operator mathbfb cdot nabla (cdot) = b_z partial (cdot)partial z, and the convective derivative","category":"page"},{"location":"geometry/","page":"Magnetic Geometry","title":"Magnetic Geometry","text":"beginequation\nfracd Bd t = fracd zd t fracpartial B partial z + fracdrdtfracpartial Bpartial r\nendequation","category":"page"},{"location":"zz_looping/#looping","page":"looping","title":"looping","text":"","category":"section"},{"location":"zz_looping/","page":"looping","title":"looping","text":"Modules = [moment_kinetics.looping]","category":"page"},{"location":"zz_looping/#moment_kinetics.looping","page":"looping","title":"moment_kinetics.looping","text":"Provides convenience macros for shared-memory-parallel loops\n\n\n\n\n\n","category":"module"},{"location":"zz_looping/#moment_kinetics.looping.loop_ranges","page":"looping","title":"moment_kinetics.looping.loop_ranges","text":"module variable that we can access by giving fully-qualified name in loop macros\n\n\n\n\n\n","category":"constant"},{"location":"zz_looping/#moment_kinetics.looping.loop_ranges_store","page":"looping","title":"moment_kinetics.looping.loop_ranges_store","text":"module variable used to store LoopRanges that are swapped into the loopranges variable in begin*_region() functions\n\n\n\n\n\n","category":"constant"},{"location":"zz_looping/#moment_kinetics.looping.LoopRanges","page":"looping","title":"moment_kinetics.looping.LoopRanges","text":"LoopRanges structs contain information on which points should be included on this process in loops over shared-memory arrays.\n\nMembers\n\nparalleldims::Tuple{Vararg{Symbol}} Indicates which dimensions are (or might be) parallelized when using this LoopRanges. Provided for information for developers, to make it easier to tell (when using a Debugger, or printing debug informatino) which LoopRanges instance is active in looping.loopranges at any point in the code. rank0::Bool Is this process the one with rank 0 in the 'block' which work in parallel on shared memory arrays. ::UnitRange{mkint} Loop ranges for each dimension in looping.alldimensions.\n\n\n\n\n\n","category":"type"},{"location":"zz_looping/#moment_kinetics.looping.begin_anyv_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_anyv_region","text":"Begin 'anyv' sub-region in which () velocity space dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_anyv_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_anyv_vpa_region","text":"Begin 'anyv' sub-region in which (:vpa,) velocity space dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_anyv_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_anyv_vperp_region","text":"Begin 'anyv' sub-region in which (:vperp,) velocity space dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_anyv_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_anyv_vperp_vpa_region","text":"Begin 'anyv' sub-region in which (:vperp, :vpa) velocity space dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_region","text":"Begin region in which (:r,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vpa_region","text":"Begin region in which (:r, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vperp_region","text":"Begin region in which (:r, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vperp_vpa_region","text":"Begin region in which (:r, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vr_region","text":"Begin region in which (:r, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vr_vz_region","text":"Begin region in which (:r, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vz_region","text":"Begin region in which (:r, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vzeta_region","text":"Begin region in which (:r, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vzeta_vr_region","text":"Begin region in which (:r, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vzeta_vr_vz_region","text":"Begin region in which (:r, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_vzeta_vz_region","text":"Begin region in which (:r, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_region","text":"Begin region in which (:r, :z) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vpa_region","text":"Begin region in which (:r, :z, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vperp_region","text":"Begin region in which (:r, :z, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vperp_vpa_region","text":"Begin region in which (:r, :z, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vr_region","text":"Begin region in which (:r, :z, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vr_vz_region","text":"Begin region in which (:r, :z, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vz_region","text":"Begin region in which (:r, :z, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vzeta_region","text":"Begin region in which (:r, :z, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vzeta_vr_region","text":"Begin region in which (:r, :z, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vzeta_vr_vz_region","text":"Begin region in which (:r, :z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_r_z_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_r_z_vzeta_vz_region","text":"Begin region in which (:r, :z, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_region","text":"Begin region in which (:s, :r) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_vpa_region","text":"Begin region in which (:s, :r, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_vperp_region","text":"Begin region in which (:s, :r, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_vperp_vpa_region","text":"Begin region in which (:s, :r, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_z_anyv_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_z_anyv_region","text":"Begin region in which (:s,:r,:z) dimensions and velocity dimensions are parallelized by being split between processes, and which velocity dimensions are parallelized can be switched within the outer loop over (:s,:r,:z). This parallelization scheme is intended for use in the collision operator.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_z_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_z_region","text":"Begin region in which (:s, :r, :z) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_z_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_z_vpa_region","text":"Begin region in which (:s, :r, :z, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_z_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_z_vperp_region","text":"Begin region in which (:s, :r, :z, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_r_z_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_r_z_vperp_vpa_region","text":"Begin region in which (:s, :r, :z, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_region","text":"Begin region in which (:s,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_vpa_region","text":"Begin region in which (:s, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_vperp_region","text":"Begin region in which (:s, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_vperp_vpa_region","text":"Begin region in which (:s, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_z_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_z_region","text":"Begin region in which (:s, :z) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_z_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_z_vpa_region","text":"Begin region in which (:s, :z, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_z_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_z_vperp_region","text":"Begin region in which (:s, :z, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_s_z_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_s_z_vperp_vpa_region","text":"Begin region in which (:s, :z, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_serial_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_serial_region","text":"Begin region in which only rank-0 in each group of processes operating on a shared-memory block operates on shared-memory arrays.\n\nReturns immediately if loopranges[] is already set for a serial region. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_region","text":"Begin region in which (:sn, :r) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vr_region","text":"Begin region in which (:sn, :r, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vr_vz_region","text":"Begin region in which (:sn, :r, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vz_region","text":"Begin region in which (:sn, :r, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vzeta_region","text":"Begin region in which (:sn, :r, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vzeta_vr_region","text":"Begin region in which (:sn, :r, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vzeta_vr_vz_region","text":"Begin region in which (:sn, :r, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_vzeta_vz_region","text":"Begin region in which (:sn, :r, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_region","text":"Begin region in which (:sn, :r, :z) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vr_region","text":"Begin region in which (:sn, :r, :z, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vr_vz_region","text":"Begin region in which (:sn, :r, :z, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vz_region","text":"Begin region in which (:sn, :r, :z, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vzeta_region","text":"Begin region in which (:sn, :r, :z, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vzeta_vr_region","text":"Begin region in which (:sn, :r, :z, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vzeta_vr_vz_region","text":"Begin region in which (:sn, :r, :z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_r_z_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_r_z_vzeta_vz_region","text":"Begin region in which (:sn, :r, :z, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_region","text":"Begin region in which (:sn,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vr_region","text":"Begin region in which (:sn, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vr_vz_region","text":"Begin region in which (:sn, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vz_region","text":"Begin region in which (:sn, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vzeta_region","text":"Begin region in which (:sn, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vzeta_vr_region","text":"Begin region in which (:sn, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vzeta_vr_vz_region","text":"Begin region in which (:sn, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_vzeta_vz_region","text":"Begin region in which (:sn, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_region","text":"Begin region in which (:sn, :z) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vr_region","text":"Begin region in which (:sn, :z, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vr_vz_region","text":"Begin region in which (:sn, :z, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vz_region","text":"Begin region in which (:sn, :z, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vzeta_region","text":"Begin region in which (:sn, :z, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vzeta_vr_region","text":"Begin region in which (:sn, :z, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vzeta_vr_vz_region","text":"Begin region in which (:sn, :z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_sn_z_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_sn_z_vzeta_vz_region","text":"Begin region in which (:sn, :z, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vpa_region","text":"Begin region in which (:vpa,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vperp_region","text":"Begin region in which (:vperp,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vperp_vpa_region","text":"Begin region in which (:vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vr_region","text":"Begin region in which (:vr,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vr_vz_region","text":"Begin region in which (:vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vz_region","text":"Begin region in which (:vz,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vzeta_region","text":"Begin region in which (:vzeta,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vzeta_vr_region","text":"Begin region in which (:vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vzeta_vr_vz_region","text":"Begin region in which (:vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_vzeta_vz_region","text":"Begin region in which (:vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_region","text":"Begin region in which (:z,) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vpa_region","text":"Begin region in which (:z, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vperp_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vperp_region","text":"Begin region in which (:z, :vperp) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vperp_vpa_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vperp_vpa_region","text":"Begin region in which (:z, :vperp, :vpa) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vr_region","text":"Begin region in which (:z, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vr_vz_region","text":"Begin region in which (:z, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vz_region","text":"Begin region in which (:z, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vzeta_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vzeta_region","text":"Begin region in which (:z, :vzeta) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vzeta_vr_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vzeta_vr_region","text":"Begin region in which (:z, :vzeta, :vr) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vzeta_vr_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vzeta_vr_vz_region","text":"Begin region in which (:z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.begin_z_vzeta_vz_region-Tuple{}","page":"looping","title":"moment_kinetics.looping.begin_z_vzeta_vz_region","text":"Begin region in which (:z, :vzeta, :vz) dimensions are parallelized by being split between processes.\n\nReturns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).\n\nCalls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.debug_setup_loop_ranges_split_one_combination!-Tuple{Any, Any, Tuple{Vararg{Symbol, N}} where N, Vararg{Symbol}}","page":"looping","title":"moment_kinetics.looping.debug_setup_loop_ranges_split_one_combination!","text":"For debugging the shared-memory parallelism, create ranges where only the loops for a single combinations of variables (given by combination_to_split) are parallelised, and which dimensions are parallelised can be set with the dims_to_split... arguments.\n\nArguments\n\nKeyword arguments dim=n are required for each dim in all_dimensions where n is an integer giving the size of the dimension.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.dims_string-Tuple{Tuple}","page":"looping","title":"moment_kinetics.looping.dims_string","text":"Construct a string composed of the dimension names given in the Tuple dims, separated by underscores\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_anyv_ranges-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.get_anyv_ranges","text":"\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_best_anyv_split-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.get_best_anyv_split","text":"Find the numbers of processes for each dimension that optimize load balance for 'anyv' type loops for a certain block_size.\n\nThe 'anyv' parallelisation patterns are designed for use in the collision operator. They all share the same parallelisation in species and spatial dimensions so that the region type can be switched between 'anyv' types within a loop over species and spatial dimensions (@loopsr_z). It is only defined for ions, not for neutrals.\n\nParts of the collision operator cannot conveniently be parallelised over velocity dimensions, so this function aims to assign as much parallelism as possible to the species and spatial dimensions.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_best_ranges-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.get_best_ranges","text":"Find the ranges for loop variables that optimize load balance for a certain block_size\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_local_range-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.get_local_range","text":"Get local range of indices when splitting a loop over processes in a sub-block\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_max_work-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.get_max_work","text":"Calculate the maximum number of grid points on any process\n\nThis is a measure of the maximum amount of work to do on a single process. Minimising this will make the parallelisation as efficient as possible.\n\nArguments\n\nnprocslist : Vector{mkint} Number of processes for each dimension sizes : Vector{mk_int} Size of each dimension\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_ranges_from_split-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.get_ranges_from_split","text":"\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_splits-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.get_splits","text":"Find possible divisions of each number less than or equal to block_size into n factors.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_splits_and_max_work_from_sizes-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.get_splits_and_max_work_from_sizes","text":"\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.get_subblock_splits-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.get_subblock_splits","text":"Find possible divisions of subblocksize into n factors\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.setup_loop_ranges!-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.setup_loop_ranges!","text":"Create ranges for loops with different combinations of variables\n\nArguments\n\nKeyword arguments dim=n are required for each dim in [:s, :r, :z, :vperp, :vpa, :sn, :vzeta, :vr, :vz] where n is an integer giving the size of the dimension.\n\n\n\n\n\n","category":"method"},{"location":"zz_looping/#moment_kinetics.looping.@anyv_serial_region-Tuple{Any}","page":"looping","title":"moment_kinetics.looping.@anyv_serial_region","text":"Run a block of code on only anyv-subblock-rank-0 of each group of processes operating on an 'anyv' shared-memory subblock\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r","text":"Loop over (:r,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vpa-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vpa","text":"Loop over (:r, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vperp-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vperp","text":"Loop over (:r, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vperp_vpa-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vperp_vpa","text":"Loop over (:r, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vr-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vr","text":"Loop over (:r, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vr_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vr_vz","text":"Loop over (:r, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vz-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vz","text":"Loop over (:r, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vzeta-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vzeta","text":"Loop over (:r, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vzeta_vr-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vzeta_vr","text":"Loop over (:r, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vzeta_vr_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vzeta_vr_vz","text":"Loop over (:r, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_vzeta_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_vzeta_vz","text":"Loop over (:r, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z","text":"Loop over (:r, :z) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vpa-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vpa","text":"Loop over (:r, :z, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vperp-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vperp","text":"Loop over (:r, :z, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vperp_vpa-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vperp_vpa","text":"Loop over (:r, :z, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vr-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vr","text":"Loop over (:r, :z, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vr_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vr_vz","text":"Loop over (:r, :z, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vz","text":"Loop over (:r, :z, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vzeta-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vzeta","text":"Loop over (:r, :z, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vzeta_vr-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vzeta_vr","text":"Loop over (:r, :z, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vzeta_vr_vz-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vzeta_vr_vz","text":"Loop over (:r, :z, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_r_z_vzeta_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_r_z_vzeta_vz","text":"Loop over (:r, :z, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s","text":"Loop over (:s,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r","text":"Loop over (:s, :r) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_vpa-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_vpa","text":"Loop over (:s, :r, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_vperp-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_vperp","text":"Loop over (:s, :r, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_vperp_vpa-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_vperp_vpa","text":"Loop over (:s, :r, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_z-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_z","text":"Loop over (:s, :r, :z) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_z_vpa-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_z_vpa","text":"Loop over (:s, :r, :z, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_z_vperp-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_z_vperp","text":"Loop over (:s, :r, :z, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_r_z_vperp_vpa-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_r_z_vperp_vpa","text":"Loop over (:s, :r, :z, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_vpa-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_vpa","text":"Loop over (:s, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_vperp-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_vperp","text":"Loop over (:s, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_vperp_vpa-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_vperp_vpa","text":"Loop over (:s, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_z-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_z","text":"Loop over (:s, :z) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_z_vpa-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_z_vpa","text":"Loop over (:s, :z, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_z_vperp-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_z_vperp","text":"Loop over (:s, :z, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_s_z_vperp_vpa-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_s_z_vperp_vpa","text":"Loop over (:s, :z, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn","text":"Loop over (:sn,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r","text":"Loop over (:sn, :r) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vr-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vr","text":"Loop over (:sn, :r, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vr_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vr_vz","text":"Loop over (:sn, :r, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vz","text":"Loop over (:sn, :r, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vzeta-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vzeta","text":"Loop over (:sn, :r, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vzeta_vr-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vzeta_vr","text":"Loop over (:sn, :r, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vzeta_vr_vz-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vzeta_vr_vz","text":"Loop over (:sn, :r, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_vzeta_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_vzeta_vz","text":"Loop over (:sn, :r, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z","text":"Loop over (:sn, :r, :z) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vr-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vr","text":"Loop over (:sn, :r, :z, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vr_vz-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vr_vz","text":"Loop over (:sn, :r, :z, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vz","text":"Loop over (:sn, :r, :z, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vzeta-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vzeta","text":"Loop over (:sn, :r, :z, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vzeta_vr-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vzeta_vr","text":"Loop over (:sn, :r, :z, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vzeta_vr_vz-NTuple{7, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vzeta_vr_vz","text":"Loop over (:sn, :r, :z, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_r_z_vzeta_vz-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_r_z_vzeta_vz","text":"Loop over (:sn, :r, :z, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vr-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vr","text":"Loop over (:sn, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vr_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vr_vz","text":"Loop over (:sn, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vz-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vz","text":"Loop over (:sn, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vzeta-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vzeta","text":"Loop over (:sn, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vzeta_vr-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vzeta_vr","text":"Loop over (:sn, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vzeta_vr_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vzeta_vr_vz","text":"Loop over (:sn, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_vzeta_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_vzeta_vz","text":"Loop over (:sn, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z","text":"Loop over (:sn, :z) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vr-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vr","text":"Loop over (:sn, :z, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vr_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vr_vz","text":"Loop over (:sn, :z, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vz","text":"Loop over (:sn, :z, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vzeta-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vzeta","text":"Loop over (:sn, :z, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vzeta_vr-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vzeta_vr","text":"Loop over (:sn, :z, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vzeta_vr_vz-NTuple{6, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vzeta_vr_vz","text":"Loop over (:sn, :z, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_sn_z_vzeta_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_sn_z_vzeta_vz","text":"Loop over (:sn, :z, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vpa-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vpa","text":"Loop over (:vpa,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vperp-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vperp","text":"Loop over (:vperp,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vperp_vpa-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vperp_vpa","text":"Loop over (:vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vr-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vr","text":"Loop over (:vr,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vr_vz-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vr_vz","text":"Loop over (:vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vz-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vz","text":"Loop over (:vz,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vzeta-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vzeta","text":"Loop over (:vzeta,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vzeta_vr-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vzeta_vr","text":"Loop over (:vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vzeta_vr_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vzeta_vr_vz","text":"Loop over (:vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_vzeta_vz-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_vzeta_vz","text":"Loop over (:vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z-Tuple{Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z","text":"Loop over (:z,) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vpa-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vpa","text":"Loop over (:z, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vperp-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vperp","text":"Loop over (:z, :vperp) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vperp_vpa-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vperp_vpa","text":"Loop over (:z, :vperp, :vpa) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vr-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vr","text":"Loop over (:z, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vr_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vr_vz","text":"Loop over (:z, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vz-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vz","text":"Loop over (:z, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vzeta-Tuple{Any, Any, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vzeta","text":"Loop over (:z, :vzeta) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vzeta_vr-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vzeta_vr","text":"Loop over (:z, :vzeta, :vr) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vzeta_vr_vz-NTuple{5, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vzeta_vr_vz","text":"Loop over (:z, :vzeta, :vr, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@loop_z_vzeta_vz-NTuple{4, Any}","page":"looping","title":"moment_kinetics.looping.@loop_z_vzeta_vz","text":"Loop over (:z, :vzeta, :vz) dimensions\n\n\n\n\n\n","category":"macro"},{"location":"zz_looping/#moment_kinetics.looping.@serial_region-Tuple{Any}","page":"looping","title":"moment_kinetics.looping.@serial_region","text":"Run a block of code on only rank-0 of each group of processes operating on a shared-memory block\n\n\n\n\n\n","category":"macro"},{"location":"zz_geo/#geo","page":"geo","title":"geo","text":"","category":"section"},{"location":"zz_geo/","page":"geo","title":"geo","text":"Modules = [moment_kinetics.geo]","category":"page"},{"location":"zz_geo/#moment_kinetics.geo","page":"geo","title":"moment_kinetics.geo","text":"module for including axisymmetric geometry in coordinates (z,r), with z the vertical coordinate and r the radial coordinate\n\n\n\n\n\n","category":"module"},{"location":"zz_geo/#moment_kinetics.geo.geometric_coefficients","page":"geo","title":"moment_kinetics.geo.geometric_coefficients","text":"struct containing the geometric data necessary for non-trivial axisymmetric geometries, to be passed around the inside of the code, replacing the geometry_input struct from input_structs.jl\n\nThe arrays of 2 dimensions are functions of (z,r)\n\n\n\n\n\n","category":"type"},{"location":"zz_geo/#moment_kinetics.geo.get_default_rhostar-Tuple{Any}","page":"geo","title":"moment_kinetics.geo.get_default_rhostar","text":"function get_default_rhostar(reference_params)\n\nCalculate the normalised ion gyroradius at reference parameters\n\n\n\n\n\n","category":"method"},{"location":"zz_geo/#moment_kinetics.geo.init_magnetic_geometry-Tuple{moment_kinetics.input_structs.geometry_input, Any, Any}","page":"geo","title":"moment_kinetics.geo.init_magnetic_geometry","text":"function to initialise the geometry coefficients inputdata – geometryinput type z – coordinate type r – coordinate type\n\n\n\n\n\n","category":"method"},{"location":"zz_geo/#moment_kinetics.geo.setup_geometry_input-Tuple{Dict}","page":"geo","title":"moment_kinetics.geo.setup_geometry_input","text":"function to read the geometry input data from the TOML file\n\nthe TOML namelist should be structured like\n\n[geometry] pitch = 1.0 rhostar = 1.0 DeltaB = 0.0 option = \"\"\n\n\n\n\n\n","category":"method"},{"location":"zz_bgk/#bgk","page":"bgk","title":"bgk","text":"","category":"section"},{"location":"zz_bgk/","page":"bgk","title":"bgk","text":"Modules = [moment_kinetics.bgk]","category":"page"},{"location":"zz_bgk/#moment_kinetics.bgk","page":"bgk","title":"moment_kinetics.bgk","text":"\n\n\n\n","category":"module"},{"location":"zz_bgk/#moment_kinetics.bgk.allowed_wave_amplitude!-NTuple{5, Any}","page":"bgk","title":"moment_kinetics.bgk.allowed_wave_amplitude!","text":"\n\n\n\n","category":"method"},{"location":"zz_bgk/#moment_kinetics.bgk.init_bgk_pdf!-NTuple{6, Any}","page":"bgk","title":"moment_kinetics.bgk.init_bgk_pdf!","text":"\n\n\n\n","category":"method"},{"location":"zz_bgk/#moment_kinetics.bgk.passing_pdf!-NTuple{5, Any}","page":"bgk","title":"moment_kinetics.bgk.passing_pdf!","text":"inputs\n\npdf is the particle distribution function, with the passing part of phase space not filled in\nphi_max is the maximum value that e * phi / Te takes\ntau = Ti/Te is the ion-electron temperature ratio\nx = mvpa^2/2Te + ephi/Te is 1D array containing the total parallel energy (conserved)\n\noutput\n\npdf = particle distribution function; this function fills in the part of phase space where x > e*phi_max/T\n\n\n\n\n\n","category":"method"},{"location":"zz_bgk/#moment_kinetics.bgk.setup_dummy_integrals-Tuple{}","page":"bgk","title":"moment_kinetics.bgk.setup_dummy_integrals","text":"\n\n\n\n","category":"method"},{"location":"zz_bgk/#moment_kinetics.bgk.total_energy_grid-Tuple{Any, Any}","page":"bgk","title":"moment_kinetics.bgk.total_energy_grid","text":"inputs:\n\nvpa = parallel velocity normalized by vts = sqrt(2*Te/ms)\nphi = electrostatic potential normalized by Te/e\n\noutput: x = vpa^2 + phi is the total parallel energy\n\n\n\n\n\n","category":"method"},{"location":"zz_bgk/#moment_kinetics.bgk.trapped_passing_boundary-Tuple{Any, Any}","page":"bgk","title":"moment_kinetics.bgk.trapped_passing_boundary","text":"\n\n\n\n","category":"method"},{"location":"zz_bgk/#moment_kinetics.bgk.trapped_pdf!-NTuple{8, Any}","page":"bgk","title":"moment_kinetics.bgk.trapped_pdf!","text":"inputs\n\nphi_max is the maximum value that e * phi / Te takes\ntau = Ti/Te is the ion-electron temperature ratio\nx = vpa^2 + e*phi is a 2D array containing the total parallel energy on the (z,vpa) grid\ny = dummy coordinate for the necessary integrals in the function\nintegrand = dummy array used to hold integrands defined and integrated in this function\nwgts = integration weights associated with y integrals\n\noutput\n\npdf is the particle distribution function for all of phase space, with this function filling in only the part with x < e*phi_max/T\n\n\n\n\n\n","category":"method"},{"location":"zz_continuity/#continuity","page":"continuity","title":"continuity","text":"","category":"section"},{"location":"zz_continuity/","page":"continuity","title":"continuity","text":"Modules = [moment_kinetics.continuity]","category":"page"},{"location":"zz_continuity/#moment_kinetics.continuity","page":"continuity","title":"moment_kinetics.continuity","text":"\n\n\n\n","category":"module"},{"location":"zz_continuity/#moment_kinetics.continuity.continuity_equation!-NTuple{9, Any}","page":"continuity","title":"moment_kinetics.continuity.continuity_equation!","text":"use the continuity equation dn/dt + d(n*upar)/dz to update the density n for all ion species\n\n\n\n\n\n","category":"method"},{"location":"zz_continuity/#moment_kinetics.continuity.neutral_continuity_equation!-NTuple{9, Any}","page":"continuity","title":"moment_kinetics.continuity.neutral_continuity_equation!","text":"use the continuity equation dn/dt + d(n*upar)/dz to update the density n for all neutral species\n\n\n\n\n\n","category":"method"},{"location":"zz_debugging/#debugging","page":"debugging","title":"debugging","text":"","category":"section"},{"location":"zz_debugging/","page":"debugging","title":"debugging","text":"Modules = [moment_kinetics.debugging]","category":"page"},{"location":"zz_debugging/#moment_kinetics.debugging","page":"debugging","title":"moment_kinetics.debugging","text":"Define debugging levels that can be used to include extra debugging steps\n\nProvides a bunch of macros (see the macronames Vector) that can be used to surround code in other modules so that it only runs if the 'debug level' passed to the --debug or -d command line argument is high enough.\n\nAlso provides macro *_ifelse whose names are taken from macronames, which can be used to switch definitions, etc. For example, if debug_shared_array is in macronames, then\n\nconst MPISharedArray = @debug_shared_array_ifelse(DebugMPISharedArray, Array)\n\ncan be used to make the type represented by MPISharedArray depend on the debug level.\n\n\n\n\n\n","category":"module"},{"location":"zz_debugging/#moment_kinetics.debugging._debug_level","page":"debugging","title":"moment_kinetics.debugging._debug_level","text":"\n\n\n\n","category":"constant"},{"location":"zz_debugging/#moment_kinetics.debugging.macronames","page":"debugging","title":"moment_kinetics.debugging.macronames","text":"\n\n\n\n","category":"constant"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_block_synchronize-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_block_synchronize","text":"Check blocksynchronize() was called from the same place on every process. Activated at _debug_level >= 4 Currently inactive (_debug_level = 0).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_block_synchronize_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_block_synchronize_ifelse","text":"Evaluate first expression if debugblocksynchronize is active, second expression if not debugblocksynchronize is inactive (_debug_level = 0 < 4).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_detect_redundant_block_synchronize-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_detect_redundant_block_synchronize","text":"Check if any blocksynchronize() call could have been skipped without resulting in an error. Activated at _debug_level >= 5 Currently inactive (_debug_level = 0).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_detect_redundant_block_synchronize_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_detect_redundant_block_synchronize_ifelse","text":"Evaluate first expression if debugdetectredundantblocksynchronize is active, second expression if not debugdetectredundantblocksynchronize is inactive (_debug_level = 0 < 5).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_initialize_NaN-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_initialize_NaN","text":"Initialize arrays with NaN. Activated at _debug_level >= 1 Currently inactive (_debug_level = 0).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_initialize_NaN_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_initialize_NaN_ifelse","text":"Evaluate first expression if debuginitializeNaN is active, second expression if not debuginitializeNaN is inactive (_debug_level = 0 < 1).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_shared_array-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_shared_array","text":"Check for incorrect reads/writes to shared-memory arrays Activated at _debug_level >= 2 Currently inactive (_debug_level = 0).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_shared_array_allocate-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_shared_array_allocate","text":"Check that allocateshared() was called from the same place on every process. Activated at `debuglevel >= 4Currently inactive (debug_level = 0`).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_shared_array_allocate_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_shared_array_allocate_ifelse","text":"Evaluate first expression if debugsharedarrayallocate is active, second expression if not debugsharedarrayallocate is inactive (_debug_level = 0 < 4).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_shared_array_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_shared_array_ifelse","text":"Evaluate first expression if debugsharedarray is active, second expression if not debugsharedarray is inactive (_debug_level = 0 < 2).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_track_array_allocate_location-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_track_array_allocate_location","text":"Record where every array was allocated. Activated at _debug_level >= 3 Currently inactive (_debug_level = 0).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_track_array_allocate_location_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_track_array_allocate_location_ifelse","text":"Evaluate first expression if debugtrackarrayallocatelocation is active, second expression if not debugtrackarrayallocatelocation is inactive (_debug_level = 0 < 3).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_track_initialized-Tuple{Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_track_initialized","text":"Check that every array is initialized before being used. Activated at _debug_level >= 3 Currently inactive (_debug_level = 0).\n\n\n\n\n\n","category":"macro"},{"location":"zz_debugging/#moment_kinetics.debugging.@debug_track_initialized_ifelse-Tuple{Any, Any}","page":"debugging","title":"moment_kinetics.debugging.@debug_track_initialized_ifelse","text":"Evaluate first expression if debugtrackinitialized is active, second expression if not debugtrackinitialized is inactive (_debug_level = 0 < 3).\n\n\n\n\n\n","category":"macro"},{"location":"zz_time_advance/#time_advance","page":"time_advance","title":"time_advance","text":"","category":"section"},{"location":"zz_time_advance/","page":"time_advance","title":"time_advance","text":"Modules = [moment_kinetics.time_advance]","category":"page"},{"location":"zz_time_advance/#moment_kinetics.time_advance","page":"time_advance","title":"moment_kinetics.time_advance","text":"\n\n\n\n","category":"module"},{"location":"zz_time_advance/#moment_kinetics.time_advance.adaptive_timestep_update!-NTuple{27, Any}","page":"time_advance","title":"moment_kinetics.time_advance.adaptive_timestep_update!","text":"adaptive_timestep_update!(scratch, scratch_implicit, scratch_electron,\n t_params, moments, fields,\n composition, collisions, geometry,\n external_source_settings, spectral_objects,\n advect_objects, gyroavs, num_diss_params, advance,\n scratch_dummy, r, z, vperp, vpa, vzeta, vr, vz,\n success, nl_max_its_fraction)\n\nCheck the error estimate for the embedded RK method and adjust the timestep if appropriate.\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.apply_all_bcs_constraints_update_moments!-NTuple{25, Any}","page":"time_advance","title":"moment_kinetics.time_advance.apply_all_bcs_constraints_update_moments!","text":"Apply boundary conditions and moment constraints to updated pdfs and calculate derived moments and moment derivatives\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.euler_time_advance!-NTuple{27, Any}","page":"time_advance","title":"moment_kinetics.time_advance.euler_time_advance!","text":"eulertimeadvance! advances the vector equation dfvec/dt = G[f] that includes the kinetic equation + any evolved moment equations using the forward Euler method: fvecout = fvecin + dt*fvecin, with fvecin an input and fvec_out the output\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.implicit_ion_advance!-NTuple{29, Any}","page":"time_advance","title":"moment_kinetics.time_advance.implicit_ion_advance!","text":"implicit_ion_advance!(fvec_out, fvec_in, pdf, fields, moments, advect_objects,\n vz, vr, vzeta, vpa, vperp, gyrophase, z, r, t, dt,\n spectral_objects, composition, collisions, geometry,\n scratch_dummy, manufactured_source_list,\n external_source_settings, num_diss_params,\n nl_solver_params, advance, fp_arrays, istage)\n\nDo a backward-Euler timestep for all terms in the ion kinetic equation.\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.normalize_pdf!-Tuple{Any, Any, Any}","page":"time_advance","title":"moment_kinetics.time_advance.normalize_pdf!","text":"if evolving the density via continuity equation, redefine the normalised f → f/n if evolving the parallel pressure via energy equation, redefine f -> f * vth / n 'scratch' should be a (nz,nspecies) array\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.rk_update!-NTuple{6, Any}","page":"time_advance","title":"moment_kinetics.time_advance.rk_update!","text":"Use the result of the forward-Euler timestep and the previous Runge-Kutta stages to compute the updated pdfs, and any evolved moments.\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.setup_advance_flags-NTuple{14, Any}","page":"time_advance","title":"moment_kinetics.time_advance.setup_advance_flags","text":"create the 'advance_info' struct to be used in later Euler advance to indicate which parts of the equations are to be advanced concurrently. if no splitting of operators, all terms advanced concurrently; else, will advance one term at a time.\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.setup_implicit_advance_flags-NTuple{14, Any}","page":"time_advance","title":"moment_kinetics.time_advance.setup_implicit_advance_flags","text":"create the 'advanceinfo' struct to be used in the time advance to indicate which parts of the equations are to be advanced implicitly (using `backwardeuler!()`).\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.setup_scratch_arrays-Tuple{Any, Any, Any}","page":"time_advance","title":"moment_kinetics.time_advance.setup_scratch_arrays","text":"create an array of structs containing scratch arrays for the normalised pdf and low-order moments that may be evolved separately via fluid equations\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.setup_time_advance!-NTuple{37, Any}","page":"time_advance","title":"moment_kinetics.time_advance.setup_time_advance!","text":"create arrays and do other work needed to setup the main time advance loop. this includes creating and populating structs for Chebyshev transforms, velocity space moments, EM fields, and advection terms\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.setup_time_info-NTuple{9, Any}","page":"time_advance","title":"moment_kinetics.time_advance.setup_time_info","text":"setup_time_info(t_input; electrons=nothing)\n\nCreate a input_structs.time_info struct using the settings in t_input.\n\nIf something is passed in electron, it is stored in the electron_t_params member of the returned time_info.\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.ssp_rk!-NTuple{32, Any}","page":"time_advance","title":"moment_kinetics.time_advance.ssp_rk!","text":"\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.time_advance!-NTuple{33, Any}","page":"time_advance","title":"moment_kinetics.time_advance.time_advance!","text":"solve ∂f/∂t + v(z,t)⋅∂f/∂z + dvpa/dt ⋅ ∂f/∂vpa= 0 define approximate characteristic velocity v₀(z)=vⁿ(z) and take time derivative along this characteristic df/dt + δv⋅∂f/∂z = 0, with δv(z,t)=v(z,t)-v₀(z) for prudent choice of v₀, expect δv≪v so that explicit time integrator can be used without severe CFL condition\n\n\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.time_advance_no_splitting!-NTuple{32, Any}","page":"time_advance","title":"moment_kinetics.time_advance.time_advance_no_splitting!","text":"\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.time_advance_split_operators!-NTuple{21, Any}","page":"time_advance","title":"moment_kinetics.time_advance.time_advance_split_operators!","text":"\n\n\n\n","category":"method"},{"location":"zz_time_advance/#moment_kinetics.time_advance.update_solution_vector!-NTuple{8, Any}","page":"time_advance","title":"moment_kinetics.time_advance.update_solution_vector!","text":"update the vector containing the pdf and any evolved moments of the pdf for use in the Runge-Kutta time advance\n\n\n\n\n\n","category":"method"},{"location":"zz_energy_equation/#energy_equation","page":"energy_equation","title":"energy_equation","text":"","category":"section"},{"location":"zz_energy_equation/","page":"energy_equation","title":"energy_equation","text":"Modules = [moment_kinetics.energy_equation]","category":"page"},{"location":"zz_energy_equation/#moment_kinetics.energy_equation","page":"energy_equation","title":"moment_kinetics.energy_equation","text":"\n\n\n\n","category":"module"},{"location":"zz_energy_equation/#moment_kinetics.energy_equation.energy_equation!-NTuple{9, Any}","page":"energy_equation","title":"moment_kinetics.energy_equation.energy_equation!","text":"evolve the parallel pressure by solving the energy equation\n\n\n\n\n\n","category":"method"},{"location":"zz_energy_equation/#moment_kinetics.energy_equation.neutral_energy_equation!-NTuple{9, Any}","page":"energy_equation","title":"moment_kinetics.energy_equation.neutral_energy_equation!","text":"evolve the neutral parallel pressure by solving the energy equation\n\n\n\n\n\n","category":"method"},{"location":"zz_charge_exchange/#charge_exchange","page":"charge_exchange","title":"charge_exchange","text":"","category":"section"},{"location":"zz_charge_exchange/","page":"charge_exchange","title":"charge_exchange","text":"Modules = [moment_kinetics.charge_exchange]","category":"page"},{"location":"zz_charge_exchange/#moment_kinetics.charge_exchange","page":"charge_exchange","title":"moment_kinetics.charge_exchange","text":"\n\n\n\n","category":"module"},{"location":"zz_charge_exchange/#moment_kinetics.charge_exchange.charge_exchange_collisions_single_species!-NTuple{14, Any}","page":"charge_exchange","title":"moment_kinetics.charge_exchange.charge_exchange_collisions_single_species!","text":"update the evolved pdf for a single species to account for charge exchange collisions with a single species of the opposite type; e.g., ions with neutrals or neutrals with ions\n\n\n\n\n\n","category":"method"},{"location":"zz_charge_exchange/#moment_kinetics.charge_exchange.ion_charge_exchange_collisions_1V!-NTuple{10, Any}","page":"charge_exchange","title":"moment_kinetics.charge_exchange.ion_charge_exchange_collisions_1V!","text":"update the evolved pdf for each ion species to account for charge exchange collisions between ions and neutrals\n\n\n\n\n\n","category":"method"},{"location":"zz_charge_exchange/#moment_kinetics.charge_exchange.neutral_charge_exchange_collisions_1V!-NTuple{10, Any}","page":"charge_exchange","title":"moment_kinetics.charge_exchange.neutral_charge_exchange_collisions_1V!","text":"update the evolved pdf for each neutral species to account for charge exchange collisions between ions and neutrals\n\n\n\n\n\n","category":"method"},{"location":"zz_plot_sequence/#plot_sequence","page":"plot_sequence","title":"plot_sequence","text":"","category":"section"},{"location":"zz_plot_sequence/","page":"plot_sequence","title":"plot_sequence","text":"Modules = [plots_post_processing.plot_sequence]","category":"page"},{"location":"zz_plot_sequence/#plots_post_processing.plot_sequence","page":"plot_sequence","title":"plots_post_processing.plot_sequence","text":"\n\n\n\n","category":"module"},{"location":"timestepping/#Timestepping","page":"Timestepping","title":"Timestepping","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Timestepping in moment_kinetics can be done with various explicit Runge-Kutta (RK) schemes. The default is a fixed-timestep 3rd-order, 4-stage, strong stability preserving (SSP) RK scheme.","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Several schemes (including all the fixed-timestep schemes) use a 'low storage' option, where only values from the first stage and previous stage are required for each stage update[1].","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"[1]: At present, we take advantage of this property to reduce the number of computations in the RK update step, but do not actually reduce the memory usage - we still store the results from every RK stage. It would be fairly straightforward to save memory, but would only reduce from 4 copies to 3 for the standard cases, so not a big saving.","category":"page"},{"location":"timestepping/#Fixed-timestep-schemes","page":"Timestepping","title":"Fixed-timestep schemes","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"The fixed timestep schemes use a constant dt, specified in the input file, for the whole simulation. The available types are:","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"\"SSPRK1\" - forward Euler method\n\"SSPRK2\" - Heun's method\n\"SSPRK3\" - a 3-stage, 3rd order method, see this Wikipedia list\n\"SSPRK4\" - the default, a 4-stage, 3rd order method, see [R.J. Spiteri, and S.J. Ruuth. \"A new class of optimal high-order strong-stability-preserving time discretization methods.\" SIAM Journal on Numerical Analysis 40.2 (2002): 469-491., referenced in Dale E. Durran, “Numerical Methods for Fluid Dynamics”, Springer. Second Edition].","category":"page"},{"location":"timestepping/#Adaptive-timestep-schemes","page":"Timestepping","title":"Adaptive-timestep schemes","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Several SSP schemes are included from [Fekete, Conde and Shadid, \"Embedded pairs for optimal explicit strong stability preserving Runge-Kutta methods\", Journal of Computational and Applied Mathematics 421 (2022) 114325, https://doi.org/10.1016/j.cam.2022.114325]:","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"\"Fekete4(3)\" a 4-stage, 3rd order method, the recommended 3rd order method in Fekete et al. Identical to the default \"SSPRK4\" fixed-step method, but with an embedded 2nd order method used to provide error control for adaptive timestepping. This is probably a good first choice for an adaptive timestep method.\n\"Fekete4(2)\" a 4-stage, 2nd order method, the recommended 2nd order method in Fekete et al.\n\"Fekete10(4)\" a 10-stage, 4th order method, the recommended 4th order method in Fekete et al. May allow longer timesteps than \"Fekete4(3)\", but probably not any faster as more stages are required per timestep. However, if very high accuracy is required (very tight rtol and atol tolerances), the higher accuracy may be an advantage.\n\"Fekete6(4)\" a 6-stage, 4th order method.","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"The classic \"Runge-Kutta-Fehlberg\" method [https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta%E2%80%93Fehlberg_method, 'COEFFICIENTS FOR RK4(5), FORMULA 2 Table III in Fehlberg' - note the Wikipedia page seems to have a typo in one of the error coefficients, see comment in utils/calculate_rk_coeffs.jl] is also provided as \"RKF5(4)\". This method seems to require a significantly smaller timestep to be stable than the SSP methods from Fekete et al., but might be useful if very high accuracy is required as it is a 5th-order accurate method. It uses 6 stages per step.","category":"page"},{"location":"timestepping/#Algorithm-for-choosing-the-next-timestep","page":"Timestepping","title":"Algorithm for choosing the next timestep","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"These adaptive timestepping methods use several criteria to set or limit the timestep:","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Truncation error, which is estimated by the difference between the higher and lower order methods of an 'embedded pair'. The timestep size needed to maintain a specified accuracy can be estimated from the size of the trucation error (knowing the order of accuracy of the method), as described for example in Fehlberg et al. This estimate is used unless it is larger than any of the following limits. The error limit is set by relative tolerance \"rtol\" and absolute tolerance \"atol\" parameters. For each variable X the error metric (calculated in moment_kinetics.time_advance.local_error_norm is the root-mean-square (RMS, or 'L2 norm') of epsilon:\nepsilon = fracE_X(mathttrtol*X + mathttatol)\nwhere E_X is the truncation error estimate for X. If the RMS of epsilon, averaged over all evolved variables, is greater than 1, then the step is considered 'failed' and is re-done with a shorter timestep (set by the lower of half of the failed timestep, or the timestep calculated using the estimate based on epsilon).\nCFL criteria [https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition]. These are estimated for the spatial advection and velocity-space advection terms in the kinetic equation(s), using the methods moment_kinetics.utils.get_minimum_CFL_z, moment_kinetics.utils.get_minimum_CFL_vpa, moment_kinetics.utils.get_minimum_CFL_neutral_z, moment_kinetics.utils.get_minimum_CFL_neutral_vz. These estimates are multiplied by a user-set prefactor - the correct value for the prefactor depends on both the timestepping scheme and the spatial discretisation, so to be pragmatic we tune the value by trial and error. [CFL limits associated with other terms in the equations could be added in a similar way if it is useful.]\nAt each step, the timestep is allowed to increase by at most a (user-set) factor, to avoid large jumps that might cause numerical instability.\nThere is an option to set a minimum timestep, which may be useful to push the simulation through initial transients where there is some numerical instability which would make the truncation error estimate push the timestep to ridiculously small values. Since we might not care about accuracy too much during these initial transients, it can be useful to set a minimum to stop the timestep getting too small (as long as the minimum is small enough that the simulation does not crash).","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"The estimates and limits just described are controlled by various tuning parameters, described in timestepping-input-parameters, that may need to be set appropriately to get good performance from the adaptive timestepping methods. The timestep achievable may be limited by accuracy or by stability. If the CFL_prefactor is set too high (or the relevant CFL limit is not being checked) then the timestep will try to increase too high for stability - when this happens, the step will also become inaccurate, causing timestep failures and reducing the timestep. So the simulation should continue without crashing, however it will be inefficient as the truncation error estimate will not 'see' the stability limit until the limit is exceeded, resulting in a cycle of increasing timestep followed by (probably repeated) timestep failures. The aim should probably be to set the CFL_limit_prefactor and max_increase_factor to the highest values that do not lead to too many timestep failures (a few failures are OK, especially during the initial transient phase of simulations). step_update_prefactor can also be decreased to use a bigger margin in the timestep estimated from the error metric epsilon - using a smaller step_update_prefactor will make the timestep smaller when it is limited by accuracy, but this can (sometimes!) help avoid timestep failures, which might decrease the total number of steps. ","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Special treatment is needed for the time points where output is to be written. When the next timestep would take the simulation time beyond the next time where output is to be written, the timestep is set instead to take the simulation to the output time. Then output is written and the timestep is reset to the last full timestep value from before the output.","category":"page"},{"location":"timestepping/#Alternative-algorithm-for-choosing-the-next-timestep","page":"Timestepping","title":"Alternative algorithm for choosing the next timestep","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"It might turn out that the particular CFL limits that are included in the algorithm described in Algorithm for choosing the next timestep are not a complete set of the things that set the stability limit for the explicit RK timestep. If that is the case, it may be useful to have a more generic algorithm that can still fairly robustly choose a good timestep size, without a large number of timestep failures. One option is described in this subsection. For the parameters discussed, see again timestepping-input-parameters.","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"If we assume that dt that last failed the timestep truncation error test is a good estimate of the dt that is the boundary between stable and unstable timstep values, then it makes sense to try to keep timesteps close to that (to avoid failures), although we also want to allow the timestep to increase past that value in case it was a bad estimate (e.g. during some sort of transient) or because the stability limits have changed (e.g. parallel gradients in the simulation have changed significantly). We would like to stay close to a marginally stable (rather than marginally unstable) timestep, so take as the estimate the last successful timestep before the most recent failed timestep (this is stored in the code as t_params.dt_before_last_fail[]). When dt is within a factor last_fail_proximity_factor of this value, we limit the increase in timestep to max_increase_factor_near_last_fail, rather than max_increase_factor. Suggested setup (which of course is likely to need adjusting depending on the simulation!):","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Set max_increase_factor_near_last_fail to a value very close to 1, say 1.001. This means that the timestep can only very slowly approach and exceed t_params.dt_before_last_fail[]. Setting this value closer to 1 should decrease the number of timestep failures.\nSet max_increase_factor to a relatively large value, say 1.5 or 2, so that when a timestep does fail, dt quickly recovers to a value close to the last successful value before the failure.\nSet step_update_prefactor to a relatively small value, say 0.5. step_update_prefactor controls how far dt is set below the value needed to comply with the requested tolerances. Setting a smallish value (so a large margin below the value that would trigger a timestep failure) seems to help - current guess (JTO 20/3/2024) is that: when dt is close to (or maybe just above) the value that would be unstable, the error starts to grow; with some margin, and with the factor by which dt increases limited to a small value, so that dt is at worst very marginally unstable, the truncation error estimate can feel the error and decrease dt (modestly) back to a stable value, before the error becomes big enough to cause a timestep failure. Once dt has been decreased (but not too much) it is again only allowed to increase slowly, so as long as these decreases happen often enough, dt can stay around the stability boundary without causing timestep failures. Decreasing this value should decrease the number of timestep failures.\nlast_fail_proximity_factor - current guess (JTO 20/3/2024) is that the default value of 1.05 is reasonable. Increasing this value should decrease the number of timestep failures, but will also increase the number of steps needed before the timestep can increase past a too-low value (from a bad estimate, transient, changed simulation conditions, etc.).\nAs a rough guideline, more than one timestep failures on average per 100 timesteps is probably too many to be efficient, while around or less than this many is probably acceptable. If there are too many failures, try tweaking parameters as indicated above.","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"In at least one case JTO has been able to use this method to get a simulation to run without imposing CFL restrictions explicitly, in a similar number of steps as when using (well-tuned) explicit CFL restrictions.","category":"page"},{"location":"timestepping/#timestepping-input-parameters","page":"Timestepping","title":"Input parameters","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"Option name Default value Description\nnstep 5 nstep*dt is the total length of the run. For fixed-step timestepping, nstep is the total number of timesteps\ndt 000025T For fixed-step, gives the length of the timestep. For adaptive-step gives the initial guess for the timestep. T in the default value is the initial temperature of the ions\nCFL_prefactor -1.0 Prefactor that the CFL limits from moment_kinetics.utils.get_minimum_CFL_z, moment_kinetics.utils.get_minimum_CFL_vpa, moment_kinetics.utils.get_minimum_CFL_neutral_z, moment_kinetics.utils.get_minimum_CFL_neutral_vz are multiplied by to set the timestep limit. If no value is given, a default is set according to which timestepping scheme is chosen (see moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!).\nnwrite 1 Output of moment quantities is written every nwrite*dt time units.\nnwrite_dfns nothing Output of distribution function quantities is written every nwrite_dfns*dt time units. By default distribution function quantities are written only at the beginning and end of the simulation.\ntype \"SSPRK4\" Timestepping method, see Fixed-timestep schemes and Adaptive-timestep schemes.\nsplit_operators false If true, use operator splitting. Operator splitting is currently only partially implemented.\nstopfile_name \"stop\" Name of the file that can be created in the output directory to stop the simulation cleanly after the next output is written.\nsteady_state_residual false Set to true to print out the maximum residual r(t) = fracleft n(t)-n(t-delta t)right delta t of the density for each species at each output step\nconverged_residual_value -1.0 If steady_state_residual = true and converged_residual_value is set to a positive value, then the simulation will be stopped if all the density residuals are less than converged_residual_value. Note the residuals are only calculated and checked at time steps where output for moment variables is written.\nrtol 1.0e-5 Relative tolerance used for the truncation error metric.\natol 1.0e-12 Absolute tolerance used for the truncation error metric.\natol_upar 1.0e-2*rtol Absolute tolerance used parallel flow moment variables in the truncation error metric. This is separate from atol as the flow moments are expected to pass through zero somewhere, unlike distribution functions, densities, or pressures that should always be positive.\nstep_update_prefactor 0.9 When timestep is limited by accuracy (rather than something else), it is set to step_update_prefactor times the estimated timestep which would give an RMS error metric $\\epsilon$ of 1 at the next step. This value should always be less than 1. Smaller values give a bigger margin under the failure threshold, so may help reduce the number of timestep failures.\nmax_increase_factor 1.05 Timestep can be increased by at most this factor at each step.\nmax_increase_factor_near_last_fail Inf If set to finite value, replaces max_increase_factor when the timestep is near the last failed dt value (defined as within last_fail_proximity_factor of the last successful dt value before a timestep failure). If set, must be less than max_increase_factor.\nlast_fail_proximity_factor 1.05 Defines the range considered 'near to' the last failed dt value: dt_before_last_fail/last_fail_proximity_factor < dt < dt_before_last_fail*last_fail_proximity_factor.\nminimum_dt 0.0 Timestep is not allowed to decrease below this value, regardless of accuracy or stability limits.\nmaximum_dt Inf Timestep is not allowed to increase above this value.\nhigh_precision_error_sum false If this is set to true, then quad-precision values (Float128 from the Quadmath package) are used to calculate the sum in the truncation error estimates. When different numbers of processes are used, the sums are calculated in different orders, so the rounding errors will be different. When adaptive timestepping is used this means that different timesteps will be used when different numbers of processes are used, so results will not be exactly the same (although they should be consistent within the timestepper tolerances and discretisation errors). When comparing 'identical' simulations run on different numbers of processes (e.g. for debugging), these differences can be inconvenient. The differences can be avoided (or at least massively reduced) by using a higher precision for the sum, so that the order of the addition operations does not matter (at least until there are so many contributions to the sum that the rounding errors reduce the precision of the quad-precision result to less than double-precision, which would take a very large number!). This feature was originally added in an attempt to make adaptive-timestepping tests give consistent results (at a level sim 10^-14) on the CI servers. However, rounding errors change randomly on different systems (operating system, compiler, hardware, etc.), not only because of the different order of terms in the sum in the truncation error norm, so consistency is not possible between different systems even with this feature.","category":"page"},{"location":"timestepping/#Diagnostics","page":"Timestepping","title":"Diagnostics","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"To help tune the settings for adaptive timestepping methods, several diagnostics are written to the output files:","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"step_counter is the cumulative number of time steps taken to reach each output.\ndt is the most recent timestep size at each output.\nfailure_counter is the cumulative number of timestep failures.\nfailure_caused_by counts the (cumulative) number of times each evolved variable (distribution functions or, for moment-kinetic simulations, moment variables) caused a timestep failure. failure_caused_by is a 2d array - the second dimension is time, the index of the first indicates the variable (see below for plotting of the diagnostics).\nlimit_caused_by counts the (cumulative) number of times each factor (accuracy, CFL limits, maximum timestep increase factor, minimum timestep) set the timestep limit. limit_caused_by is a 2d array - the second dimension is time, the index of the first indicates the factor (see below for plotting of the diagnostics).","category":"page"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"These diagnostics (after being converted from cumulative counts to counts per output step) as well as the CFL limits are plotted and/or animated by makie_post_processing.timestep_diagnostics. This function will be called when running makie_post_processing.makie_post_process if options in the [timestep_diagnostics] section of the post processing input are set: plot=true for plots or animate_CFL=true to make animations of the CFL limits for various terms.","category":"page"},{"location":"timestepping/#Developing","page":"Timestepping","title":"Developing","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"The script utils/calculate_rk_coeffs.jl provides some functions to convert a 'Butcher tableau' to the rk_coefs array used internally in moment_kinetics. To add more RK methods (adaptive or fixed-step) it may be useful to add them in this script, to get the rk_coefs values, which can be copied into moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!.","category":"page"},{"location":"timestepping/#API","page":"Timestepping","title":"API","text":"","category":"section"},{"location":"timestepping/","page":"Timestepping","title":"Timestepping","text":"See moment_kinetics.time_advance, moment_kinetics.runge_kutta.","category":"page"},{"location":"zz_runge_kutta/#runge_kutta","page":"runge_kutta","title":"runge_kutta","text":"","category":"section"},{"location":"zz_runge_kutta/","page":"runge_kutta","title":"runge_kutta","text":"Modules = [moment_kinetics.runge_kutta]","category":"page"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta","page":"runge_kutta","title":"moment_kinetics.runge_kutta","text":"Runge Kutta timestepping\n\n\n\n\n\n","category":"module"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.adaptive_timestep_update_t_params!-NTuple{9, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.adaptive_timestep_update_t_params!","text":"adaptive_timestep_update_t_params!(t_params, CFL_limits, error_norms,\n total_points, current_dt, error_norm_method,\n success, nl_max_its_fraction)\n\nUse the calculated CFL_limits and error_norms to update the timestep in t_params.\n\n\n\n\n\n","category":"method"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.local_error_norm","page":"runge_kutta","title":"moment_kinetics.runge_kutta.local_error_norm","text":"local_error_norm(error, f, rtol, atol)\nlocal_error_norm(error, f, rtol, atol, neutral=false; method=\"Linf\",\n skip_r_inner=false, skip_z_lower=false, error_sum_zero=0.0)\n\nMaximum error norm in the range owned by this MPI process, given by\n\nmax(fracmathtterrormathttrtol*mathttf + mathttatol)\n\n3 dimensional arrays (which represent moments) are treated as ion moments unless neutral=true is passed.\n\nmethod can be \"Linf\" (to take the maximum error) or \"L2\" to take the root-mean-square (RMS) error.\n\nskip_r_inner and skip_z_lower can be set to true to skip the contribution from the inner/lower boundaries, to avoid double-counting those points when using distributed-memory MPI.\n\nerror_sum_zero should always have value 0.0, but is included so that different types can be used for L2sum. For testing, if we want consistency of results when using different numbers of processes (when the number of processes changes the order of operations in the sum is changed, which changes the rounding errors) then we have to use higher precision (i.e. use the Float128 type from the Quadmath package). The type of a 0.0 value can be set according to the high_precision_error_sum option in the [timestepping] section, and stored in a template-typed value in the t_params object - when that value is passed in as the argument to error_sum_zero, that type will be used for L2sum, and the type will be known at compile time, allowing this function to be efficient.\n\n\n\n\n\n","category":"function"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.rk_loworder_solution!-Tuple{Any, Any, Symbol, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.rk_loworder_solution!","text":"Calculate a lower-order approximation for the variable named var_symbol, which can be used to calculate an error estimate for adaptive timestepping methods.\n\nThe lower-order approximation is stored in var_symbol in scratch[2] (as this entry should not be needed again after the lower-order approximation is calculated).\n\n\n\n\n\n","category":"method"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.rk_update_evolved_moments!-NTuple{5, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.rk_update_evolved_moments!","text":"use Runge Kutta to update any ion velocity moments evolved separately from the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.rk_update_evolved_moments_electron!-NTuple{5, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.rk_update_evolved_moments_electron!","text":"use Runge Kutta to update any electron velocity moments evolved separately from the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.rk_update_evolved_moments_neutral!-NTuple{5, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.rk_update_evolved_moments_neutral!","text":"use Runge Kutta to update any neutral-particle velocity moments evolved separately from the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.rk_update_variable!-Tuple{Any, Any, Symbol, Any, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.rk_update_variable!","text":"Update the variable named var_symbol in scratch to the current Runge-Kutta stage istage. The current value in scratch[istage+1] is the result of the forward-Euler update, which needs to be corrected using values from previous stages with the Runge-Kutta coefficients. scratch_implicit contains the results of backward-Euler updates, which are needed for IMEX timestepping schemes.\n\n\n\n\n\n","category":"method"},{"location":"zz_runge_kutta/#moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!-Tuple{Any, Any, Any}","page":"runge_kutta","title":"moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!","text":"given the number of Runge Kutta stages that are requested, returns the needed Runge Kutta coefficients; e.g., if f is the function to be updated, then f^{n+1}[stage+1] = rkcoef[1,stage]*f^{n} + rkcoef[2,stage]f^{n+1}[stage] + rk_coef[3,stage](f^{n}+dt*G[f^{n+1}[stage]]\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#finite_differences","page":"finite_differences","title":"finite_differences","text":"","category":"section"},{"location":"zz_finite_differences/","page":"finite_differences","title":"finite_differences","text":"Modules = [moment_kinetics.finite_differences]","category":"page"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences","page":"finite_differences","title":"moment_kinetics.finite_differences","text":"\n\n\n\n","category":"module"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.finite_difference_info","page":"finite_differences","title":"moment_kinetics.finite_differences.finite_difference_info","text":"Finite difference discretization\n\n\n\n\n\n","category":"type"},{"location":"zz_finite_differences/#moment_kinetics.calculus.elementwise_derivative!-Tuple{Any, Any, Any, moment_kinetics.finite_differences.finite_difference_info}","page":"finite_differences","title":"moment_kinetics.calculus.elementwise_derivative!","text":"elementwise_derivative!(coord, f, adv_fac, not_spectral::finite_difference_info)\n\nCalculate the derivative of f using finite differences, with particular scheme specified by coord.finitedifferenceoption; result stored in coord.scratch_2d.\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.calculus.elementwise_derivative!-Tuple{Any, Any, moment_kinetics.finite_differences.finite_difference_info}","page":"finite_differences","title":"moment_kinetics.calculus.elementwise_derivative!","text":"elementwise_derivative!(coord, f, not_spectral::finite_difference_info)\n\nCalculate the derivative of f using 4th order centered finite differences; result stored in coord.scratch_2d.\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.centered_fourth_order!-Tuple{Matrix{Float64}, Vararg{Any, 5}}","page":"finite_differences","title":"moment_kinetics.finite_differences.centered_fourth_order!","text":"take the derivative of input function f and return as df using fourth-order, centered differences. input/output array df is 2D array of size ngrid x nelement\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.centered_second_order!-Tuple{Matrix{Float64}, Vararg{Any, 5}}","page":"finite_differences","title":"moment_kinetics.finite_differences.centered_second_order!","text":"take the derivative of input function f and return as df using second-order, centered differences. input/output array df is 2D array of size ngrid x nelement\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.centered_second_order!-Tuple{Vector{Float64}, Vararg{Any, 5}}","page":"finite_differences","title":"moment_kinetics.finite_differences.centered_second_order!","text":"take the derivative of input function f and return as df using second-order, centered differences. input/output df is 1D array of size n (full grid)\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.derivative_finite_difference!-NTuple{7, Any}","page":"finite_differences","title":"moment_kinetics.finite_differences.derivative_finite_difference!","text":"\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.derivative_finite_difference!-NTuple{8, Any}","page":"finite_differences","title":"moment_kinetics.finite_differences.derivative_finite_difference!","text":"\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.elementwise_second_derivative!-Tuple{Any, Any, moment_kinetics.finite_differences.finite_difference_info}","page":"finite_differences","title":"moment_kinetics.finite_differences.elementwise_second_derivative!","text":"elementwise_second_derivative!(coord, f, not_spectral::finite_difference_info)\n\nCalculate the second derivative of f using 2nd order centered finite differences; result stored in coord.scratch_2d.\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.fd_check_option-Tuple{Any, Any}","page":"finite_differences","title":"moment_kinetics.finite_differences.fd_check_option","text":"\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.second_derivative_finite_difference!-Tuple{Matrix{Float64}, Vararg{Any, 5}}","page":"finite_differences","title":"moment_kinetics.finite_differences.second_derivative_finite_difference!","text":"Take the second derivative of input function f and return as df using second-order, centered differences. output array df is 2D array of size ngrid x nelement\n\n\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.upwind_first_order!-NTuple{7, Any}","page":"finite_differences","title":"moment_kinetics.finite_differences.upwind_first_order!","text":"\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.upwind_second_order!-NTuple{7, Any}","page":"finite_differences","title":"moment_kinetics.finite_differences.upwind_second_order!","text":"\n\n\n\n","category":"method"},{"location":"zz_finite_differences/#moment_kinetics.finite_differences.upwind_third_order!-NTuple{7, Any}","page":"finite_differences","title":"moment_kinetics.finite_differences.upwind_third_order!","text":"\n\n\n\n","category":"method"},{"location":"external_sources_notes/#External-sources","page":"External sources","title":"External sources","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"Sometimes it is useful to have a source term for the plasma or neutrals (the S_i and S_n of Moment kinetic equations). The currently-implemented source term has the form of a Maxwellian with constant temperature and spatially-varying amplitude","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"beginalign\nS_i = A_i(rz) frac1(pi)^32 (2 T_mathrmsourcei m_i)^32 expleft( -frac(v_perp^2 + v_parallel^2)T_mathrmsourcei right) \nS_n = A_n(rz) frac1(pi)^32 (2 T_mathrmsourcen m_n)^32 expleft( -frac(v_zeta^2 + v_r^2 + v_z^2)T_mathrmsourcen right)\nendalign","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"or in 1V simulations that do not include v_perp, v_zeta, v_r dimensions","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"beginalign\nS_i = A_i(rz) frac1sqrtpi sqrt2 T_mathrmsourcei m_i expleft( -fracv_perp^2T_mathrmsourcei right) \nS_n = A_n(rz) frac1sqrtpi sqrt2 T_mathrmsourcen m_n expleft( -fracv_z^2T_mathrmsourcen right)\nendalign","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The sources are controlled by options in the [ion_source] and [neutral_source] sections of the input file. The source terms are enabled by setting active = true. The constant temperature is set with the source_T option (default is 1 for ions and T_mathrmwall for neutrals). The amplitude can be set or controlled in various ways depending on the source_type setting, as explained in the following subsection.","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"Note that all the settings mentioned below have values given in normalised units (in the same way as the settings for initial profiles, etc.).","category":"page"},{"location":"external_sources_notes/#Amplitude","page":"External sources","title":"Amplitude","text":"","category":"section"},{"location":"external_sources_notes/#Fixed-amplitude-(default)","page":"External sources","title":"Fixed amplitude (default)","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"When source_type = \"Maxwellian\" (the default), the amplitude of the source is fixed in time and controled by the profile options. The profile has the form","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"A(rz) = A_0 R(r) Z(z)","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"where A_0 is given by the source_strength option. R(r) and Z(z) are controlled by the r_profile and z_profile options respectively. The available options for either are the same, so letting x stand for either of r or z, and X for the corresponding R or Z:","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"x_profile = \"constant\" (the default) means X(x)=1.\nx_profile = \"gaussian\" means X(x) = (1 - X_mathrmmin) expleft( -left(fracxwright)^2 right) + X_mathrmmin where X_mathrmmin is set by x_relative_minimum and w is set by x_width.\nx_profile = \"parabolic\" means P(x) = left( 1 - left(frac2xwright)^2 right), X(x) = (1 - X_mathrmmin) H(P(x)) P(x) + X_mathrmmin where X_mathrmmin is set by x_relative_minimum and w is set by x_width. The effect of the step function H is to let the profile be a quadratic in the range -w2 x w2, but equal to a floor (by default 0, so that the source is just not allowed to become negative) outside that range.","category":"page"},{"location":"external_sources_notes/#Midpoint-density-controller","page":"External sources","title":"Midpoint density controller","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"When source_type = \"density_midpoint_control\" a PI controller (Wikipedia) is used to control the ion/neutral density. The 'midpoint' for the purposes of this controller is the point on the grid where r=0 and z=0 (there must be a grid point there).","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The spatial profile of the source (R(r) and Z(z)) is set in the same way as for the 'Fixed amplitude' source (see above), but now the prefactor changes with time","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"A(rz) = A_0(t) R(r) Z(z)","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The prefactor A_0(t) is controlled to set the midpoint density to some value n(r=0z=0)rightarrow n_mathrmPI where n_mathrmPI is set by PI_density_target_amplitude. Specifically,","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"beginalign\n A_0(t) = mathttmaxleft(P(n_mathrmPI - n(r=0z=0)) + iota(t) 0right) \n fracpartial iotapartial t = I(n_mathrmPI - n(r=0z=0))\nendalign","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The 'proportional' coefficient P is set by PI_density_controller_P and the 'integral' coefficient I is set by PI_density_controller_I. The mathrmmax(ldots0) is to ensure that the 'source term' is never negative (i.e. a sink), to avoid the possibility of driving the system towards negative density.","category":"page"},{"location":"external_sources_notes/#Density-profile-controller","page":"External sources","title":"Density profile controller","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"When source_type = \"density_profile_control\" a PI controller (Wikipedia) is used to control the ion/neutral density profile.","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The target profile is","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"n_mathrmPI(rz) = n_mathrmPI0 R(r) Z(z)","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"where n_mathrmPI0 is set by PI_density_target_amplitude and R(r) and Z(z) are set as described in Fixed amplitude (default).","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The source amplitude A(rz) is controlled to set the density profile to n(rz)rightarrow n_mathrmPI(rz). Specifically,","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"beginalign\n A(rz) = mathttmaxleft(P(n_mathrmPI(rz) - n(rz)) + iota(trz) 0right) \n fracpartial iota(trz)partial t = I(n_mathrmPI(rz) - n(rz))\nendalign","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The 'proportional' coefficient P is set by PI_density_controller_P and the 'integral' coefficient I is set by PI_density_controller_I. The mathrmmax(ldots0) is to ensure that the 'source term' is never negative (i.e. a sink), to avoid the possibility of driving the system towards negative density.","category":"page"},{"location":"external_sources_notes/#Recycling","page":"External sources","title":"Recycling","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The source of neutrals can be set so that some fraction of the flux of ions to the walls is recycled into the volume of the domain as neutrals by using the source_type = \"recycling\" option.","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"The profile is set up whose spatial integral is 1","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"A(rz) = A_0 R(r) Z(z)","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"where A_0 = leftint drdz R(r) Z(z)right^-1 and R(r) and Z(z) are set as described in Fixed amplitude (default). The source is","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"S_n(trz) = F(t) A(rz)","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"where F(t) is the sum of the integrated ion flux to the lower and upper targets.","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"warning: Warning\nThe target flux calculated for this controller does not account for magnetic field lines that are not perpendicular to the wall, or for drifts to the target, so needs updating (within moment_kinetics.external_sources.external_neutral_source_controller!) to be used in 2D simulations.","category":"page"},{"location":"external_sources_notes/#Energy-source","page":"External sources","title":"Energy source","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"When source_type = \"energy\", rather than just adding particles with temperature T_mathrmsources, the existing plasma or neutrals in the domain are swapped with plasma/neutrals from a Maxwellian with T_mathrmsources, so that the density is unchanged, but energy is added (or potentially removed if the plasma/neutrals are hotter than T_mathrmsources).","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"beginalign\nS_i = A_i(rz) left frac1(pi)^32 (2 T_mathrmsourcei m_i)^32 expleft( -frac(v_perp^2 + v_parallel^2)T_mathrmsourcei - f_i(v_perp v_parallel) right) right \nS_n = A_n(rz) left frac1(pi)^32 (2 T_mathrmsourcen m_n)^32 expleft( -frac(v_zeta^2 + v_r^2 + v_z^2)T_mathrmsourcen - f_n(v_zeta v_r v_z) right) right\nendalign","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"or in 1V simulations","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"beginalign\nS_i = A_i(rz) left frac1sqrtpi sqrt2 T_mathrmsourcei m_i expleft( -fracv_perp^2T_mathrmsourcei - f_i(v_parallel) right) right \nS_n = A_n(rz) left frac1sqrtpi sqrt2 T_mathrmsourcen m_n expleft( -fracv_z^2T_mathrmsourcen - f_n(v_z) right) right\nendalign","category":"page"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"Note that this source does not give a fixed power input (although that might be a nice feature to have), it just swaps plasma/neutral particles at a constant rate.","category":"page"},{"location":"external_sources_notes/#API","page":"External sources","title":"API","text":"","category":"section"},{"location":"external_sources_notes/","page":"External sources","title":"External sources","text":"See external_sources.","category":"page"},{"location":"manufactured_solution_test_examples/#List-of-Manufactured-Solutions-Test-TOML-inputs","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"Here we list the existing manufactured solution test inputs. These inputs are examples only, and in most cases we only keep the lowest resolution examples. The user should copy these inputs and make a series of TOML with increasing resolutions to generate a series of simulations on which the numerical errors can be tested and compared to the expected scaling of the numerical method employed.","category":"page"},{"location":"manufactured_solution_test_examples/#D1V-tests","page":"List of Manufactured Solutions Test TOML inputs","title":"1D1V tests","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"There are 1D1V tests which complement the check-in testing suite. The example input files in this category are as follows:","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"1D1V simulation of kinetic ions (no neutrals) and numerical velocity dissipation.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-wall_MMS_new_nel_r_1_z_16_vpa_16_vperp_1_diss.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"1D1V simulation of kinetic ions (no neutrals) and a krook collision operator.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-wall_MMS_new_nel_r_1_z_16_vpa_16_vperp_1_krook.toml","category":"page"},{"location":"manufactured_solution_test_examples/#D2V-tests","page":"List of Manufactured Solutions Test TOML inputs","title":"1D2V tests","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"1D2V simulation of kinetic ions (no neutrals) and a krook collision operator.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-wall_MMS_new_nel_r_1_z_16_vpa_8_vperp_8_krook.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"1D2V simulation of a open field lines in 1D magnetic mirror (no neutrals)","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-mirror_MMS_ngrid_9_nel_r_1_z_4_vpa_4_vperp_2_diss.toml\nruns/1D-mirror_MMS_ngrid_9_nel_r_1_z_8_vpa_8_vperp_4_diss.toml\nruns/1D-mirror_MMS_ngrid_9_nel_r_1_z_16_vpa_16_vperp_8_diss.toml\nruns/1D-mirror_MMS_ngrid_9_nel_r_1_z_32_vpa_32_vperp_16_diss.toml","category":"page"},{"location":"manufactured_solution_test_examples/#D2V/1D3V-test-(with-neutrals)","page":"List of Manufactured Solutions Test TOML inputs","title":"1D2V/1D3V test (with neutrals)","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"A test with periodic boundary conditions in 1D, Boltzmann electrons, neutrals, and ions.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-sound-wave_cheb_nel_r_1_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"A test with ions and neutral species and wall boundary conditions, using the Boltzmann electron response to model the electron species.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-wall_cheb-with-neutrals_nel_r_1_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"A test with neutral species and wall boundary conditions, using a simple sheath model for electrons based on the Boltzmann electron response.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/1D-wall_cheb-with-neutrals-with-sheath_nel_r_1_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"manufactured_solution_test_examples/#D1V-tests-2","page":"List of Manufactured Solutions Test TOML inputs","title":"2D1V tests","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"These tests are used to test the spatial advection in simple cases with wall boundary conditions.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"2D1V test of wall boundary conditions and the E x B drift. Numerical dissipation in the radial domain is imposed to stabilise an instability that otherwise appears at the grid scale.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/2D-wall_MMS_nel_r_32_z_32_vpa_16_vperp_1_diss.toml","category":"page"},{"location":"manufactured_solution_test_examples/#D2V-tests-2","page":"List of Manufactured Solutions Test TOML inputs","title":"2D2V tests","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"These tests are used to test the spatial advection in cases with wall boundary conditions or geometrical features where two velocity dimensions are necessary.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"2D2V simulation with periodic boundary conditions, Boltzmann electrons and ions","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/2D-sound-wave_cheb_ion_only_nel_r_2_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"2D2V simulation of a open field lines in 1D magnetic mirror (no neutrals)","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/2D-mirror_MMS_ngrid_5_nel_r_8_z_8_vpa_8_vperp_4_diss.toml\nruns/2D-mirror_MMS_ngrid_5_nel_r_16_z_16_vpa_16_vperp_8_diss.toml\nruns/2D-mirror_MMS_ngrid_5_nel_r_32_z_32_vpa_16_vperp_16_diss.toml","category":"page"},{"location":"manufactured_solution_test_examples/#D2V/2D3V-tests","page":"List of Manufactured Solutions Test TOML inputs","title":"2D2V/2D3V tests","text":"","category":"section"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"These tests include a two-dimensional domain, ions, and neutrals (which have three velocity dimensions).","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"2D2V/2D3V simulation on a domain with wall boundaries, with helical geometry, Boltzmann electrons, neutrals, and ions.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/2D-wall_cheb-with-neutrals_nel_r_2_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"2D2V/2D3V simulation on a periodic domain, with helical geometry, Boltzmann electrons, neutrals, and ions.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/2D-sound-wave_cheb_nel_r_2_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"2D2V/2D3V simulation on a periodic domain, with model charge exchange and ionisation collisions, helical geometry, Boltzmann electrons, neutrals, and ions.","category":"page"},{"location":"manufactured_solution_test_examples/","page":"List of Manufactured Solutions Test TOML inputs","title":"List of Manufactured Solutions Test TOML inputs","text":"runs/2D-sound-wave_cheb_cxiz_nel_r_2_z_2_vpa_4_vperp_4.toml","category":"page"},{"location":"zz_electron_kinetic_equation/#electron_kinetic_equation","page":"electron_kinetic_equation","title":"electron_kinetic_equation","text":"","category":"section"},{"location":"zz_electron_kinetic_equation/","page":"electron_kinetic_equation","title":"electron_kinetic_equation","text":"Modules = [moment_kinetics.electron_kinetic_equation]","category":"page"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.calculate_contribution_from_z_advection!-NTuple{7, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.calculate_contribution_from_z_advection!","text":"calculates the contribution to the residual of the electron kinetic equation from the z advection term: residual = zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa - pdf * prefactor INPUTS: zadvectionterm = dummy array to be filled with the contribution to the residual from the z advection term pdf = modified electron pdf used in the kinetic equation = (true electron pdf / dense) * vthe vthe = electron thermal speed z = z grid vpa = vparallel grid zspectral = spectral representation of the z grid scratchdummy = dummy array to be used for temporary storage OUTPUT: zadvectionterm = updated contribution to the residual from the z advection term\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.electron_adaptive_timestep_update!-NTuple{16, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.electron_adaptive_timestep_update!","text":"electron_adaptive_timestep_update!(scratch, t, t_params, moments, phi, z_advect,\n vpa_advect, composition, r, z, vperp, vpa,\n vperp_spectral, vpa_spectral,\n external_source_settings, num_diss_params;\n evolve_ppar=false)\n\nCheck the error estimate for the embedded RK method and adjust the timestep if appropriate.\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.electron_kinetic_equation_euler_update!-NTuple{16, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.electron_kinetic_equation_euler_update!","text":"electron_kinetic_equation_euler_update!(fvec, pdf, moments, z, vperp, vpa,\n z_spectral, vpa_spectral, z_advect,\n vpa_advect, scratch_dummy, collisions,\n num_diss_params, dt; evolve_ppar=false)\n\nDo a forward-Euler update of the electron kinetic equation.\n\nWhen evolve_ppar=true is passed, also updates the electron parallel pressure.\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.electron_kinetic_equation_residual!-NTuple{25, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.electron_kinetic_equation_residual!","text":"electronkineticequation_residual! calculates the residual of the (time-independent) electron kinetic equation INPUTS: residual = dummy array to be filled with the residual of the electron kinetic equation OUTPUT: residual = updated residual of the electron kinetic equation\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.implicit_electron_advance!-NTuple{25, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.implicit_electron_advance!","text":"implicit_electron_advance!()\n\nDo an implicit solve which finds: the steady-state electron shape function g_e; the backward-Euler advanced electron pressure which is updated using g_e at the new time-level.\n\nImplicit electron solve includes r-dimension. For 1D runs this makes no difference. In 2D it might or might not be necessary. If the r-dimension is not needed in the implicit solve, we would need to work on the parallelisation. The simplest option would be a non-parallelised outer loop over r, with each nonlinear solve being parallelised over {z,vperp,vpa}. More efficient might be to add an equivalent to the 'anyv' parallelisation used for the collision operator (e.g. 'anyzv'?) to allow the outer r-loop to be parallelised.\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.update_electron_pdf!-NTuple{21, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.update_electron_pdf!","text":"updateelectronpdf is a function that uses the electron kinetic equation to solve for the updated electron pdf\n\nThe electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * pre_factor\n\nINPUTS:\nscratch = `scratch_pdf` struct used to store Runge-Kutta stages\npdf = modified electron pdf @ previous time level = (true electron pdf / dens_e) * vth_e\ndens = electron density\nvthe = electron thermal speed\nppar = electron parallel pressure\nddens_dz = z-derivative of the electron density\ndppar_dz = z-derivative of the electron parallel pressure\ndqpar_dz = z-derivative of the electron parallel heat flux\ndvth_dz = z-derivative of the electron thermal speed\nz = struct containing z-coordinate information\nvpa = struct containing vpa-coordinate information\nz_spectral = struct containing spectral information for the z-coordinate\nvpa_spectral = struct containing spectral information for the vpa-coordinate\nscratch_dummy = dummy arrays to be used for temporary storage\ndt = time step size\nmax_electron_pdf_iterations = maximum number of iterations to use in the solution of the electron kinetic equation\nion_dt = if this is passed, the electron pressure is evolved in a form that results in\n a backward-Euler update on the ion timestep (ion_dt) once the electron\n pseudo-timestepping reaches steady state.\n\nOUTPUT: pdf = updated (modified) electron pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_picard_iteration!-NTuple{13, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_picard_iteration!","text":"use Picard iteration to solve the electron kinetic equation\n\nThe electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * pre_factor Picard iteration uses the previous iteration of the electron pdf to calculate the next iteration: zdot * d(pdf^{i+1})/dz + wpadot^{i} * d(pdf^{i})/dwpa = pdf^{i} * prefactor^{i}\n\nINPUTS: pdf = modified electron pdf @ previous time level = (true electron pdf / dense) * vthe dens = electron density vthe = electron thermal speed ppar = electron parallel pressure ddensdz = z-derivative of the electron density dppardz = z-derivative of the electron parallel pressure dqpardz = z-derivative of the electron parallel heat flux dvthdz = z-derivative of the electron thermal speed z = struct containing z-coordinate information vpa = struct containing vpa-coordinate information zspectral = struct containing spectral information for the z-coordinate vpaspectral = struct containing spectral information for the vpa-coordinate scratchdummy = dummy arrays to be used for temporary storage maxelectronpdfiterations = maximum number of iterations to use in the solution of the electron kinetic equation OUTPUT: pdf = updated (modified) electron pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_shooting_method!-NTuple{16, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_shooting_method!","text":"updateelectronpdfwithshooting_method is a function that using a shooting method to solve for the electron pdf\n\nThe electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * prefactor The shooting method is 'explicit' in z, solving zdoti * (pdf{i+1} - pdf{i})/dz{i} + wpadot{i} * d(pdf{i})/dwpa = pdf{i} * prefactor{i}\n\nINPUTS:\npdf = modified electron pdf @ previous time level = (true electron pdf / dens_e) * vth_e\ndens = electron density\nvthe = electron thermal speed\nppar = electron parallel pressure\nddens_dz = z-derivative of the electron density\ndppar_dz = z-derivative of the electron parallel pressure\ndqpar_dz = z-derivative of the electron parallel heat flux\ndvth_dz = z-derivative of the electron thermal speed\nz = struct containing z-coordinate information\nvpa = struct containing vpa-coordinate information\nvpa_spectral = struct containing spectral information for the vpa-coordinate\nscratch_dummy = dummy arrays to be used for temporary storage\n\nOUTPUT: pdf = updated (modified) electron pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_electron_kinetic_equation/#moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_time_advance!-NTuple{21, Any}","page":"electron_kinetic_equation","title":"moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_time_advance!","text":"updateelectronpdfwithtime_advance is a function that introduces an artifical time derivative to advance the electron kinetic equation until a steady-state solution is reached.\n\nThe electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * pre_factor\n\nINPUTS:\npdf = modified electron pdf @ previous time level = (true electron pdf / dens_e) * vth_e\ndens = electron density\nvthe = electron thermal speed\nppar = electron parallel pressure\nddens_dz = z-derivative of the electron density\ndppar_dz = z-derivative of the electron parallel pressure\ndqpar_dz = z-derivative of the electron parallel heat flux\ndvth_dz = z-derivative of the electron thermal speed\nz = struct containing z-coordinate information\nvpa = struct containing vpa-coordinate information\nz_spectral = struct containing spectral information for the z-coordinate\nvpa_spectral = struct containing spectral information for the vpa-coordinate\nscratch_dummy = dummy arrays to be used for temporary storage\nmax_electron_pdf_iterations = maximum number of iterations to use in the solution of the electron kinetic equation\nio_electron = info struct for binary file I/O\ninitial_time = initial value for the (pseudo-)time\nion_dt = if this is passed, the electron pressure is evolved in a form that results in\n a backward-Euler update on the ion timestep (ion_dt) once the electron\n pseudo-timestepping reaches steady state.\n\nOUTPUT: pdf = updated (modified) electron pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#boundary_conditions","page":"boundary_conditions","title":"boundary_conditions","text":"","category":"section"},{"location":"zz_boundary_conditions/","page":"boundary_conditions","title":"boundary_conditions","text":"Modules = [moment_kinetics.boundary_conditions]","category":"page"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions","text":"Functions for applying boundary conditions\n\n\n\n\n\n","category":"module"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_boundary_conditions!-NTuple{25, Any}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_boundary_conditions!","text":"enforce boundary conditions in vpa and z on the evolved pdf; also enforce boundary conditions in z on all separately evolved velocity space moments of the pdf\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_initial_tapered_zero_incoming!-Tuple{Any, moment_kinetics.coordinates.coordinate, moment_kinetics.coordinates.coordinate}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_initial_tapered_zero_incoming!","text":"Set up an initial condition that tries to be smoothly compatible with the sheath boundary condition for ions, by setting f(±(v_parallel-u0)<0) where u0=0 at the sheath boundaries and for z<0 increases linearly to u0=vpa.L at z=0, while for z>0 increases from u0=-vpa.L at z=0 to zero at the z=z.L/2 sheath.\n\nTo be applied to 'full-f' distribution function on vparallel grid (not wparallel grid).\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_neutral_boundary_conditions!-NTuple{28, Any}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_neutral_boundary_conditions!","text":"enforce boundary conditions on neutral particle distribution function\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_neutral_wall_bc!-NTuple{17, Any}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_neutral_wall_bc!","text":"enforce the wall boundary condition on neutrals; i.e., the incoming flux of neutrals equals the sum of the ion/neutral outgoing fluxes\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_neutral_z_boundary_condition!-Tuple{Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Any, Vararg{AbstractArray{Float64, 5}, 4}}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_neutral_z_boundary_condition!","text":"enforce boundary conditions on neutral particle f in z\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_r_boundary_condition!-Tuple{AbstractArray{Float64, 5}, Any, String, Any, Any, Any, Any, Any, Any, AbstractArray{Float64, 4}, AbstractArray{Float64, 4}, AbstractArray{Float64, 4}, AbstractArray{Float64, 4}, Bool}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_r_boundary_condition!","text":"enforce boundary conditions on f in r\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_v_boundary_condition_local!-NTuple{6, Any}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_v_boundary_condition_local!","text":"\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_vperp_boundary_condition!","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_vperp_boundary_condition!","text":"enforce zero boundary condition at vperp -> infinity\n\n\n\n\n\n","category":"function"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_z_boundary_condition!-Tuple{Any, Any, Any, Any, Any, Any, String, Any, Any, Any, Any, Any, Vararg{AbstractArray{Float64, 4}, 4}}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_z_boundary_condition!","text":"enforce boundary conditions on ion particle f in z\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_z_boundary_condition_moments!-Tuple{Any, Any, String}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_z_boundary_condition_moments!","text":"enforce the z boundary condition on the evolved velocity space moments of f\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.enforce_zero_incoming_bc!-NTuple{6, Any}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.enforce_zero_incoming_bc!","text":"enforce a zero incoming BC in z for given species pdf at each radial location\n\n\n\n\n\n","category":"method"},{"location":"zz_boundary_conditions/#moment_kinetics.boundary_conditions.vpagrid_to_dzdt-NTuple{5, Any}","page":"boundary_conditions","title":"moment_kinetics.boundary_conditions.vpagrid_to_dzdt","text":"create an array of dz/dt values corresponding to the given vpagrid values\n\n\n\n\n\n","category":"method"},{"location":"zz_r_advection/#r_advection","page":"r_advection","title":"r_advection","text":"","category":"section"},{"location":"zz_r_advection/","page":"r_advection","title":"r_advection","text":"Modules = [moment_kinetics.r_advection]","category":"page"},{"location":"zz_r_advection/#moment_kinetics.r_advection","page":"r_advection","title":"moment_kinetics.r_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_r_advection/#moment_kinetics.r_advection.adjust_advection_speed!-NTuple{5, Any}","page":"r_advection","title":"moment_kinetics.r_advection.adjust_advection_speed!","text":"\n\n\n\n","category":"method"},{"location":"zz_r_advection/#moment_kinetics.r_advection.r_advection!-NTuple{14, Any}","page":"r_advection","title":"moment_kinetics.r_advection.r_advection!","text":"do a single stage time advance (potentially as part of a multi-stage RK scheme)\n\n\n\n\n\n","category":"method"},{"location":"zz_r_advection/#moment_kinetics.r_advection.unnormalize_pdf!-NTuple{6, Any}","page":"r_advection","title":"moment_kinetics.r_advection.unnormalize_pdf!","text":"\n\n\n\n","category":"method"},{"location":"zz_r_advection/#moment_kinetics.r_advection.update_speed_r!-NTuple{12, Any}","page":"r_advection","title":"moment_kinetics.r_advection.update_speed_r!","text":"calculate the advection speed in the r-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"moment_kinetic_equations/#Moment-kinetic-equations","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"","category":"section"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"The following are partial notes on the derivation of the equations being solved by moment_kinetics. It would be useful to expand them with more details from the Excalibur/Neptune reports. Equation references give the report number and equation number, e.g. (TN-04;1) is equation (1) from report TN-04.pdf.","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"The drift kinetic equation (DKE), marginalised over v_perp, for ions is, adding ionization and a source term to the form in (TN-04;1),","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_ipartial t\n +v_fracpartial f_ipartial z\n -fracemfracpartialphipartial zfracpartial f_ipartial v_\n = -R_mathrminleft(n_nf_i-n_if_nright)+R_mathrmionn_if_n\n + S_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"and for neutrals, adding ionization and a source term to (TN-04;2)","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_npartial t\n +v_fracpartial f_npartial z\n = -R_mathrminleft(n_if_n-n_nf_iright)-R_mathrmionn_if_n\n + S_n\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"Using the normalizations (TN04;5-11)","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n tildef_s doteq f_sfracc_ssqrtpiN_e\n tildet doteq tfracc_sL_z\n tildez doteqfraczL_z\n tildev_ doteqfracv_c_s\n tilden_s doteqfracn_sN_e\n tildephi doteqfracephiT_e\n tildeR_mathrmin doteq R_mathrminfracN_eL_zc_s\n tildeR_mathrmion doteq R_mathrmionfracN_eL_zc_s\n tildeS_i = S_i fracc_ssqrtpiN_e fracL_zc_s = S_i fracL_zsqrtpiN_e\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"with c_sdoteqsqrt2T_em_s where L_z, N_e and T_e are constant reference parameters, the ion DKE is","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartialtildef_ipartialtildet\n + tildev_fracpartialtildef_ipartialtildez\n - frac12fracpartialtildephipartialtildez\n fracpartialtildef_ipartialtildev_\n = -tildeR_inleft(tilden_ntildef_i-tilden_itildef_nright)\n + tildeR_mathrmiontilden_itildef_n\n + tildeS_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"and the neutral DKE is","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartialtildef_npartialtildet\n + v_fracpartialtildef_npartialtildez\n = -tildeR_inleft(tilden_itildef_n-tilden_ntildef_iright)\n - tildeR_mathrmiontilden_itildef_n\n + tildeS_n\nendalign","category":"page"},{"location":"moment_kinetic_equations/#Moment-equations","page":"Moment kinetic equations","title":"Moment equations","text":"","category":"section"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"Recalling the definitions (TN-04;15,29,63-66), but writing the integral in the energy equation over tildev_ instead of w_,","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n tilden_s\n = frac1sqrtpiint dtildev_tildef_s\n\n tilden_stildeu_s\n = frac1sqrtpiint dtildev_tildev_tildef_s\n\n tildep_s\n = frac1sqrtpiint dtildev_left(tildev_\n - tildeu_sright)^2tildef_s\n = frac1sqrtpiint dtildev_tildev_^2tildef_s\n - tilden_stildeu_s^2\n\n tildeq_s\n = frac1sqrtpiint dtildev_\n left(tildev_-tildeu_sright)^3tildef_s\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n tildeq_s\n = frac1sqrtpiint dtildev_tildev_^3tildef_s\n - 3tildeu_sfrac1sqrtpiint dv_v_^2f_s\n + 3u_s^2frac1sqrtpiint dv_v_f_s\n - u_s^3frac1sqrtpiint dv_f_s \n\n = frac1sqrtpiint dtildev_tildev_^3tildef_s\n - 3tildeu_sleft(tildep_s+tilden_stildeu_s^2right)\n + 3tildeu_s^2tilden_stildeu_s-tildeu_s^3tilden_s\nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n tildeq_s\n = frac1sqrtpiint dtildev_tildev_^3tildef_s\n - 3tildeu_stildep_s\n - tilden_stildeu_s^3\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"we can take moments of the ion DKE to give ion moment equations (dropping tildes from here on)","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial n_ipartial t+fracpartialleft(n_iu_iright)partial z\n = -R_inleft(n_nn_i-n_in_nright)+R_mathrmionn_in_n\n + int dv_parallel S_i\n\n = R_mathrmionn_in_n + int dv_parallel S_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartialleft(n_iu_iright)partial t + fracpartialleft(p_i\n + n_iu_i^2right)partial z + frac12fracpartialphipartial zn_i\n = -R_inleft(n_nn_iu_i - n_in_nu_nright)\n + R_mathrmionn_in_nu_n \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n n_ifracpartial u_ipartial t + u_ifracpartial n_ipartial t\n + fracpartial p_ipartial z\n + u_ifracpartialleft(n_iu_iright)partial z\n + n_iu_ifracpartial u_ipartial z\n + frac12fracpartialphipartial zn_i\n = -R_inleft(n_nn_iu_i - n_in_nu_nright)\n + R_mathrmionn_in_nu_n \n\n n_ifracpartial u_ipartial t\n + u_ileft(R_mathrmionn_in_n + int dv_parallel S_iright)\n + fracpartial p_ipartial z + n_iu_ifracpartial u_ipartial z\n + frac12fracpartialphipartial zn_i\n = -R_inleft(n_nn_iu_i - n_in_nu_nright)\n + R_mathrmionn_in_nu_n \nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial u_ipartial t + frac1n_ifracpartial p_ipartial z\n + u_ifracpartial u_ipartial z + frac12fracpartialphipartial z\n = -R_inn_nleft(u_i-u_nright)\n + R_mathrmionn_in_nleft(u_n-u_iright)\n - fracu_in_i int dv_parallel S_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartialleft(p_i + n_iu_i^2right)partial t\n + fracpartialleft(q_i + 3u_ip_i\n + n_iu_i^3right)partial z + fracpartialphipartial zn_iu_i \n = -R_inleft(n_nleft(p_i + n_iu_i^2right)\n - n_ileft(p_n + n_nu_n^2right)right)\n + R_mathrmionn_ileft(p_n+n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_i \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n fracpartial p_ipartial t\n + frac1n_ifracpartialleft(n_iu_iright)^2partial t\n - fracleft(n_iu_iright)^2n_i^2fracpartial n_ipartial t\n + fracpartialleft(q_i + 3u_ip_i\n + n_iu_i^3right)partial z + fracpartialphipartial zn_iu_i\n = -R_inleft(n_nleft(p_i + n_iu_i^2right)\n - n_ileft(p_n + n_nu_n^2right)right)\n + R_mathrmionn_ileft(p_n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_i \n\n fracp_ipartial t + 2u_ifracpartial n_iu_ipartial t\n - u_i^2fracpartial n_ipartial t + fracpartialleft(q_i\n + 3u_ip_i + n_iu_i^3right)partial z\n + fracpartialphipartial zn_iu_i\n = -R_inleft(n_nleft(p_i + n_iu_i^2right)\n - n_ileft(p_n + n_nu_n^2right)right)\n + R_mathrmionn_ileft(p_n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_i \n\n fracpartial p_ipartial t + 2u_ileft(-fracpartial p_ipartial z\n - fracpartialleft(n_iu_i^2right)partial z\n - frac12fracpartialphipartial zn_i\n - R_inleft(n_nn_iu_i - n_in_nu_nright)\n + R_mathrmionn_in_nu_nright) \n -u_i^2left(-fracpartialleft(n_iu_iright)partial z\n + R_mathrmionn_in_n + int dv_parallel S_iright)\n + fracpartial q_ipartial z\n + fracpartialleft(3u_ip_iright)partial z\n + fracpartialleft(n_iu_i^3right)partial z\n + fracpartialphipartial zn_iu_i\n = -R_inleft(n_nleft(p_i + n_iu_i^2right)\n - n_ileft(p_n + n_nu_n^2right)right)\n + R_mathrmionn_ileft(p_n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_i \n\n fracpartial p_ipartial t + u_ifracpartial p_ipartial z\n + 3p_ifracpartial u_ipartial z + fracpartial q_ipartial z\n = -R_inleft(n_nleft(p_i + n_iu_i^2right) - n_ileft(p_n\n + n_nu_n^2right) - 2u_ileft(n_nn_iu_i - n_in_nu_nright)right) \n quad + R_mathrmionn_ileft(p_n + n_nu_n^2 + n_nu_i^2\n - 2n_nu_iu_nright)\n + int dv_parallel v_parallel^2 S_i + u_i^2 int dv_parallel S_i \n\n fracpartial p_ipartial t + u_ifracpartial p_ipartial z\n + 3p_ifracpartial u_ipartial z + fracpartial q_ipartial z\n = -R_inleft(n_np_i - n_ip_n - n_in_nleft(u_i^2 + u_n^2\n - 2u_iu_nright)right) + R_mathrmionn_ileft(p_n + n_nleft(u_n\n - u_iright)^2right) \n quad + int dv_parallel v_parallel^2 S_i + u_i^2 int dv_parallel S_i \nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial p_ipartial t + u_ifracpartial p_ipartial z\n + 3p_ifracpartial u_ipartial z + fracpartial q_ipartial z \n = -R_inleft(n_np_i - n_ip_n\n - n_in_nleft(u_i - u_nright)^2right)\n + R_mathrmionn_ileft(p_n + n_nleft(u_n - u_iright)^2right) \n quad + int dv_parallel v_parallel^2 S_i + u_i^2 int dv_parallel S_i \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"and of the neutral DKE to give neutral moment equations","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial n_npartial t + fracpartialleft(n_nu_nright)partial z\n = -R_ileft(n_in_n - n_nn_iright) - R_mathrmionn_in_n\n + int dv_parallel S_n \n\n =-R_mathrmionn_in_n + int dv_parallel S_n\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartialleft(n_nu_nright)partial t\n + fracpartialleft(p_n + n_nu_n^2right)partial z\n = -R_inleft(n_in_nu_n - n_nn_iu_iright)\n - R_mathrmionn_in_nu_n \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n n_nfracpartial u_npartial t + u_nfracpartial n_npartial t\n + fracpartial p_npartial z\n + u_nfracpartialleft(n_nu_nright)partial z\n + n_nu_nfracpartial u_npartial z\n = -R_inleft(n_in_nu_n - n_nn_iu_iright)\n - R_mathrmionn_in_nu_n \n\n n_nfracpartial u_npartial t\n + u_nleft(-R_mathrmionn_in_n + int dv_parallel S_nright)\n + fracpartial p_npartial z\n + n_nu_sfracpartial u_npartial z\n = -R_inleft(n_in_nu_n - n_nn_iu_iright)\n - R_mathrmionn_in_nu_n \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial u_npartial t + frac1n_nfracpartial p_npartial z\n + u_nfracpartial u_npartial z\n = -R_inn_ileft(u_n - u_iright) - fracu_nn_n int dv_parallel S_n\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartialleft(p_n + n_nu_n^2right)partial t\n + fracpartialleft(q_n + 3u_np_n\n + n_nu_n^3right)partial z + q_nfracpartialphipartial zn_nu_n \n = -R_inleft(n_ileft(p_n + n_nu_n^2right) - n_nleft(p_i\n + n_iu_i^2right)right)\n - R_mathrmionn_ileft(p_n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_n \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n fracpartial p_npartial t\n + frac1n_nfracpartialleft(n_nu_nright)^2partial t\n - fracleft(n_nu_nright)^2n_n^2fracpartial n_npartial t\n + fracpartialleft(q_n + 3u_np_n + n_nu_n^3right)partial z\n + q_nfracpartialphipartial zn_nu_n\n =-R_inleft(n_ileft(p_n + n_nu_n^2right) - n_nleft(p_i\n + n_iu_i^2right)right)\n - R_mathrmionn_ileft(p_n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_n \n\n fracpartial p_npartial t + 2u_nfracpartial n_nu_npartial t\n - u_n^2fracpartial n_npartial t + fracpartialleft(q_n\n + 3u_np_n + n_nu_n^3right)partial z\n + q_nfracpartialphipartial zn_nu_n\n = -R_inleft(n_ileft(p_n + n_nu_n^2right) - n_nleft(p_i\n + n_iu_i^2right)right) - R_mathrmionn_ileft(p_n\n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_n \n\n fracpartial p_npartial t\n + 2u_nleft(-fracpartial p_npartial z\n - fracpartialleft(n_nu_n^2right)partial z\n - fracq_n2fracpartialphipartial zn_n\n - R_inleft(n_in_nu_n - n_nn_iu_iright)\n - R_mathrmionn_in_nu_nright) \n - u_n^2left(-fracpartialleft(n_nu_nright)partial z\n - R_mathrmionn_in_n + int dv_parallel S_nright)\n + fracpartial q_npartial z\n + fracpartialleft(3u_np_nright)partial z\n + fracpartialleft(n_nu_n^3right)partial z\n = -R_inleft(n_ileft(p_n + n_nu_n^2right) - n_nleft(p_i\n + n_iu_i^2right)right)\n - R_mathrmionn_ileft(p_n + n_nu_n^2right)\n + int dv_parallel v_parallel^2 S_n \n\n fracpartial p_npartial t + u_nfracpartial p_npartial z\n + 3p_nfracpartial u_npartial z + fracpartial q_npartial z\n = -R_inleft(n_ileft(p_n + n_nu_n^2right) - n_nleft(p_i\n + n_iu_i^2right) - 2u_nleft(n_in_nu_n\n - n_nn_iu_iright)right) - R_mathrmionn_ileft(p_n\n + n_nu_n^2 + n_nu_n^2 - 2n_nu_nu_nright)\n + int dv_parallel v_parallel^2 S_n + u_n^2int dv_parallel S_n \n\n fracpartial p_npartial t + u_nfracpartial p_npartial z\n + 3p_nfracpartial u_npartial z + fracpartial q_npartial z\n = -R_inleft(n_ip_n - n_np_i - n_nn_ileft(u_n^2 + u_i^2\n - 2u_nu_iright)right) - R_mathrmionn_ip_n\n + int dv_parallel v_parallel^2 S_n + u_n^2int dv_parallel S_n \nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial p_npartial t + u_nfracpartial p_npartial z\n + 3p_nfracpartial u_npartial z + fracpartial q_npartial z \n = -R_inleft(n_ip_n - n_np_i\n - n_nn_ileft(u_n - u_iright)^2right) - R_mathrmionn_ip_n \n quad + int dv_parallel v_parallel^2 S_n + u_n^2int dv_parallel S_n \nendalign","category":"page"},{"location":"moment_kinetic_equations/#Kinetic-equation","page":"Moment kinetic equations","title":"Kinetic equation","text":"","category":"section"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"For the moment-kinetic equation for the normalized distribution function","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\ng_s(w_s) = fracv_mathrmthsn_sf_s(v_(w_s))\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"we transform to the normalized velocity coordinate","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\nw_s = fracv_ - u_sv_mathrmths\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"The derivatives transform as","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n leftfracpartial f_spartial tright_zv\n rightarrowleftfracpartial f_spartial tright_zw\n - frac1v_mathrmthsfracpartial u_spartial tleftfracpartial f_spartial w_sright_zt\n - fracw_sv_mathrmthsfracpartial v_mathrmthspartial tleftfracpartial f_spartial w_sright_zt\n\n leftfracpartial f_spartial zright_zv\n rightarrowleftfracpartial f_spartial zright_tw\n - frac1v_mathrmthsfracpartial u_spartial zleftfracpartial f_spartial w_sright_zt\n - fracw_sv_mathrmthsfracpartial v_mathrmthspartial zleftfracpartial f_spartial w_sright_zwt\n\n leftfracpartial f_spartial v_right_zv\n rightarrowfrac1v_mathrmthsleftfracpartial f_spartial w_sright_zt\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"We use an energy equation that evolves p_s not v_mathrmths, so use","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n v_mathrmths^2 = 2fracp_sn_s \n\n Rightarrow v_mathrmthsfracpartial v_mathrmthspartial t\n = frac1n_sfracpartial p_spartial t\n - fracp_sn_s^2fracpartial n_spartial t\n\n v_mathrmthsfracpartial v_mathrmthspartial z\n = frac1n_sfracpartial p_spartial z\n - fracp_sn_s^2fracpartial n_spartial z\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"to convert the transformations above to","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n leftfracpartial f_spartial tright_zv\n rightarrowleftfracpartial f_spartial tright_zw\n - frac1v_mathrmthsfracpartial u_spartial tleftfracpartial f_spartial w_sright_zw\n - fracw_sv_mathrmths^2left(frac1n_sfracpartial p_spartial t\n - fracp_sn_s^2fracpartial n_spartial tright)leftfracpartial f_spartial w_sright_zw\n\n = leftfracpartial f_spartial tright_zw\n - frac1v_mathrmthsfracpartial u_spartial tleftfracpartial f_spartial w_sright_zw\n - fracw_s2left(frac1p_sfracpartial p_spartial t\n - frac1n_sfracpartial n_spartial tright)leftfracpartial f_spartial w_sright_zw\n\n leftfracpartial f_spartial zright_zv\n rightarrowleftfracpartial f_spartial zright_zw\n - frac1v_mathrmthsfracpartial u_spartial zleftfracpartial f_spartial w_sright_zw\n - fracw_sv_mathrmths^2left(frac1n_sfracpartial p_spartial z\n - fracp_sn_s^2fracpartial n_spartial zright)leftfracpartial f_spartial w_sright_zw\n\n = leftfracpartial f_spartial zright_zw\n - frac1v_mathrmthsfracpartial u_spartial zleftfracpartial f_spartial w_sright_zw\n - fracw_s2left(frac1p_sfracpartial p_spartial z\n - frac1n_sfracpartial n_spartial zright)leftfracpartial f_spartial w_sright_zw\n\n leftfracpartial f_spartial v_right_zv\n rightarrowfrac1v_mathrmthsleftfracpartial f_spartial w_sright_zw\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"Using these transformations gives the ion DKE in a form similar to (TN-04;55) (but writing out dotw_ in full here, and not using the moment equations for the moment)","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_ipartial t\n - frac1v_mathrmthifracpartial u_ipartial tfracpartial f_ipartial w_i\n - fracw_i2left(frac1p_ifracpartial p_ipartial t\n - frac1n_ifracpartial n_ipartial tright)fracpartial f_ipartial w_i \n + left(v_mathrmthiw_i + u_iright)left(fracpartial f_ipartial z\n - frac1v_mathrmthifracpartial u_ipartial zfracpartial f_ipartial w_i\n - fracw_i2left(frac1p_ifracpartial p_ipartial z\n - frac1n_ifracpartial n_ipartial zright)fracpartial f_ipartial w_iright) \n - frac12v_mathrmthifracpartialphipartial zfracpartial f_ipartial w_i \n = -R_inleft(n_nf_i - n_if_nright) + R_mathrmionn_if_n + S_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n fracpartial f_ipartial t + left(v_mathrmthiw_i\n + u_iright)fracpartial f_ipartial z\n - frac1v_mathrmthifracpartial u_ipartial tfracpartial f_ipartial w_i\n - fracw_i2left(frac1p_ifracpartial p_ipartial t\n - frac1n_ifracpartial n_ipartial tright)fracpartial f_ipartial w_i\n + left(v_mathrmthiw_i\n + u_iright)left(-frac1v_mathrmthifracpartial u_ipartial zfracpartial f_ipartial w_i\n - fracw_i2left(frac1p_ifracpartial p_ipartial z\n - frac1n_ifracpartial n_ipartial zright)fracpartial f_ipartial w_iright)\n - frac12v_mathrmthifracpartialphipartial zfracpartial f_ipartial w_i\n = -R_inleft(n_nf_i - n_if_nright) + R_mathrmionn_if_n + S_i \n\n fracpartial f_ipartial t + left(v_mathrmthiw_i\n + u_iright)fracpartial f_ipartial z\n + left-frac1v_mathrmthifracpartial u_ipartial t\n - fracw_i2left(frac1p_ifracpartial p_ipartial t\n - frac1n_ifracpartial n_ipartial tright)\n + left(v_mathrmthiw_i\n + u_iright)left(-frac1v_mathrmthifracpartial u_ipartial z\n - fracw_i2left(frac1p_ifracpartial p_ipartial z\n - frac1n_ifracpartial n_ipartial zright)right)\n - frac12v_mathrmthifracpartialphipartial zrightfracpartial f_ipartial w_i\n = -R_inleft(n_nf_i - n_if_nright) + R_mathrmionn_if_n + S_i \nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_ipartial t + left(v_mathrmthiw_i\n + u_iright)fracpartial f_ipartial z \n + left-frac1v_mathrmthileft(fracpartial u_ipartial t\n + left(v_mathrmthiw_i + u_iright)fracpartial u_ipartial z\n + frac12fracpartialphipartial zright)right \n qquad - fracw_i2frac1p_ileft(fracpartial p_ipartial t\n + left(v_mathrmthiw_i + u_iright)fracpartial p_ipartial zright) \n qquad + fracw_i2frac1n_ileft(fracpartial n_ipartial t\n + left(v_mathrmthiw_i\n + leftu_iright)fracpartial n_ipartial zright)rightfracpartial f_ipartial w_i \n = -R_inleft(n_nf_i - n_if_nright) + R_mathrmionn_if_n + S_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"and the neutral DKE","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_npartial t\n - frac1v_mathrmthnfracpartial u_npartial tfracpartial f_npartial w_n\n - fracw_n2left(frac1p_nfracpartial p_npartial t\n - frac1n_nfracpartial n_npartial tright)fracpartial f_npartial w_n \n + left(v_mathrmthnw_n + u_nright)left(fracpartial f_npartial z\n - frac1v_mathrmthnfracpartial u_npartial zfracpartial f_npartial w_n\n - fracw_n2left(frac1p_nfracpartial p_npartial z\n - frac1n_nfracpartial n_npartial zright)fracpartial f_npartial w_nright) \n = -R_inleft(n_if_n - n_nf_iright) - R_mathrmionn_if_n + S_n \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n fracpartial f_npartial t + left(v_mathrmthnw_n\n + u_nright)fracpartial f_npartial z\n - frac1v_mathrmthnfracpartial u_npartial tfracpartial f_npartial w_n\n - fracw_n2left(frac1p_nfracpartial p_npartial t\n - frac1n_nfracpartial n_npartial tright)fracpartial f_npartial w_n\n + left(v_mathrmthnw_n\n + u_nright)left(-frac1v_mathrmthnfracpartial u_npartial zfracpartial f_npartial w_n\n - fracw_n2left(frac1p_nfracpartial p_npartial z\n - frac1n_nfracpartial n_npartial zright)fracpartial f_npartial w_nright)\n = -R_inleft(n_if_n - n_nf_iright) - R_mathrmionn_if_n + S_n \n\n fracpartial f_npartial t + left(v_mathrmthnw_n\n + u_nright)fracpartial f_npartial z\n + left-frac1v_mathrmthnfracpartial u_npartial t\n - fracw_n2left(frac1p_nfracpartial p_npartial t\n - frac1n_nfracpartial n_npartial tright) + left(v_mathrmthnw_n\n + u_nright)left(-frac1v_mathrmthnfracpartial u_npartial z\n - fracw_n2left(frac1p_nfracpartial p_npartial z\n - frac1n_nfracpartial n_npartial zright)right)rightfracpartial f_npartial w_n\n = -R_inleft(n_if_n - n_nf_iright) - R_mathrmionn_if_n + S_n \nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_npartial t + left(v_mathrmthnw_n\n + u_nright)fracpartial f_npartial z \n + left-frac1v_mathrmthnleft(fracpartial u_npartial t\n + left(v_mathrmthnw_n+u_nright)fracpartial u_npartial zright)right \n qquad - fracw_n2frac1p_nleft(fracpartial p_npartial t\n + left(v_mathrmthnw_n + u_nright)fracpartial p_npartial zright) \n qquad + leftfracw_n2frac1n_nleft(fracpartial n_npartial t\n + left(v_mathrmthnw_n\n + u_nright)fracpartial n_npartial zright)rightfracpartial f_npartial w_n \n = -R_inleft(n_if_n - n_nf_iright) - R_mathrmionn_if_n + S_n\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"We also normalise f and write the DKEs for","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n g_s =fracv_mathrmthsn_sf_s \n\n Rightarrowfracpartial f_spartial t\n = fracn_sv_mathrmthsfracpartial g_spartial t\n + fracg_sv_mathrmthsfracpartial n_spartial t\n - fracn_sg_sv_mathrmths^2fracpartial v_mathrmthspartial t \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n fracpartial f_spartial t\n = fracn_sv_mathrmthsfracpartial g_spartial t\n + fracg_sv_mathrmthsfracpartial n_spartial t\n - fracn_sg_sv_mathrmths^3left(frac1n_sfracpartial p_spartial t\n - fracp_sn_s^2fracpartial n_spartial tright) \n\n = fracn_sv_mathrmthsfracpartial g_spartial t\n + fracg_sv_mathrmthsfracpartial n_spartial t\n - fracg_sn_s2v_mathrmthsp_sfracpartial p_spartial t\n + fracg_s2v_mathrmthsfracpartial n_spartial t \nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial f_spartial t\n = fracn_sv_mathrmthsfracpartial g_spartial t\n + frac3g_s2v_mathrmthsfracpartial n_spartial t\n - fracg_sn_s2v_mathrmthsp_sfracpartial p_spartial t \n\n fracpartial f_spartial w_s\n = fracn_sv_mathrmthsfracpartial g_spartial w_s\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"For brevity, do the following manipulations for g_s rather than for ions and neutrals separately by using q_i=1, q_n=0 and with the +'ve sign for the ion DKE and -'ve sign for the neutral DKE.","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracn_sv_mathrmthsfracpartial g_spartial t\n + frac3g_s2v_mathrmthsfracpartial n_spartial t\n - fracg_sn_s2v_mathrmthsp_sfracpartial p_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial f_spartial z \n + left-frac1v_mathrmthsleft(fracpartial u_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial u_spartial z\n + fracq_s2fracpartialphipartial zright)right \n qquad - fracw_s2frac1p_sleft(fracpartial p_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial p_spartial zright) \n qquad + leftfracw_s2frac1n_sleft(fracpartial n_spartial t\n + left(v_mathrmthsw_s\n + u_sright)fracpartial n_spartial zright)rightfracn_sv_mathrmthsfracpartial g_spartial w_s \n = -R_ssleft(n_sfracn_sv_mathrmthsg_s\n - n_sfracn_sv_mathrmthsg_sright)\n pm R_mathrmionn_ifracn_nv_mathrmthng_n\n + S_s \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + frac3g_s2n_sfracpartial n_spartial t\n - fracg_s2p_sfracpartial p_spartial t \n + left-frac1v_mathrmthsleft(fracpartial u_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial u_spartial z\n + fracq_s2fracpartialphipartial zright)\n - fracw_s2frac1p_sleft(fracpartial p_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial p_spartial zright)\n + fracw_s2frac1n_sleft(fracpartial n_spartial t\n + left(v_mathrmthsw_s\n + u_sright)fracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n\n + fracv_mathrmthsn_s S_s \n\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + frac3g_s2n_sfracpartial n_spartial t\n - fracg_s2p_sfracpartial p_spartial t \n + left-frac1v_mathrmthsleft(fracn_sn_sfracpartial u_spartial t\n + fracn_sn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial u_spartial z\n + fracu_sn_sleft(fracpartial npartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial npartial zright)\n + fracq_s2fracpartialphipartial zright)\n + fracu_sn_sv_mathrmthsleft(fracpartial npartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial npartial zright)\n - fracw_s2frac1p_sleft(fracpartial p_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial p_spartial zright)\n + fracw_s2frac1n_sleft(fracpartial n_spartial t\n + left(v_mathrmthsw_s\n + u_sright)fracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n\n + fracv_mathrmthsn_s S_s \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + frac3g_s2n_sfracpartial n_spartial t\n - fracg_s2p_sfracpartial p_spartial t \n + left-frac1n_sv_mathrmthsleft(fracpartial n_su_spartial t\n + left(v_mathrmthsw_s + u_sright)left(n_sfracpartial u_spartial z\n + u_sfracpartial n_spartial zright)\n + fracq_s2n_sfracpartialphipartial zright)right \n qquad + fracu_sn_sv_mathrmthsleft(fracpartial n_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial n_spartial zright)\n - fracw_s2frac1p_sleft(fracpartial p_spartial t\n + left(v_mathrmthsw_s + u_sright)fracpartial p_spartial zright) \n qquad left+ fracw_s2frac1n_sleft(fracpartial n_spartial t\n + left(v_mathrmthsw_s\n + u_sright)fracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n\n + fracv_mathrmthsn_s S_s\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"So then if we use the moment equations we can rewrite the DKE as","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + frac3g_s2n_sfracpartial n_spartial t\n - fracg_s2p_sfracpartial p_spartial t \n + left-frac1n_sv_mathrmthsleft(fracpartial n_su_spartial t\n + u_sleft(n_sfracpartial u_spartial z\n + u_sfracpartial n_spartial zright)\n - frac12n_sE_\n + v_mathrmthsw_sleft(n_sfracpartial u_spartial z\n + u_sfracpartial n_spartial zright)right)right \n qquad + fracu_sn_sv_mathrmthsleft(fracpartial n_spartial t\n + u_sfracpartial n_spartial z\n + v_mathrmthsw_sfracpartial n_spartial zright) \n qquad-fracw_s2frac1p_sleft(fracpartial p_spartial t\n + u_sfracpartial p_spartial z\n + v_mathrmthsw_sfracpartial p_spartial zright) \n qquadleft + fracw_s2frac1n_sleft(fracpartial n_spartial t\n + u_sfracpartial n_spartial z\n + v_mathrmthsw_sfracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n\n + fracv_mathrmthsn_s S_s \nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + frac3g_s2n_sleft(pm R_mathrmionn_in_n + int dv_parallel S_s\n - u_sfracpartial n_spartial z\n - n_sfracpartial u_spartial zright) \n -fracg_s2p_sleft(-u_sfracpartial p_spartial z\n - fracpartial q_spartial z\n - 3p_sfracpartial u_spartial z\n - R_ssleft(n_sp_s - n_sp_s\n - m_sn_sn_sleft(u_s - u_sright)^2right)\n pm R_mathrmionn_ileft(p_n + m_sn_nleft(u_n - u_sright)^2right)\n + int dv_parallel v_parallel^2 S_s + u_s^2 int dv_parallel S_s right) \n + left-frac1n_sv_mathrmthsleft(-underbracecanceln_su_sfracpartial u_spartial z_A\n - fracpartial p_spartial z\n + R_ssn_sn_sleft(u_s - u_sright)\n pm R_mathrmionn_in_nu_n\n + v_mathrmthsw_sleft(underbracecanceln_sfracpartial u_spartial z_B\n + underbracecancelu_sfracpartial n_spartial z_Cright)right)right \n quad + fracu_sn_sv_mathrmthsleft(pm R_mathrmionn_in_n + int dv_parallel S_s\n - underbracecanceln_sfracpartial u_spartial z_A\n + underbracecancelv_mathrmthsw_sfracpartial n_spartial z_Cright) \n quad-fracw_s2frac1p_sleft(-fracpartial q_spartial z\n - underbracecancel3p_sfracpartial u_spartial z_B\n - R_ssleft(n_sp_s - n_sp_s\n - m_sn_sn_sleft(u_s - u_sright)^2right)\n pm R_mathrmionn_ileft(p_n + m_sn_nleft(u_n\n - u_sright)^2right) + int dv_parallel v_parallel^2 S_s + u_s^2 int dv_parallel S_s\n + v_mathrmthsw_sfracpartial p_spartial zright) \n quadleft + fracw_s2frac1n_sleft(pm R_mathrmionn_in_n + int dv_parallel S_s\n - underbracecanceln_sfracpartial u_spartial z_B\n + v_mathrmthsw_sfracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n\n + fracv_mathrmthsn_s S_s \n\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + frac3g_s2n_sleft(pm R_mathrmionn_in_n + int dv_parallel S_s\n - u_sfracpartial n_spartial z - n_sfracpartial u_spartial zright) \n -fracg_s2p_sleft(-u_sfracpartial p_spartial z\n - fracpartial q_spartial z - 3p_sfracpartial u_spartial z\n - R_ssleft(n_sp_s - n_sp_s\n - m_sn_sn_sleft(u_s - u_sright)^2right)\n pm R_mathrmionn_ileft(p_n + m_sn_nleft(u_n - u_sright)^2right)\n + int dv_parallel v_parallel^2 S_s + u_s^2 int dv_parallel S_sright) \n + left-frac1n_sv_mathrmthsleft(-fracpartial p_spartial z\n + R_ssn_sn_sleft(u_s - u_sright)pm R_mathrmionn_in_nu_nright)right \n quad + fracu_sn_sv_mathrmthsleft(pm R_mathrmionn_in_n + int dv_parallel S_sright) \n quad-fracw_s2frac1p_sleft(-fracpartial q_spartial z\n - R_ssleft(n_sp_s - n_sp_s\n - m_sn_sn_sleft(u_s - u_sright)^2right)\n pm R_mathrmionn_ileft(p_n + m_sn_nleft(u_n\n - u_sright)^2right) + int dv_parallel v_parallel^2 S_s + u_s^2 int dv_parallel S_s\n + v_mathrmthsw_sfracpartial p_spartial zright) \n quadleft + fracw_s2frac1n_sleft(pm R_mathrmionn_in_n + int dv_parallel S_s\n + v_mathrmthsw_sfracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n\n + fracv_mathrmthsn_s S_s\n\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + g_sleft(pmfrac32R_mathrmionn_ifracn_nn_s\n + frac32n_sint dv_parallel S_s\n - frac3u_s2n_sfracpartial n_spartial zright) \n + g_sleft(fracu_s2p_sfracpartial p_spartial z\n + frac12p_sfracpartial q_spartial z\n + frac12p_sR_ssleft(n_sp_s - n_sp_s\n - n_sn_sleft(u_s - u_sright)^2right)\n mpfrac12R_mathrmionfracn_ip_sleft(p_n\n + n_nleft(u_n - u_sright)^2right)\n - frac12p_parallelsint dv_parallel v_parallel^2 S_s - fracu_s^22p_parallelsint dv_parallel S_sright) \n + left-frac1n_sv_mathrmthsleft(-fracpartial p_spartial z\n + R_ssn_sn_sleft(u_s - u_sright)\n pm R_mathrmionn_in_nleft(u_n - u_sright) - u_sint dv_parallel S_sright)right \n quad-fracw_s2frac1p_sleft(-fracpartial q_spartial z\n - R_ssleft(n_sp_s - n_sp_s\n - n_sn_sleft(u_s - u_sright)^2right)\n + int dv_parallel v_parallel^2 S_s + u_s^2 int dv_parallel S_s\n + v_mathrmthsw_sfracpartial p_spartial zright) \n quadmpfracw_s2R_mathrmionn_ileft(fracp_np_s\n - fracn_nn_s + fracn_np_sleft(u_n - u_sright)^2right) \n quadleft + fracw_s2frac1n_sleft(int dv_parallel S_s + v_mathrmthsw_sfracpartial n_spartial zright)rightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n + fracv_mathrmthsn_s S_s\nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"and finally using","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign*\n fracu_sv_mathrmthsfracpartial v_mathrmthspartial z\n =u_ssqrtfracn_sp_sfracpartialpartial zsqrtfracp_sn_s \n = fracu_s2left(frac1p_sfracpartial p_spartial z\n - frac1n_sfracpartial n_spartial zright)\nendalign*","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"gives","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"
      ","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n Rightarrow fracpartial g_spartial t\n + fracv_mathrmthsn_sleft(v_mathrmthsw_s\n + u_sright)fracpartial f_spartial z\n + left(pmfrac32R_mathrmionn_ifracn_nn_s\n + frac32n_s int dv_parallel S_s\n - fracu_sn_sfracpartial n_spartial zright)g_s \n + left(fracu_sv_mathrmthsfracpartial v_mathrmthspartial z\n + frac12p_sfracpartial q_spartial zright \n qquad + frac12p_sR_ssleft(n_sp_s - n_sp_s\n - n_sn_sleft(u_s - u_sright)^2right) \n qquad leftmpfrac12R_mathrmionfracn_ip_sleft(p_n\n + n_nleft(u_n - u_sright)^2right)\n - frac12p_parallelsint dv_parallel v_parallel^2 S_s - fracu_s^22p_parallelsint dv_parallel S_sright)g_s \n + left-frac1n_sv_mathrmthsleft(-fracpartial p_spartial z\n + R_ssn_sn_sleft(u_s - u_sright)\n pm R_mathrmionn_in_nleft(u_n - u_sright) - u_sint dv_parallel S_sright)right \n qquad-fracw_s2frac1p_sleft(-fracpartial q_spartial z\n - R_ssleft(n_sp_s - n_sp_s\n - n_sn_sleft(u_s - u_sright)^2right)\n + int dv_parallel v_parallel^2 S_s + u_s^2 int dv_parallel S_s\n + v_mathrmthsw_sfracpartial p_spartial zright) \n qquadmpfracw_s2R_mathrmionn_ileft(fracp_np_s\n - fracn_nn_s + fracn_np_sleft(u_n - u_sright)^2right) \n qquadleft + fracw_parallels2frac1n_sint dv_parallel S_s\n + fracw_s^22fracv_mathrmthsn_sfracpartial n_spartial zrightfracpartial g_spartial w_s \n = -R_ssn_sleft(g_s - fracv_mathrmthsv_mathrmthsg_sright)\n pm R_mathrmionfracv_mathrmthsn_sn_ifracn_nv_mathrmthng_n + fracv_mathrmthsn_s S_s\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"Writing out the final result fully for ions","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n fracpartial g_ipartial t\n + fracv_mathrmthin_ileft(v_mathrmthiw_i\n + u_iright)fracpartial f_ipartial z\n + left(frac32R_mathrmionn_n + frac32n_iint dv_parallel S_i\n - fracu_in_ifracpartial n_ipartial zright)g_i \n + left(fracu_iv_mathrmthifracpartial v_mathrmthipartial z\n + frac12p_ifracpartial q_ipartial zright \n qquad + frac12p_iR_inleft(n_np_i - n_ip_n\n - n_in_nleft(u_i - u_nright)^2right) \n qquad left - frac12R_mathrmionfracn_ip_ileft(p_n\n + n_nleft(u_n - u_iright)^2right)\n - frac12p_paralleliint dv_parallel v_parallel^2 S_i - fracu_i^22p_paralleliint dv_parallel S_iright)g_i \n + left-frac1n_iv_mathrmthileft(-fracpartial p_ipartial z\n + R_inn_in_nleft(u_n - u_iright)\n + R_mathrmionn_in_nleft(u_n - u_iright) - u_iint dv_parallel S_iright)right \n qquad-fracw_i2frac1p_ileft(-fracpartial q_ipartial z\n - R_inleft(n_np_i - n_ip_n\n - n_in_nleft(u_i - u_nright)^2right)\n + int dv_parallel v_parallel^2 S_i + u_i^2 int dv_parallel S_i\n + v_mathrmthiw_ifracpartial p_ipartial zright) \n qquad - fracw_i2R_mathrmionn_ileft(fracp_np_i\n - fracn_nn_i + fracn_np_ileft(u_n - u_iright)^2right) \n qquadleft + fracw_paralleli2 frac1n_iint dv_parallel S_i\n + fracw_i^22fracv_mathrmthin_ifracpartial n_ipartial zrightfracpartial g_ipartial w_i \n = -R_inn_nleft(g_i - fracv_mathrmthiv_mathrmthng_nright)\n + R_mathrmionv_mathrmthifracn_nv_mathrmthng_n + fracv_mathrmthin_i S_i\nendalign","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"and for neutrals where several of the ionization terms cancel","category":"page"},{"location":"moment_kinetic_equations/","page":"Moment kinetic equations","title":"Moment kinetic equations","text":"beginalign\n Rightarrow fracpartial g_npartial t\n + fracv_mathrmthnn_nleft(v_mathrmthnw_n\n + u_nright)fracpartial f_npartial z\n + left(-frac32R_mathrmionn_i + frac32n_nint dv_parallel S_n\n - fracu_nn_nfracpartial n_npartial zright)g_n \n + left(fracu_nv_mathrmthnfracpartial v_mathrmthnpartial z\n + frac12p_nfracpartial q_npartial zright \n qquad left + frac12p_nR_inleft(n_ip_n - n_np_i\n - n_nn_ileft(u_n - u_iright)^2right)\n + frac12R_mathrmionn_i\n - frac12p_parallelnint dv_parallel v_parallel^2 S_n - fracu_n^22p_parallelnint dv_parallel S_nright)g_n \n + left-frac1n_nv_mathrmthnleft(-fracpartial p_npartial z\n + R_inn_nn_ileft(u_i - u_nright) - u_nint dv_parallel S_nright)right \n qquad-fracw_n2frac1p_nleft(-fracpartial q_npartial z\n - R_inleft(n_ip_n - n_np_i\n - n_nn_ileft(u_n - u_iright)^2right)\n + int dv_parallel v_parallel^2 S_n + u_n^2int dv_parallel S_n\n + v_mathrmthnw_nfracpartial p_npartial zright) \n qquadleft + fracw_paralleln2frac1n_nint dv_parallel S_n\n + fracw_n^22fracv_mathrmthnn_nfracpartial n_npartial zrightfracpartial g_npartial w_n \n = -R_inn_ileft(g_n - fracv_mathrmthnv_mathrmthig_iright)\n - R_mathrmionn_ig_n + fracv_mathrmthnn_n S_n\nendalign","category":"page"},{"location":"zz_ionization/#ionization","page":"ionization","title":"ionization","text":"","category":"section"},{"location":"zz_ionization/","page":"ionization","title":"ionization","text":"Modules = [moment_kinetics.ionization]","category":"page"},{"location":"zz_ionization/#moment_kinetics.ionization","page":"ionization","title":"moment_kinetics.ionization","text":"\n\n\n\n","category":"module"},{"location":"zz_moment_kinetics_input/#moment_kinetics_input","page":"moment_kinetics_input","title":"moment_kinetics_input","text":"","category":"section"},{"location":"zz_moment_kinetics_input/","page":"moment_kinetics_input","title":"moment_kinetics_input","text":"Modules = [moment_kinetics.moment_kinetics_input]","category":"page"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input","text":"\n\n\n\n","category":"module"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input.check_coordinate_input-Tuple{Any, Any, Any}","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input.check_coordinate_input","text":"Check input for a coordinate\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input.check_input-NTuple{14, Any}","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input.check_input","text":"check various input options to ensure they are all valid/consistent\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input.check_input_initialization-Tuple{Any, Any, Any}","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input.check_input_initialization","text":"\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input.check_input_time_advance-Tuple{Any, Any, Any}","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input.check_input_time_advance","text":"\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input.mk_input","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input.mk_input","text":"Process user-supplied inputs\n\nsave_inputs_to_txt should be true when actually running a simulation, but defaults to false for other situations (e.g. when post-processing).\n\nignore_MPI should be false when actually running a simulation, but defaults to true for other situations (e.g. when post-processing).\n\n\n\n\n\n","category":"function"},{"location":"zz_moment_kinetics_input/#moment_kinetics.moment_kinetics_input.read_input_file-Tuple{String}","page":"moment_kinetics_input","title":"moment_kinetics.moment_kinetics_input.read_input_file","text":"Read input from a TOML file\n\n\n\n\n\n","category":"method"},{"location":"developing/#Developing","page":"Developing","title":"Developing","text":"","category":"section"},{"location":"developing/#Dependencies","page":"Developing","title":"Dependencies","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"If you need to add a dependency, start the REPL with the moment_kinetics package activated (see above), enter pkg> mode (press ]) and then to add, for example, the FFTW.jl package enter","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"(moment_kinetics) pkg> add FFTW","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"This should take care of adding the package (FFTW) to the Project.toml and Manifest.toml files.","category":"page"},{"location":"developing/#Revise.jl","page":"Developing","title":"Revise.jl","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"When working on the code, one way to avoid waiting for everything to recompile frequently is to load the Revise.jl package","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"julia> using Revise","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Revise.jl will recompile each edited function/method as needed, so it is possible to keep a REPL session open and avoid long recompilation. moment_kinetics can be run fairly conveniently from the REPL","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"julia> using moment_kinetics\njulia> run_moment_kinetics(input)","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"where input is a Dict() containing any non-default options desired. Input can also be loaded from a TOML file passing the filaname as a String to the second argument, e.g.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"julia> run_moment_kinetics(\"input.toml\")","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"It might be convenient to add using Revise to your startup.jl file (~/julia/config/startup.jl) so it's always loaded.","category":"page"},{"location":"developing/#Input-options-and-defaults","page":"Developing","title":"Input options and defaults","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"The input is read from a .toml file. It is also written to the output HDF5 (or NetCDF) file, after all defaults are applied, both as a TOML-formatted String and as a tree of HDF5 variables.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"warning: Warning\nNeither TOML nor HDF5 have a 'null' type, so there is no convenient way to store Julia's nothing when writing to TOML or HDF5. Therefore nothing should not be used as a default for any input option. If the code should use nothing as a default for some setting, that is fine, but must be done after the input is read, and not stored in the input_dict.","category":"page"},{"location":"developing/#Array-types","page":"Developing","title":"Array types","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"Most arrays in moment_kinetics are declared using a custom array type moment_kinetics.communication.MPISharedArray. Most of the time this type is just an alias for Array, and so it needs the same template parameters (see Julia's Array documentation) - the data type and the number of dimensions, e.g. MPISharedArray{mk_float,3}. Although these arrays use shared memory, Julia does not know about this. We use MPI.Win_allocate_shared() to allocate the shared memory, then wrap it in an Array in moment_kinetics.communication.allocate_shared.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The reason for using the alias, is that when the shared-memory debugging mode is activated, we instead create arrays using a type DebugMPISharedArray, which allows us to track some debugging information along with the array, see Shared memory debugging, and make MPISharedArray an alias for DebugMPISharedArray instead. The reason for the alias is that if we declared our structs with just Array type, then when debugging is activated we would not be able to store DebugMPISharedArray instances in those structs, and if we declared the structs with AbstractArray, they would not be concretely typed, which could impact performance by creating code that is not 'type stable' (i.e. all concrete types are known at compile time).","category":"page"},{"location":"developing/#Parallelization","page":"Developing","title":"Parallelization","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"The code is parallelized at the moment using MPI and shared-memory arrays. Arrays representing the pdf, moments, etc. are shared between all processes. Using shared memory means, for example, we can take derivatives along one dimension while parallelising the other for any dimension without having to communicate to re-distribute the arrays. Using shared memory instead of (in future as well as) distributed memory parallelism has the advantage that it is easier to split up the points within each element between processors, giving a finer-grained parallelism which should let the code use larger numbers of processors efficiently.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"It is possible to use a REPL workflow with parallel code:","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Recommended option is to use tmpi. This utility (it's a bash script that uses tmux) starts an mpi program with each process in a separate pane in a single terminal, and mirrors input to all processes simultaneously (which is normally what you want, there are also commands to 'zoom in' on a single process).\nAnother 'low-tech' possibilty is to use something like mpirun -np 4 xterm -e julia --project, but that will start each process in a separate xterm and you would have to enter commands separately in each one. Occasionally useful for debugging when nothing else is available.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"There is no restriction on the number of processes or number of grid points, although load-balancing may be affected - if there are only very few points per process, and a small fraction of processes have an extra grid point (e.g. splitting 5 points over 4 processes, so 3 process have 1 point but 1 process has 2 points), many processes will spend time waiting for the few with an extra point.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Parallelism is implemented through macros that get the local ranges of points that each process should handle. The inner-most level of nested loops is typically not parallelized, to allow efficient FFTs for derivatives, etc. A loop over one (possibly parallelized) dimension can be written as, for example,","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"@loop_s is begin\n f[is] = ...\nend","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"These macros can be nested as needed for relatively complex loops","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"@loop_s is begin\n some_setup(is)\n @loop_z iz begin\n @views do_something(f[:,iz,is])\n end\n @loop_z iz begin\n @views do_something_else(f[:,iz,is])\n end\nend","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Simpler nested loops can (optionally) be written more compactly","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"@loop_s_z_vpa is iz ivpa begin\n f[ivpa,iz,is] = ...\nend","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Which dimensions are actually parallelized by these macros is controlled by the 'region' that the code is currently in, as set by the begin__region() functions, where are the dimensions that will be parallelized in the following region. For example, after calling begin_s_z_region() loops over species and z will be divided up over the processes in a 'block' (currently there is only one block, which contains the whole grid and all the processes being used, as we have not yet implemented distributed-memory parallelism). Every process will loop over all points in the remaining dimensions if the loop macros for those dimensions are called.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The recommended place to put begin_*_region() calls is at the beginning of a function whose contents should use loops parallelised according to the settings for that region.\nEach begin_*_region() function checks if the region it would set is already active, and if so returns immediately (doing nothing). This means that begin_*_region() can (and should) be used to mark a block of code as belonging to that region, and if moment_kinetics is already in that region type, the call will have essentially zero cost.\nIn some places it may be necessary to change the region type half way through a function, etc. This is fine.\nWhen choosing which region type to select, note that all 'parallelised dimensions' must be looped over for each operation (otherwise some points may be written more than once), unless some special handling is used (e.g. species dimension s is parallelised, but a conditional like if 1 in loop_ranges[].s is wrapped around code to be executed so that only processes which should handle the point at s=1 do anything). It may be more optimal in some places to choose region types that do not parallelise all possible dimensions, to reduce the number of synchronisations that are needed.\nAs a matter of style, it is recommended to place begin_*_region() calls within functions where the loops are (or at most one level above), so that it is not necessary to search back along the execution path of the code to find the most recent begin_*_region() call, and therefore know what region type is active.\nIn a region after begin_serial_region(), the rank 0 process in each block will loop over all points in every dimension, and all other ranks will not loop over any.\nInside serial regions, the macro @serial_region can also be used to wrap blocks of code so that they only run on rank 0 of the block. This is useful for example to allow the use of array-broadcast expressions during initialization where performance is not critical.\nTo help show how these macros work, a script is provided that print a set of examples where the loop macros are expanded. It can be run from the Julia REPL\n$ julia --project\n _\n _ _ _(_)_ | Documentation: https://docs.julialang.org\n (_) | (_) (_) |\n _ _ _| |_ __ _ | Type \"?\" for help, \"]?\" for Pkg help.\n | | | | | | |/ _` | |\n | | |_| | | | (_| | | Version 1.7.0 (2021-11-30)\n _/ |\\__'_|_|_|\\__'_| | Official https://julialang.org/ release\n|__/ |\n\njulia> include(\"util/print-macros.jl\")\nor on the command line\n$ julia --project util/print-macros.jl","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The ranges used are stored in a LoopRanges struct in the Ref variable loop_ranges (which is exported by the looping module). The range for each dimension is stored in a member with the same name as the dimension, e.g. loop_ranges[].s for the species. Occasionally it is useful to access the range directly. There are different LoopRanges instances for different parallelization patterns - the instance stored in loop_ranges is updated when begin_*_region() is called. It is possible to find out the current region type (i.e. which dimensions are being parallelized) by looking at loop_ranges[].parallel_dims.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"note: Note\nThe square brackets [] after loop_ranges[] are needed because loop_ranges is a reference to a LoopRanges object Ref{LoopRanges} (a bit like a pointer) - it allows loop_ranges to be a const variable, so its type is always known at compile time, but the actual LoopRanges can be set/modified at run-time.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"It is also possible to run a block of code in serial (on just the rank-0 member of each block of processes) by wrapping it in a @serial_region macro. This is mostly useful for initialization or file I/O where performance is not critical. For example","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"@serial_region begin\n # Do some initialization\n f .= 0.0\nend","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Internally, when the begin_*_region() functions need to change the region type (i.e. the requested region is not already active), they call _block_synchronize(), which calls MPI.Barrier(). They also switch over the LoopRanges struct contained in looping.loop_ranges as noted above. For optimization, the _block_synchronize() call can be skipped - when it is correct to do so - by passing the argument no_synchronize=true (or some more complicated conditional expression if synchronization is necessary when using some options but not for others).","category":"page"},{"location":"developing/#Collision-operator-and-anyv-region","page":"Developing","title":"Collision operator and anyv region","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"The Fokker-Planck collision operator requires a special approach to shared-memory parallelisation. There is an outer loop over spatial points (and potentially over species). Inside that outer loop there are operations that can benefit from parallelisation over v_perp, or over v_parallel, or over both v_perp and v_parallel, as well as some that do not parallelise over velocity space at all. To deal with this, it is beneficial to parallelise the outer loop over species and spatial dimensions as much as possible, and then within that allow changes between different ways of parallelizing over velocity space.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The mechanism introduced to allow the type of parallelization just described is the 'anyv' (read any-v) region. Before the outer loop of the collision operator begin_s_r_z_anyv_region() is used to start the 'anyv' parallelization. Then within the @loop is ir iz begin... the functions begin_anyv_region() (for no parallelization over velocity space), begin_anyv_vperp_region(), begin_anyv_vpa_region() and begin_anyv_vperp_vpa_region() can be used to parallelize over neither velocity space dimension, either velocity space dimension individually, or over both velocity space dimensions together. This is possible because 'subblocks' of processes are defined. Each subblock shares the same range of species and spatial indices, which stay the same throughout the begin_s_r_z_anyv_region() section, and are not shared with any other subblock of processes. Because the subblock has an independent set of species- and spatial-indices, when changing the velocity-space parallelization only the processes in the sub-block need to be synchronized which is done by moment_kinetics.communication._anyv_subblock_synchronize, which is called when necessary within the begin_anyv*_region() functions (the whole shared-memory block does not need to be synchronized at once, as would be done by moment_kinetics.communication._block_synchronize). The processes that share an anyv subblock are all part of the comm_anyv_subblock[] communicator (which is a subset of the processes in the full block, whose communicator is comm_block[]).","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"See also notes on debugging the 'anyv' parallelisation: Collision operator and 'anyv' region.","category":"page"},{"location":"developing/#Package-structure","page":"Developing","title":"Package structure","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"The structure of the packages in the moment_kinetics repo is set up so that some features, which depend on 'heavy' external packages (such as Makie, Plots, and Symbolics, which take a long time to precompile and load) can be optional.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The structure is set up by the machines/machine_setup.sh script, which prompts the user for input to decide which optional components to include (as well as some settings related to batch job submission on HPC clusters). machine_setup.sh calls several other scripts to do the setup (written as far as possible in Julia). The structure of these scripts is explained in machine_setup notes.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The intention is that a top-level 'project' (defined by a Project.toml file, which is created and populated by machines/machine_setup.sh) is set up in the top-level directory of the repository. The moment_kinetics package itself (which is in the moment_kinetics/ subdirectory, defined by its own Project.toml file which is tracked by git), and optionally other post-processing packages, are added to this top-level project using Pkg.develop().","category":"page"},{"location":"developing/#Optional-dependencies","page":"Developing","title":"Optional dependencies","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"Some capabilities that require optional dependencies are provided using 'package extensions' (a new feature of Julia in v1.9.0).","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The way we use package extensions is a bit of a hack. Extensions are intended to be activated when an optional dependency (called a 'weakdep' by Julia) is loaded, e.g. using moment_kinetics, NCDatasets. This usage pattern is not the most convenient for the way we use moment_kinetics where we would rather just load moment_kinetics and then specify for example binary_format = \"netcdf\" in the input TOML file. To work around this, the optional dependencies are loaded automatically if they are installed (by calling Base.requires() in the __init__() function of an appropriate sub-module). This is not the way package extensions were intended to be used, and it may be a bit fragile - at the time of writing in January 2024 there would be an error on precompilation if the optional dependencies were added in one order, which went away when the order was reversed. If this causes problems, we might need to consider an alternative, for example adding the optional dependencies to the startup.jl file, instead of trying to auto-load them from within the moment_kinetics package.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"The optional capabilities at the moment are:","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"Method of manufactured solutions (MMS) testing - this requires the Symbolics package which is heavy and has a large number of dependencies. It is convenient not to require Symbolics when MMS capability is not being used. The functionality is provided by the manufactured_solns_ext extension. The extension also requires the IfElse package, which is not needed elsewhere in moment_kinetics and so is included as a 'weakdep' although IfElse is not a heavy dependency.\nNetCDF output - this requires the NCDatasets package. Although not as heavy as Symbolics or the plotting packages, NetCDF output is not required and not used by default, so it does not hurt to make the dependency optional. As a bonus, importing NCDatasets can sometimes cause linking errors when a local or system installation of HDF5 (i.e. one not provided by the Julia package manager) is used, as NCDatasets (sometimes?) seems to try to link a different version of the library. These errors can be avoided by not enabling NetCDF outut (when HDF5 output is preferred), or allowing Julia to use the HDF5 library provided by its package manager (when NetCDF is preferred, although this would mean that parallel I/O functionality is not available).","category":"page"},{"location":"developing/#Post-processing-packages","page":"Developing","title":"Post processing packages","text":"","category":"section"},{"location":"developing/","page":"Developing","title":"Developing","text":"Post processing functionality is provided by separate packages (makie_post_processing and plots_post_processing) rather than by extensions. Extensions are not allowed to define new modules, functions, etc. within the main package, they can only add new methods (i.e. new implementations of the function for a different number of arguments, or different types of the arguments) to functions already defined in the main package. For post-processing, we want to add a lot of new functions, so to use extensions instead of separate packages we would need to define all the function names in the main package, and then separately the implementations in the extension, which would be inconvenient and harder to maintain.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"There are two suggested ways of setting up the post-processing packages:","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"For interactive use/development on a local machine, one or both post-processing packages can be added to the top-level project using Pkg.develop(). This is convenient as there is only one project to deal with. Both simulations and post-processing are run using\n$ bin/julia --project -O3 <...>\nFor optimized use on an HPC cluster it is better to set up a separate project for the post-processing package(s). This allows different optimization flags to be used for running simulations (-O3 --check-bounds=no) and for post-processing (-O3). [Note, in particular Makie.jl can have performance problems if run with --check-bounds=no, see here.] Simulations should be run with\n$ bin/julia --project -O3 --check-bounds=no <...>\nand post-processing with\n$ bin/julia --project=makie_post_processing -O3 <...>\nor\n$ bin/julia --project=plots_post_processing -O3 <...>\nThis option can also be used on a local machine, if you want to optimise your simulation runs as much as possible by using the --check-bounds=no flag. To do this answer y to the prompt \"Would you like to set up separate packages for post processing...\" from machines/machine_setup.sh.","category":"page"},{"location":"developing/","page":"Developing","title":"Developing","text":"To support option 2, the post-processing packages are located in sub-sub-directories (makie_post_processing/makie_post_processing/ and plots_post_processing/plots_post_processing/), so that the separate projects can be created in the sub-directories (makie_post_processing/ and plots_post_processing). moment_kinetics and the other dependencies must also be added to the separate projects (the machine_setup.sh script takes care of this).","category":"page"},{"location":"parameter_scans/#Parameter-scans","page":"Parameter scans","title":"Parameter scans","text":"","category":"section"},{"location":"parameter_scans/#Running-a-scan","page":"Parameter scans","title":"Running a scan","text":"","category":"section"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"Parameter scans can be run using the run_parameter_scan.jl script. To run from the REPL","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"$ julia -p 8 --project -O3\njulia> include(\"run_parameter_scan.jl\")\njulia> run_parameter_scan(\"path/to/an/input/file.toml\")","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"or to run a single scan from the command line","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"$ julia -p 8 --project -O3 run_parameter_scan.jl path/to/an/input/file.toml","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"The -p 8 argument passed to julia in these examples is optional. It indicates that julia should use 8 processes for parallelism. In this case we are not using MPI - each run in the scan is run in serial, but up to 8 (in this example) runs from the scan can be performed simultaneously (using the @distributed macro).","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"The runs can use MPI - in this case call julia using mpirun, etc. as usual but do not pass the -p argument. Mixing MPI and @distributed would cause oversubscription and slow everything down. The runs will run one after the other, and each run will be MPI parallelised.","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"The inputs (see moment_kinetics.parameter_scans.get_scan_inputs) can be passed to the function in a Dict, or read from a TOML file.","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"run_parameter_scan can also be passed a directory (either as an argument to the function or from the command line), in which case it will perform a run for every input file contained in that directory.","category":"page"},{"location":"parameter_scans/#Post-processing-a-scan","page":"Parameter scans","title":"Post processing a scan","text":"","category":"section"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"makie_post_processing.makie_post_process can be called for each run in a scan. For example to post process the scan in runs/scan_example from the REPL","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"$ julia -p 8 --project -O3\njulia> include(\"post_process_parameter_scan.jl\")\njulia> post_process_parameter_scan(\"runs/scan_example/\")","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"or to from the command line","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"$ julia -p 8 --project -O3 post_process_parameter_scan.jl runs/scan_example/","category":"page"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"Again the -p 8 argument passed to julia in these examples is optional. It indicates that julia should use 8 processes for parallelism. Each run in the scan is post-processed in serial, but up to 8 (in this example) runs from the scan can be post-processed simultaneously (using the @distributed macro).","category":"page"},{"location":"parameter_scans/#API","page":"Parameter scans","title":"API","text":"","category":"section"},{"location":"parameter_scans/","page":"Parameter scans","title":"Parameter scans","text":"Modules = [moment_kinetics.parameter_scans]","category":"page"},{"location":"parameter_scans/#moment_kinetics.parameter_scans.generate_scan_input_files","page":"Parameter scans","title":"moment_kinetics.parameter_scans.generate_scan_input_files","text":"generate_scan_input_files(filename::AbstractString, dirname=nothing)\n\nRead inputs for a scan from a TOML file and call generate_scan_input_files(scan_input::AbstractDict, dirname::AbstractString).\n\nBy default, dirname will be set to filename with the .toml extension removed.\n\n\n\n\n\n","category":"function"},{"location":"parameter_scans/#moment_kinetics.parameter_scans.generate_scan_input_files-Tuple{AbstractDict, AbstractString}","page":"Parameter scans","title":"moment_kinetics.parameter_scans.generate_scan_input_files","text":"generate_scan_input_files(scan_input::AbstractDict, dirname::AbstractString)\n\nGenerate individual input files for each run in the scan specified by scan_input, saving the generated files in dirname\n\nInputs are generated by calling get_scan_inputs(scan_inputs::AbstractDict).\n\n\n\n\n\n","category":"method"},{"location":"parameter_scans/#moment_kinetics.parameter_scans.get_scan_inputs-Tuple{AbstractDict}","page":"Parameter scans","title":"moment_kinetics.parameter_scans.get_scan_inputs","text":"get_scan_inputs(scan_inputs::AbstractDict)\n\nMake a set of inputs for a parameter scan.\n\nscan_inputs is like a Dict of inputs for run_moment_kinetics, except that any value may be an array instead of a scalar. The values passed as arrays will be combined as follows.\n\nA special, extra, setting combine_outer can be passed, with the names of options to combine using an 'outer product'\n\nBy default, inputs are combined with an 'inner product', i.e. inputs a,b,c are combined as (a[1],b[1],c[1]), (a[2],b[2],c[2]), etc. Any inputs named in 'combine_outer' are instead combined with an 'outer product', i.e. an entry is created for every value of those inputs combined with every combination of the other inputs.\n\nReturns a Vector{OrderedDict} whose entries are the input for a single run in the parameter scan.\n\n\n\n\n\n","category":"method"},{"location":"parameter_scans/#moment_kinetics.parameter_scans.get_scan_inputs-Tuple{AbstractString}","page":"Parameter scans","title":"moment_kinetics.parameter_scans.get_scan_inputs","text":"get_scan_inputs(file_or_dir::AbstractString)\n\nIf file_or_dir is a file, read input from it using TOML , and call get_scan_inputs(scan_inputs::AbstractDict).\n\nIf file_or_dir is a directory, read input from all the .toml files in the directory, returning the inputs as a Vector{OrderedDict}.\n\n\n\n\n\n","category":"method"},{"location":"parameter_scans/#moment_kinetics.parameter_scans.get_scan_inputs-Tuple{}","page":"Parameter scans","title":"moment_kinetics.parameter_scans.get_scan_inputs","text":"get_scan_inputs()\n\nGet input file name from command line options, and call get_scan_inputs(filename::AbstractString)\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics/#moment_kinetics","page":"moment_kinetics","title":"moment_kinetics","text":"","category":"section"},{"location":"zz_moment_kinetics/","page":"moment_kinetics","title":"moment_kinetics","text":"Modules = [moment_kinetics.moment_kinetics]","category":"page"},{"location":"zz_moment_kinetics/#moment_kinetics.moment_kinetics","page":"moment_kinetics","title":"moment_kinetics.moment_kinetics","text":"\n\n\n\n","category":"module"},{"location":"zz_moment_kinetics/#moment_kinetics.check_so_newer_than_code","page":"moment_kinetics","title":"moment_kinetics.check_so_newer_than_code","text":"check_so_newer_than_code(so_filename=nothing)\n\nUtility function that checks if so_filename is newer than the source code in moment_kinetics/src. If it is, prints an error message and returns false; otherwise returns true.\n\nIf so_filename is nothing, use the name of the system image of the current julia session for so_filename.\n\nIf so_filename is \"makie_postproc.so\", also checks against the source code in makie_post_processing/makie_post_processing/src/.\n\nIf so_filename is \"plots_postproc.so\", also checks against the source code in plots_post_processing/plots_post_processing/src/.\n\n\n\n\n\n","category":"function"},{"location":"zz_moment_kinetics/#moment_kinetics.cleanup_moment_kinetics!-Tuple{Any, Any, Any}","page":"moment_kinetics","title":"moment_kinetics.cleanup_moment_kinetics!","text":"Clean up after a run\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics/#moment_kinetics.run_moment_kinetics","page":"moment_kinetics","title":"moment_kinetics.run_moment_kinetics","text":"main function that contains all of the content of the program\n\n\n\n\n\n","category":"function"},{"location":"zz_moment_kinetics/#moment_kinetics.run_moment_kinetics-Tuple{Any}","page":"moment_kinetics","title":"moment_kinetics.run_moment_kinetics","text":"overload with no TimerOutput arguments\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics/#moment_kinetics.run_moment_kinetics-Tuple{Union{Nothing, TimerOutputs.TimerOutput}, String}","page":"moment_kinetics","title":"moment_kinetics.run_moment_kinetics","text":"overload which takes a filename and loads input\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics/#moment_kinetics.run_moment_kinetics-Tuple{}","page":"moment_kinetics","title":"moment_kinetics.run_moment_kinetics","text":"overload which gets the input file name from command line arguments\n\n\n\n\n\n","category":"method"},{"location":"zz_moment_kinetics/#moment_kinetics.setup_moment_kinetics-Tuple{AbstractDict}","page":"moment_kinetics","title":"moment_kinetics.setup_moment_kinetics","text":"Perform all the initialization steps for a run.\n\nIf backup_filename is nothing, set up for a regular run; if a filename is passed, reload data from time index given by restart_time_index for a restart.\n\ndebug_loop_type and debug_loop_parallel_dims are used to force specific set ups for parallel loop ranges, and are only used by the tests in debug_test/.\n\n\n\n\n\n","category":"method"},{"location":"wall_boundary_conditions/#Wall-boundary-conditions-with-moment-constraints","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"","category":"section"},{"location":"wall_boundary_conditions/#Ions","page":"Wall boundary conditions with moment constraints","title":"Ions","text":"","category":"section"},{"location":"wall_boundary_conditions/#Boundary-conditions","page":"Wall boundary conditions with moment constraints","title":"Boundary conditions","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"The sheath-edge boundary conditions for the ions is that no ions leave from the sheath edge. So at the lower boundary z=-L_z2","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n f(z=-L2v_parallel0) = 0\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"and at the upper boundary z=L_z2","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n f(z=L2v_parallel0) = 0\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Moment-constraints","page":"Wall boundary conditions with moment constraints","title":"Moment constraints","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"At the sheath-entrance boundary, the constraints need to be enforced slightly differently to how they are done in the bulk of the domain (see Constraints on normalized distribution function). For compatibility with the boundary condition, the corrections which are added to impose the constraints should go to zero at v_parallel=0. Note that the constraints are imposed after the boundary condition is applied by setting f(v_parallel0)=0 on the lower sheath boundary or f(v_parallel0)=0 on the upper sheath boundary.","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"The form of the correction that we choose is","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\ntildeg_s = Ahatg_s + Bw_parallel fracv_parallel1+v_parallelhatg_s + Cw_parallel^2 fracv_parallel1+v_parallelhatg_s\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"We have the same set of constraints","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n frac1sqrtpiint dw_tildeg_s =1\n frac1sqrtpiint dw_w_tildeg_s =0\n frac1sqrtpiint dw_w_^2tildeg_s =frac12\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"Defining the integrals","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n I_n=frac1sqrtpiint dw_w_^nhatg_s\n J_n=frac1sqrtpiint dw_w_^nfracv_parallel1+v_parallelhatg_s\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"We can write the constraints as","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n frac1sqrtpiint dw_tildeg_s=1 =frac1sqrtpiint dw_left(Ahatg_s+Bw_fracv_parallel1+v_parallelhatg_s+Cw_^2fracv_parallel1+v_parallelhatg_sright) \n =AI_0+BJ_1+CJ_2\n frac1sqrtpiint dw_w_tildeg_s=0 =frac1sqrtpiint dw_left(Aw_hatg_s+Bw_^2fracv_parallel1+v_parallelhatg_s+Cw_^3fracv_parallel1+v_parallelhatg_sright) \n =AI_1+BJ_2+CJ_3\n frac1sqrtpiint dw_w_^2tildeg_s=frac12 =frac1sqrtpiint dw_left(Aw_^2hatg_s+Bw_^3fracv_parallel1+v_parallelhatg_s+Cw_^4fracv_parallel1+v_parallelhatg_sright) \n =AI_2+BJ_3+CJ_4\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"and solving these simultaneous equations","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n C = fracleft( frac12 - A I_2 - B J_3 right)J_4 \n B = -fracA I_1 + C J_3J_2 \n = -fracI_1J_2 A - fracJ_3J_2 left( frac12J_4 - fracI_2J_4 A - fracJ_3J_4 B right) \n left( 1 - fracJ_3^2J_2 J_4 right) B = -fracJ_32 J_2 J_4 + left( fracI_2 J_3J_2 J_4 - fracI_1J_2 right) A \n B = fracleft( fracI_2 J_3J_2 J_4 - fracI_1J_2 right) A - fracJ_32 J_2 J_4left( 1 - fracJ_3^2J_2 J_4 right) \n = fracleft( I_2 J_3 - I_1 J_4 right) A - fracJ_32J_2 J_4 - J_3^2 \n 1 = A I_0 + B J_1 + C J_2 \n = A I_0 + B J_1 + fracJ_2J_4left( frac12 - A I_2 - B J_3 right) \n 1 - fracJ_22 J_4 = left( I_0 - fracI_2 J_2J_4 right) A + left( J_1 - fracJ_2 J_3J_4 right) B \n 1 - fracJ_22 J_4 = left( I_0 - fracI_2 J_2J_4 right) A - fracleft( J_1 - fracJ_2 J_3J_4 right) J_32left( J_2 J_4 - J_3^2 right) + fracleft( J_1 - fracJ_2 J_3J_4 right)left( I_2 J_3 - I_1 J_4 right)left( J_2 J_4 - J_3^2 right) A \n left( 1 - fracJ_22J_4 right) left( J_2 J_4 - J_3^2 right) = left( J_2 J_4 - J_3^2 right) left( I_0 - fracI_2 J_2J_4 right) A - fracleft( J_1 - fracJ_2 J_3J_4 right) J_32 + left( J_1 - fracJ_2 J_3J_4 right) left( I_2 J_3 - I_1 J_4 right) A \n left( 1 - fracJ_22 J_4 right)left( J_2 J_4 - J_3^2 right) + fracleft( J_1 - fracJ_2 J_3J_4 right) J_32 = left left( J_2 J_4 - J_3^2 right)left( I_0 - fracI_2 J_2J_4 right) + left( J_1 - fracJ_2 J_3J_4 right)left( I_2 J_3 - I_1 J_4 right) right A \n J_2 J_4 - fracJ_2^22 - J_3^2 + cancelfracJ_2 J_3^22 J_4 + fracJ_1 J_32 - cancelfracJ_2 J_3^22 J_4 = left I_0 J_2 J_4 - I_2 J_2^2 - I_0 J_3^2 + cancelfracI_2 J_2 J_3^2J_4 + I_2 J_1 J_3 - I_1 J_1 J_4 - cancelfracI_2 J_2 J_3^2J_4 + I_1 J_2 J_3 right A \n J_2 J_4 - fracJ_2^22 + J_3left( fracJ_12 - J_3 right) = left I_0left( J_2 J_4 - J_3^2 right) + I_1left( J_2 J_3 - J_1 J_4 right) + I_2left( J_1 J_3 - J_2^2 right) right A \n A =fracJ_2 J_4 - fracJ_2^22 + J_3left( fracJ_12 - J_3 right)I_0left( J_2 J_4 - J_3^2 right) + I_1 left( J_2 J_3 - J_1 J_4 right) + I_2left( J_1 J_3 - J_2^2 right)\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"
      ","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n C = fracfrac12 - A I_2 - B J_3J_4 \n B = fracfrac12 J_3 + A (I_1 J_4 - I_2 J_3)J_3^2 - J_2 J_4 \n A = fracJ_3^2 - J_2 J_4 + frac12 (J_2^2 - J_1 J_3)I_0 (J_3^2 - J_2 J_4) + I_1 (J_1 J_4 - J_2 J_3) + I_2 (J_2^2 - J_1 J_3)\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Evolving-u_\\parallel","page":"Wall boundary conditions with moment constraints","title":"Evolving u_parallel","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"When evolving only u_parallel and n separately, we only need two constraints. This corresponds to C=0 so that","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n 1 = A I_0 + B J_1 \n 0 = A I_1 + B J_2 \n B = -fracA I_1J_2 \n A I_0 = 1 - B J_1 = 1 + fracA I_1 J_1J_2 \n A = frac1I_0 - fracI_1 J_1J_2\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Evolving-n","page":"Wall boundary conditions with moment constraints","title":"Evolving n","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"When only evolving n separately, the constraint is the same as in the bulk of the domain","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n 1 = AI_0 \n A = frac1I_0\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Neutrals","page":"Wall boundary conditions with moment constraints","title":"Neutrals","text":"","category":"section"},{"location":"wall_boundary_conditions/#Boundary-conditions-2","page":"Wall boundary conditions with moment constraints","title":"Boundary conditions","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"Ions and neutrals that reach the wall are both recycled as neutrals. The neutrals are emitted from the wall with a 'Knudsen cosine' distribution characterised by a specified temperature T_mathrmwall (see Excalibur report TN-05). The Knudsen distribution is given – here assuming that the magnetic field is perpendicular to the wall (so that v_parallel is the velocity normal to the wall) – by","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"f_Kw(v_zetav_rv_z) = frac34pi left(fracm_iT_mathrmwallright)^2 fracv_zsqrtv_zeta^2 + v_r^2 + v_z^2 expleft( -fracm_i(v_zeta^2 + v_r^2 + v_z^2)2T_mathrmwall right)","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"Note that f_Kw is normalised so that it has unit flux int d^3vv_z f_Kw(v_zetav_rv_z) = 1.","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"The boundary condition for the neutrals at the lower target is then (for the neutrals leaving whe wall)","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"f_n(rz=-fracL_z2v_zetav_rv_z0) = Gamma_mathrmlower(r) f_Kw(v_zetav_rv_z)","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"and at the upper target","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"f_n(rz=fracL_z2v_zetav_rv_z0) = Gamma_mathrmupper(r) f_Kw(v_zetav_rv_z)","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"A 'recycling fraction' is included, defined so that a fraction 0 leq R_mathrmrecycle leq 1 of the ions hitting the wall are recycled as neutrals, while the whole flux of neutrals hitting the wall is always recycled. (Recycling the 100% of the neutral flux means that the net flux of neutrals - hitting the wall plus recycled - is R_mathrmrecycle times the ion flux, which makes applying boundary conditions in the moment-kinetic approach simpler, see the next section.) This results in","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n Gamma_mathrmlower(r) = R_mathrmrecycle fracB_zB 2pi int_0^infty dv_perp int_-infty^0 dv_parallel v_parallel f_i(r-L2v_perpv_parallel) \n quad + int dv_zetadv_r int_-infty^0 dv_z v_z f_n(r-L2v_zetav_rv_z) \n Gamma_mathrmupper(r) = R_mathrmrecycle fracB_zB 2pi int_0^infty dv_perp int_0^infty dv_parallel v_parallel f_i(rL2v_perpv_parallel) \n quad + int dv_zetadv_r int_0^infty dv_z v_z f_n(rL2v_zetav_rv_z)\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"For 1D1V, we 'marginalise' – i.e. integrate over v_perp, assuming that v_parallel=v_z (i.e. the magnetic field is perpendicular to the wall so B_zB = 1) – (see Excalibur report TN-08) which gives","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n f_Kw1V(v_parallel) = int dv_zeta dv_r f_Kw(v_zetav_rv_parallel) = 2pi int dv_perpv_perp f_Kw(v_perpv_parallel) \n = 3sqrtpi left(fracm_i2T_mathrmwallright)^32v_parallelmathrmerfcleft(sqrtfracm_i2T_mathrmwallv_parallelright)\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Moment-constraints-2","page":"Wall boundary conditions with moment constraints","title":"Moment constraints","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"When using the moment kinetic approach, we first need to apply a boundary condition to the moments so that the net flux of neutrals leaving the wall matches the recycling fraction R_mathrmrecycle times the flux of ions reaching the wall","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n u_paralleln(z=pm L2) = -R_mathrmrecycle fracn_i(z=pm L2) u_paralleli(z=pm L2)n_n(z=pm L2)\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"Having enforced the boundary condition on the flux, we need to impose that the outgoing neutrals have the shape of a Knudsen cosine distribution, and ensure that the constraints (Constraints on normalized distribution function) are satisfied. To impose three constraints we need three free parameters. Taking as before the updated, incoming part of the neutral distribution function before moment corrections to be","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n hatg_mathrmin(w_parallel) =\n begincases\n H(-w_parallel v_mathrmthn - u_paralleln)hatg(zw_parallel) textat z = -L2 \n H(w_parallel v_mathrmthn + u_paralleln)hatg(zw_parallel) textat z = +L2\n endcases\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"and the shape for the Knudsen distribution to be","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n hatg_Kw(w_parallel) =\n begincases\n H(w_parallel v_mathrmthn + u_paralleln)f_Kw1V(w_parallel v_mathrmthn + u_paralleln) textat z = -L2 \n H(-w_parallel v_mathrmthn - u_paralleln)f_Kw1V(w_parallel v_mathrmthn + u_paralleln) textat z = +L2\n endcases\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"we define the final updated distribution function to be","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n tildeg_n(w_parallel) = N_mathrmout hatg_Kw + N_mathrmin hatg_mathrmin + C w_parallel hatg_mathrmin\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"(note that if we chose to use v_parallel = w_parallel v_mathrmthn + u_paralleln instead of w_parallel in the final term with the C coefficient, this is just a shift by a constant and scale by another constant, so would have the same form, just with different (but equivalent) values of the N_mathrmin and C coefficients).","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"Defining the integrals","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n I_n = int dw_parallel w_parallel^n hatg_mathrmin(w_parallel)\n K_n = int dw_parallel w_parallel^n hatg_Kw(w_parallel)\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"the constraints are","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n frac1sqrtpiint dw_tildeg_n=1 =frac1sqrtpiint dw_left(N_mathrmout hatg_Kw + N_mathrmin hatg_mathrmin + C w_parallel hatg_mathrminright) \n = N_mathrmout K_0 + N_mathrmin I_0 + C I_1 \n frac1sqrtpiint dw_w_tildeg_n=0 =frac1sqrtpiint dw_left(N_mathrmout w_ hatg_Kw + N_mathrmin w_ hatg_mathrmin + C w_parallel^2 hatg_mathrminright) \n = N_mathrmout K_1 + N_mathrmin I_1 + C I_2 \n frac1sqrtpiint dw_w_^2tildeg_n=frac12 =frac1sqrtpiint dw_left(N_mathrmout w_^2 hatg_Kw + N_mathrmin w_^2 hatg_mathrmin + C w_parallel^3 hatg_mathrminright) \n = N_mathrmout K_2 + N_mathrmin I_2 + C I_3\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"which can be solved to find","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"
      \n[ intermediate steps ]","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n C = fracleft(frac12 - N_mathrmout K_2 - N_mathrmin I_2right)I_3 \n N_mathrmout = fracleft(-N_mathrmin I_1 - C I_2 right)K_1 \n = -fracN_mathrmin I_1K_1 - fracI_2 left(frac12 - N_mathrmout K_2 - N_mathrmin I_2right)K_1 I_3 \n N_mathrmout K_1 I_3 = -N_mathrmin I_1 I_3 - I_2 left(frac12 - N_mathrmout K_2 - N_mathrmin I_2right) \n N_mathrmout = -fracleft(N_mathrmin left(I_1 I_3 - I_2^2right) + frac12 I_2right)left(K_1 I_3 - K_2 I_2right) \n N_mathrmin = fracleft(1 - N_mathrmout K_0 - C I_1right)I_0 \n = fracleft(1 - N_mathrmout K_0right)I_0 - fracC I_1I_0 \n = fracleft(1 - N_mathrmout K_0right)I_0 - fracI_1 left(frac12 - N_mathrmout K_2 - N_mathrmin I_2right)I_0 I_3 \n N_mathrmin I_0 I_3 = left(1 - N_mathrmout K_0right)I_3 - I_1 left(frac12 - N_mathrmout K_2 - N_mathrmin I_2right) \n N_mathrmin left(I_0 I_3 - I_1 I_2right) = I_3 - frac12 I_1 - N_mathrmout left(K_0 I_3 - I_1 K_2right) \n N_mathrmin left(I_0 I_3 - I_1 I_2right) = I_3 - frac12 I_1 + left(K_0 I_3 - I_1 K_2right) fracleft(N_mathrmin left(I_1 I_3 - I_2^2right) + frac12 I_2right)left(K_1 I_3 - K_2 I_2right) \n N_mathrmin left(I_0 I_3 - I_1 I_2right) left(K_1 I_3 - K_2 I_2right) = left(I_3 - frac12 I_1right) left(K_1 I_3 - K_2 I_2right) + left(K_0 I_3 - I_1 K_2right) left(N_mathrmin left(I_1 I_3 - I_2^2right) + frac12 I_2right) \n N_mathrmin left( left(I_0 I_3 - I_1 I_2right) left(K_1 I_3 - K_2 I_2right) - left(K_0 I_3 - I_1 K_2right) left(I_1 I_3 - I_2^2right) right) = left(I_3 - frac12 I_1right) left(K_1 I_3 - K_2 I_2right) + left(K_0 I_3 - I_1 K_2right) frac12 I_2 \n N_mathrmin left( K_0 I_3 left(I_2^2 - I_1 I_3right) + K_1 I_3 left(I_0 I_3 - I_1 I_2right) + K_2 left(cancelI_1 I_2^2 - I_0 I_2 I_3 + I_1^2 I_3 - cancelI_1 I_2^2right)right) = frac12 K_0 I_2 I_3 + K_1 I_3 left(I_3 - frac12 I_1right) + K_2 left(cancelfrac12 I_1 I_2 - I_2 I_3 - cancelfrac12 I_1 I_2 right) \n N_mathrmin left( K_0 left(I_2^2 - I_1 I_3right) + K_1 left(I_0 I_3 - I_1 I_2right) + K_2 left(I_1^2 - I_0 I_2right)right) = frac12 K_0 I_2 + K_1 left(I_3 - frac12 I_1right) - K_2 I_2 \n N_mathrmin = fracleft(frac12 K_0 I_2 + K_1 left(I_3 - frac12 I_1right) - K_2 I_2right)left( K_0 left(I_2^2 - I_1 I_3right) + K_1 left(I_0 I_3 - I_1 I_2right) + K_2 left(I_1^2 - I_0 I_2right)right) \nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"
      ","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n C = fracleft(frac12 - N_mathrmout K_2 - N_mathrmin I_2right)I_3 \n N_mathrmout = -fracleft(N_mathrmin left(I_1 I_3 - I_2^2right) + frac12 I_2right)left(K_1 I_3 - K_2 I_2right) \n N_mathrmin = fracleft(frac12 K_0 I_2 + K_1 left(I_3 - frac12 I_1right) - K_2 I_2right)left( K_0 left(I_2^2 - I_1 I_3right) + K_1 left(I_0 I_3 - I_1 I_2right) + K_2 left(I_1^2 - I_0 I_2right)right)\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Evolving-u_\\parallel-2","page":"Wall boundary conditions with moment constraints","title":"Evolving u_parallel","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"When evolving only u_parallel and n separately, we only need two constraints. This corresponds to C=0 so that","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n N_mathrmout = -fracI_1K_1 N_mathrmin \n N_mathrmin = frac1I_0 - fracK_0 I_1K_1\nendalign","category":"page"},{"location":"wall_boundary_conditions/#Evolving-n-2","page":"Wall boundary conditions with moment constraints","title":"Evolving n","text":"","category":"section"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"When only evolving n separately, we still have C=0, but N_mathrmin and N_mathrmout must be adjusted to impose the density-moment constraint and the flux boundary condition.","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n frac1sqrtpiint dv_tildeg_n=1 = frac1sqrtpiint dv_left(N_mathrmout hatg_Kw + N_mathrmin hatg_mathrminright) \n = N_mathrmout K_0 + N_mathrmin I_0 \n frac1sqrtpiint dv_v_tildeg_n = u_n = frac1sqrtpiint dv_left(N_mathrmout v_ hatg_Kw + N_mathrmin v_ hatg_mathrmin right) \n = N_mathrmout K_1 + N_mathrmin I_1\nendalign","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"where u_n is calculated from the ion flux as above, which can be solved to give","category":"page"},{"location":"wall_boundary_conditions/","page":"Wall boundary conditions with moment constraints","title":"Wall boundary conditions with moment constraints","text":"beginalign\n N_mathrmout = fracleft(u_n - N_mathrmin I_1right)K_1 \n 1 = N_mathrmin I_0 + fracK_0 left(u_n - N_mathrmin I_1right)K_1 \n Rightarrow N_mathrmin = fracleft(1 - fracK_0 u_nK_1right)left(I_0 - fracK_0 I_1K_1right)\nendalign","category":"page"},{"location":"zz_fokker_planck_test/#fokker_planck_test","page":"fokker_planck_test","title":"fokker_planck_test","text":"","category":"section"},{"location":"zz_fokker_planck_test/","page":"fokker_planck_test","title":"fokker_planck_test","text":"Modules = [moment_kinetics.fokker_planck_test]","category":"page"},{"location":"zz_fokker_planck_test/#moment_kinetics.fokker_planck_test","page":"fokker_planck_test","title":"moment_kinetics.fokker_planck_test","text":"module for including functions used in testing the implementation of the the Full-F Fokker-Planck Collision Operator\n\n\n\n\n\n","category":"module"},{"location":"zz_fokker_planck_test/#moment_kinetics.fokker_planck_test.Cssp_fully_expanded_form-NTuple{17, Any}","page":"fokker_planck_test","title":"moment_kinetics.fokker_planck_test.Cssp_fully_expanded_form","text":"Function calculating the fully expanded form of the collision operator taking floats as arguments. This function is designed to be used at the lowest level of a coordinate loop, with derivatives and integrals all previously calculated.\n\n\n\n\n\n","category":"method"},{"location":"zz_fokker_planck_test/#moment_kinetics.fokker_planck_test.calculate_collisional_fluxes-NTuple{10, Any}","page":"fokker_planck_test","title":"moment_kinetics.fokker_planck_test.calculate_collisional_fluxes","text":"calculates the collisional fluxes given input Fs and Gsp, H_sp\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_r_advection/#neutral_r_advection","page":"neutral_r_advection","title":"neutral_r_advection","text":"","category":"section"},{"location":"zz_neutral_r_advection/","page":"neutral_r_advection","title":"neutral_r_advection","text":"Modules = [moment_kinetics.neutral_r_advection]","category":"page"},{"location":"zz_neutral_r_advection/#moment_kinetics.neutral_r_advection","page":"neutral_r_advection","title":"moment_kinetics.neutral_r_advection","text":"\n\n\n\n","category":"module"},{"location":"zz_neutral_r_advection/#moment_kinetics.neutral_r_advection.neutral_advection_r!-NTuple{13, Any}","page":"neutral_r_advection","title":"moment_kinetics.neutral_r_advection.neutral_advection_r!","text":"do a single stage time advance in r (potentially as part of a multi-stage RK scheme)\n\n\n\n\n\n","category":"method"},{"location":"zz_neutral_r_advection/#moment_kinetics.neutral_r_advection.update_speed_neutral_r!-NTuple{6, Any}","page":"neutral_r_advection","title":"moment_kinetics.neutral_r_advection.update_speed_neutral_r!","text":"calculate the advection speed in the r-direction at each grid point\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#utils","page":"utils","title":"utils","text":"","category":"section"},{"location":"zz_utils/","page":"utils","title":"utils","text":"Modules = [moment_kinetics.utils]","category":"page"},{"location":"zz_utils/#moment_kinetics.utils","page":"utils","title":"moment_kinetics.utils","text":"Utility functions\n\n\n\n\n\n","category":"module"},{"location":"zz_utils/#moment_kinetics.utils.enum_from_string-Tuple{Any, Any}","page":"utils","title":"moment_kinetics.utils.enum_from_string","text":"enum_from_string(enum_type, name)\n\nGet an the value of enum_type, whose name is given by the String (or Symbol) name.\n\nReturns nothing if the name is not found.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_CFL","page":"utils","title":"moment_kinetics.utils.get_CFL","text":"get_CFL!(CFL, speed, coord)\n\nCalculate the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection. Note that moment_kinetics is set up so that dimension in which advection happens is the first dimension of speed - coord is the coordinate corresponding to this dimension.\n\nThe result is written in CFL. This function is only intended to be used in post-processing.\n\n\n\n\n\n","category":"function"},{"location":"zz_utils/#moment_kinetics.utils.get_backup_filename-Tuple{Any}","page":"utils","title":"moment_kinetics.utils.get_backup_filename","text":"Append a number to the filename, to get a new, non-existing filename to backup the file to.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_default_restart_filename-Tuple{Any, Any}","page":"utils","title":"moment_kinetics.utils.get_default_restart_filename","text":"get_default_restart_filename(io_input, prefix; error_if_no_file_found=true)\n\nGet the default name for the file to restart from, using the input from io_input.\n\nprefix gives the type of file to open, e.g. \"moments\", \"dfns\", or \"initial_electron\".\n\nIf no matching file is found, raise an error unless error_if_no_file_found=false is passed, in which case no error is raised and instead the function returns nothing.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_minimum_CFL_neutral_vz-Tuple{AbstractArray{T, 5} where T, Any}","page":"utils","title":"moment_kinetics.utils.get_minimum_CFL_neutral_vz","text":"get_minimum_CFL_neutral_vz(speed, vz)\n\nCalculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection of neutrals in the vz direction.\n\nReduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_minimum_CFL_neutral_z-Tuple{AbstractArray{T, 5} where T, Any}","page":"utils","title":"moment_kinetics.utils.get_minimum_CFL_neutral_z","text":"get_minimum_CFL_neutral_z(speed, z)\n\nCalculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection of neutrals in the z direction.\n\nReduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_minimum_CFL_vpa-Tuple{AbstractArray{T, 4} where T, Any}","page":"utils","title":"moment_kinetics.utils.get_minimum_CFL_vpa","text":"get_minimum_CFL_vpa(speed, vpa)\n\nCalculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection in the vpa direction.\n\nReduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_minimum_CFL_z-Tuple{AbstractArray{T, 4} where T, Any}","page":"utils","title":"moment_kinetics.utils.get_minimum_CFL_z","text":"get_minimum_CFL_z(speed, z)\n\nCalculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection in the z direction.\n\nReduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_prefix_iblock_and_move_existing_file-Tuple{Any, Any}","page":"utils","title":"moment_kinetics.utils.get_prefix_iblock_and_move_existing_file","text":"get_prefix_iblock_and_move_existing_file(restart_filename, output_dir)\n\nMove restart_filename to a backup location (if it is in output_dir), returning a prefix and block-index (which might be nothing) which can be used to open the file for reloading variables.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.get_unnormalized_parameters","page":"utils","title":"moment_kinetics.utils.get_unnormalized_parameters","text":"get_unnormalized_parameters(input::Dict)\nget_unnormalized_parameters(input_filename::String)\n\nGet many parameters for the simulation setup given by input or in the file input_filename, in SI units and eV, returned as an OrderedDict.\n\n\n\n\n\n","category":"function"},{"location":"zz_utils/#moment_kinetics.utils.merge_dict_with_kwargs!-Tuple{Any}","page":"utils","title":"moment_kinetics.utils.merge_dict_with_kwargs!","text":"Dict merge function for named keyword arguments for case when input Dict is a mixed Dict of Dicts and non-Dict float/int/string entries, and the keyword arguments are also a mix of Dicts and non-Dicts\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.print_unnormalized_parameters-Tuple","page":"utils","title":"moment_kinetics.utils.print_unnormalized_parameters","text":"print_unnormalized_parameters(input)\n\nPrint many parameters for the simulation setup given by input (a Dict of parameters or a String giving a filename), in SI units and eV.\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.recursive_merge","page":"utils","title":"moment_kinetics.utils.recursive_merge","text":"recursive_merge(a, b)\n\nMerge two AbstractDicts a and b. Any elements that are AbstractDicts are also merged (rather than just replacing with the entry in b).\n\n\n\n\n\n","category":"function"},{"location":"zz_utils/#moment_kinetics.utils.to_hours-Tuple{T} where T<:Dates.TimePeriod","page":"utils","title":"moment_kinetics.utils.to_hours","text":"to_hours(x::T) where {T<:TimePeriod}\n\nConvert a time period x to seconds\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.to_minutes-Tuple{T} where T<:Dates.TimePeriod","page":"utils","title":"moment_kinetics.utils.to_minutes","text":"to_minutes(x::T) where {T<:TimePeriod}\n\nConvert a time period x to seconds\n\n\n\n\n\n","category":"method"},{"location":"zz_utils/#moment_kinetics.utils.to_seconds-Tuple{T} where T<:Dates.TimePeriod","page":"utils","title":"moment_kinetics.utils.to_seconds","text":"to_seconds(x::T) where {T<:TimePeriod}\n\nConvert a time period x to seconds\n\n\n\n\n\n","category":"method"},{"location":"getting_started/#Getting-started","page":"Getting started","title":"Getting started","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"The full documentation is online at https://mabarnes.github.io/moment_kinetics.","category":"page"},{"location":"getting_started/#Setup","page":"Getting started","title":"Setup","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"First clone this git repository, e.g. (to clone it into a directory with the default name moment_kinetics)","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ git clone git@github.com:mabarnes/moment_kinetics","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"The command above assumes that you have an account on Github.com, and that account has ssh keys set up. If that is not the case you can clone using https instead","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ git clone https://github.com/mabarnes/moment_kinetics","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"When using https some things (e.g. pushing to the remote repository) may require you to use 2-factor authentication, see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"warning: Warning\nDo not download the zip-file from the Github.com page. This gives you the source code files but does not create a git repository. We get some version information from git when running the code, so without the git repository you will not be able to run a simulation.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"If you have already installed Julia, ensure that the Julia version is >= 1.9.0 by doing $ julia --version at command line. The setup script in step 2 can also download a Julia binary if you have not already installed Julia.\nIf you are running on a desktop/laptop (rather than an HPC cluster) ensure that you have an MPI implementation installed (using whatever the usual way of installing software is on your system). It should not matter which MPI implementation - openmpi is often a good choice if you have no reason to prefer a particular one. Check that the MPI compiler wrapper mpicc is available, e.g. $ mpicc --version should run without an error.\nRun the setup script $ machines/machine_setup.sh This script will prompt you for various options. The default choices should be sensible in most cases. On a laptop/desktop the 'name of machine to set up' will be 'generic-pc' and will set up for interactive use. On supported clusters, 'name of machine' will be the name of the cluster. On other clusters 'generic-batch' can be used, but requires some manual setup (see machines/generic-batch-template/README.md).\nFor more information, see machine_setup notes.\nIf you want or need to set up 'by hand' without using machines/machine_setup.sh, see Manual setup.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Some other notes that might sometimes be useful:","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To speed up running scripts or the first call of run_moment_kinetics in a REPL session, it is possible to compile a 'system image' (moment_kinetics.so). By running $ julia --project -O3 precompile.jl and then start Julia by running for example $ julia --project -O3 -Jmoment_kinetics.so this significantly decreases the load time but prevents code changes from taking effect when moment_kinetics.so is used until you repeat the compilation of the system image. Note that this also prevents the Revise package from updating moment_kinetics when you edit the code during and interactive session.\nSystem images are created by default on HPC clusters, and are required to use the provided jobscript-*.template submission scripts (used by submit-run.sh and submit-restart.sh). This is to try and minimise the compilation that has to be replicated on all the (possibly thousands of) processes in a parallel run. After changing source code, you should run $ precompile-submit.sh (to re-compile the moment_kinetics.so system image).\nIn the course of development, it is sometimes helpful to upgrade the Julia version. Upgrading the version of Julia or upgrading packages may require a fresh installation of moment_kinetics. To make a fresh install with the latest package versions you should be able to just run julia pkg> update (to enter 'Package mode' enter ']' at the julia> prompt). It might sometimes necessary or helpful to instead remove (or rename) the Manifest.jl file in the main directory, and re-run the setup from step 2) above. It can sometimes be necessary to remove or rename the .julia/ directory (located by default in your home directory) to force all the dependencies to be rebuilt.\nWhen using the Plots-based post-processing library, one may have to set an environment variable to avoid error messages from the Qt library. If you execute the command $ julia --project run_post_processing.jl runs/your_run_dir/ and see the error message qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin \"xcb\" in \"\" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. this can be suppressed by setting export QT_QPA_PLATFORM=offscreen in your .bashrc or .bash_profile files.","category":"page"},{"location":"getting_started/#Run-a-simulation","page":"Getting started","title":"Run a simulation","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To run julia with optimization, type","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia -O3 --project run_moment_kinetics.jl input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Note that the middle character in -O3 is a capital letter 'O', not a zero. (On HPC clusters, or if you selected the \"set up separate packages for post processing\" option from machines/machine_setup.sh, you should use -O3 --check-bounds=no instead of just -O3, and the same in the Restarting section.)","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Options are specified in a TOML file, e.g. input.toml here. The defaults are specified in moment_kinetics_input.jl.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To run in parallel, just put mpirun -np in front of the call you would normally use, with the number of processes to use.\nIt may be more convenient when running moment_kinetics more than once to work from the Julia REPL, e.g. $ julia -O3 --project julia> using moment_kinetics julia> run_moment_kinetics(\"input.toml\") where input is the name of a TOML file containing the desired options. It is also possible to pass a Dict() containing any non-default options desired, which might sometimes be useful in tests or scripts julia> run_moment_kinetics(input) Especially when developing the code, a lot of compilation time can be saved by using Revise.jl, and re-running a test case in the REPL (without restarting julia) - this is enabled by default when setting up using machines/machine_setup.sh for 'generic-pc'.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"On an HPC cluster, you can submit a simulation (using the input file input.toml) to the batch queue using the convenience script","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-run.sh input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"See the help text","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-run.sh -h","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"for various command line options to change parameters (e.g. number of nodes, etc.).","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"If you need to rebuild the system images moment_kinetics.so and makie_postproc.so or plots_postproc.so because you have updated the code since they were built, it may be convenient to use","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-precompile-and-run.sh input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"which will submit jobs for compilation, to run the simulation, and to do post processing. The simulation job will wait for the compilation job creating moment_kinetics.so to finish before starting. The post processing job will wait for the compilation job creating makie_postproc.so or plots_postproc.so to finish before starting.","category":"page"},{"location":"getting_started/#Stopping-a-run","page":"Getting started","title":"Stopping a run","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"When running in the REPL (especially with MPI) interrupting a run using Ctrl-C can mess things up, and require you to restart Julia. There is also a chance that you might interrupt while writing the output files and corrupt them. To avoid these problems, you can stop the run cleanly (including writing the distribution functions at the last time point, so that it is possible to restart the run from where you stopped it), by creating an empty file called stop in the run directory. For example, if the name of your run is 'my_example'","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ touch runs/my_example/stop","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"moment_kinetics checks for this file when it is going to write output, and if it is present writes all output and then returns cleanly. The 'stop file' is deleted when a run is (re-)started, if present, so you do not have to manually delete it before (re-)starting the run again.","category":"page"},{"location":"getting_started/#Restarting","page":"Getting started","title":"Restarting","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To restart a simulation using input.toml from the last time point in the existing run directory,","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia -O3 --project run_moment_kinetics --restart input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"or to restart from a specific output file - either from the same run or (if the settings are compatible, see below) a different one - here runs/example/example.dfns.h5","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia -O3 --project run_moment_kinetics input.toml runs/example/example.dfns.h5","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"The output file must include distribution functions. When not using parallel I/O there will be multiple output files from different MPI ranks - any one of these can be passed.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To do the same from the Julia REPL","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia -O3 --project\njulia> run_moment_kinetics(\"input.toml\", restart=true)","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"or","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"julia> run_moment_kinetics(\"input.toml\", restart=\"runs/example/example.dfns.h5\")","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"When calling the run_moment_kinetics() function you can also choose a particular time index to restart from, e.g.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"julia> run_moment_kinetics(\"input.toml\", restart=\"runs/example/example.dfns.h5\", restart_time_index=42)","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"On an HPC cluster, you can submit a restart (using the input file input.toml) to the batch queue using the convenience script","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-restart.sh input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"or to restart from a particular output file","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-restart.sh -r runs/example/example.dfns.h5 input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"See the help text","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-restart.sh -h","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"for various other command line options to change parameters (e.g. number of nodes, etc.).","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"If you need to rebuild the system images moment_kinetics.so and makie_postproc.so or plots_postproc.so because you have updated the code since they were built, it may be convenient to use","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ ./submit-precompile-and-restart.sh [-r runs/example/example.dfns.h5] input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"which will submit jobs for compilation, to restart the simulation, and to do post processing. The simulation job will wait for the compilation job creating moment_kinetics.so to finish before starting. The post processing job will wait for the compilation job creating makie_postproc.so or plots_postproc.so to finish before starting.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"It is possible to restart a run from another output file with different resolution settings or different moment-kinetic options. This is done by interpolating variables from the old run onto the new grid.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"When interpolating in spatial dimensions it is not recommended to change the length of the domain.\nFor velocity space dimensions, changing the size of the domain should be OK. Points outside the original domain will be filled with propto exp(-v^2) decreasing values.\nWhen changing from 1D (no r-dimension) to 2D (with r-dimension), the interpolated values will be constant in r.\nWhen changing from 1V to 2V or 3V, the interpolated values will be proportional to exp(-v_j^2) in the new dimension(s).","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"When running in parallel, both the old and the new grids must be compatible with the distributed-MPI parallelisation. When not using Parallel I/O, the distributed-MPI domain decomposition must be identical in the old and new runs (as each block only reads from a single file).","category":"page"},{"location":"getting_started/#Post-processing-with-makie_post_processing","page":"Getting started","title":"Post-processing with makie_post_processing","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"The default post-processing module, written to be a bit more generic and flexible than the original Plots-based one, and able to be used interactively, is provided in makie_post_processing, see Post processing.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"On an HPC cluster, when you call ./submit-run.sh or ./submit-restart.sh, a job will (by default) be submitted to run makie_post_processing.makie_post_process or plots_post_processing.analyze_and_plot_data (depending on which you have set up, or on whether you pass the -o argument when both are set up) on the output after the run is finished. You can skip this by passing the -a argument to ./submit-run.sh or ./submit-restart.sh.","category":"page"},{"location":"getting_started/#Original,-Plots-based-post-processing-quickstart","page":"Getting started","title":"Original, Plots-based post processing quickstart","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"This post-processing functionality is now disabled by default, but you can enable it by entering y at the \"Would you like to set up plots_post_processing?\" prompt in machines/machine_setup.sh.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To make plots and calculate frequencies/growth rates, run","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia --project -O3 run_post_processing.jl runs/","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"passing the directory to process as a command line argument. Input options for post-processing can be specified in post_processing_input.jl. Note that even when running interactively, it is necessary to restart Julia after modifying post_processing_input.jl.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Post processing can be done for several directories at once using","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia --project -O3 post_processing_driver.jl runs/ runs/ ...","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"passing the directories to process as command line arguments. Optionally pass a number as the first argument to parallelise post processing of different directories.","category":"page"},{"location":"getting_started/#Parallel-I/O","page":"Getting started","title":"Parallel I/O","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To enable parallel I/O, HDF5.jl needs to be configured to use an HDF5 library which has MPI enabled and is compiled using the same MPI as you run Julia with. To ensure this happens, machines/machine_setup.sh will download the HDF5 source code and compile a local copy of the library under machines/artifacts, unless you enter n at the \"Do you want to download, and compile a local version of HDF5\" prompt (except on known HPC clusters where an MPI-enabled HDF5 is provided by a module - this is currently true on ARCHER2 - where the module-provided HDF5 is used).","category":"page"},{"location":"getting_started/#Running-parameter-scans","page":"Getting started","title":"Running parameter scans","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Parameter scans (see Parameter scans) can be performed by running","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia -O3 --project run_parameter_scan.jl path/to/scan/input.toml","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"If running a scan, it can be parallelised by passing the -p argument to julia, e.g. to run on 8 processes","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"$ julia -p 8 -O3 --project run_parameter_scan.jl path/to/scan/input.toml","category":"page"},{"location":"getting_started/#Tests","page":"Getting started","title":"Tests","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"There is a test suite in the test/ subdirectory. It can be run in a few ways:","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Execute some or all of the tests as a script. For example in the terminal run $ julia -O3 --project moment_kinetics/test/runtests.jl or in the REPL run julia> include(\"moment_kinetics/test/runtests.jl\") Individual test files can also be used instead of runtests.jl, which runs all the tests.\nYou can also run the tests using Pkg. Either using pkg> mode $ julia -O3 --project julia> (moment_kinetics) pkg> test moment_kinetics using Pkg in the REPL $ julia -O3 --project julia> import Pkg julia> Pkg.test(\"moment_kinetics\") or run on the command line julia -O3 --project -e \"import Pkg; Pkg.test(\"moment_kinetics\")` The downside of this method is that it will cause NCDatasets to be installed if you did not install it already, which might sometimes cause linking errors (related to the HDF5 library, see Optional dependencies).","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"By default the test suite should run fairly quickly (in a few minutes). To do so, it skips many cases. To run more comprehensive tests, you can activate the --long option:","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"In the REPL, run julia> push!(ARGS, \"--long\") before running the tests.\nRunning from the terminal, pass as a command line argument, e.g. $ julia -O3 --project --long moment_kinetics/test/runtests.jl\nUsing test_args argument julia> Pkg.test(\"moment_kinetics\"; test_args=[\"--long\"]) Note the semicolon is necessary.","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"To get more output on what tests were successful, an option --verbose (or -v) can be passed in a similar way to --long (if any tests fail, the output is printed by default).","category":"page"},{"location":"getting_started/#Manufactured-Solutions-Tests","page":"Getting started","title":"Manufactured Solutions Tests","text":"","category":"section"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"In addition to the test suite in the test/ subdirectory, the moment_kinetics project utilises the method of manufactured solutions to test more complicated models in 1D1V, and 2D2V or 2D3V (for neutral particles). To run these tests we run a normal moment_kinetics simulation, making use of the manufacted solutions test TOML options. We describe how to use the existing tests below. To set up moment_kinetics to use the manufactured solutions features, take the following steps:","category":"page"},{"location":"getting_started/","page":"Getting started","title":"Getting started","text":"Install moment_kinetics using the setup instructions above (Setup), using the plots_post_processing project and make sure that the Symbolics package is installed, e.g., if following the manual setup instructions (Manual setup), these commands would be $ julia -O3 --project julia> ] develop ./moment_kinetics develop ./plots_post_processing/plots_post_processing add Symbolics if you will run the tests with MPI, make sure that MPI is also installed at this step.\nSelect an input file representing the desired test. For example, we can pick from the list MMS input TOML list.\nRun the input file using the usual command. julia> using moment_kinetics julia> run_moment_kinetics(\"runs/your_MMS_test_input.toml\")\nUse the post processing module to test the error norms for the simulation of interest. julia> using plots_post_processing julia> analyze_and_plot_data(\"runs/your_MMS_test_input\") This will print out a series of numbers to the terminal which represent the error norms for each field and distribution function compared to the exact analytical solution, at each time step in the simulation. This error data can be computed for different resolutions.\nFinally, to partially automate this last step when a resolution scan is performed, we provide functions for generating plots of the error data versus resolutions in the file plot_MMS_sequence.jl in the plots_post_processing project. This can be accessed by using the run_MMS_test.jl script from the command line\n$ julia -O3 --project run_MMS_test.kl\nor by using the underlying functions in the REPL\nimport plots_post_processing\nusing plots_post_processing.plot_MMS_sequence\nrun_mms_test()\nNote that currently the lists of files used as input for the plotting functions are hardcoded for the purposes of self-documenting the tests – these lists could be made input parameters to improve these scripts.","category":"page"},{"location":"machine_setup_notes/#machine_setup-notes","page":"machine_setup notes","title":"machine_setup notes","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"The machines subdirectory provides scripts to set up Julia and moment_kinetics to run on laptops/desktops or on clusters. If the cluster is not one of the currently supported machines, then some additional manual setup is required.","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"Currently supported:","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"\"generic-pc\" - A generic personal computer (i.e. laptop or desktop machine). Set up for interactive use, rather than for submitting jobs to a batch queue.\n\"generic-batch\" - A generic cluster using a batch queue. Requires some manual setup first, see machines/generic-batch-template/README.md.\n\"archer\" - the UK supercomputer ARCHER2\n\"marconi\" - the EUROfusion supercomputer Marconi","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"The usage is described in Getting started. This page contains some extra technical information.","category":"page"},{"location":"machine_setup_notes/#Notes-on-some-prompts-from-the-script","page":"machine_setup notes","title":"Notes on some prompts from the script","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"You will be prompted to enter a location for your .julia directory. If you are installing on a personal computer or on a cluster which allows access to your home directory from compute nodes, it is fine to leave this as the default. If not (e.g. on ARCHER2), you need to set a path which is accessible from the compute nodes. If you want to create a completely self-contained install (e.g. for reproducibility or for debugging some dependency conflicts), you might want to put .julia within the moment_kinetics directory (i.e. enter .julia at the prompt).","category":"page"},{"location":"machine_setup_notes/#Defaults-for-prompts","page":"machine_setup notes","title":"Defaults for prompts","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"The default value for each of the settings that the user is prompted for interactively are first taken from some sensible, machine-specific defaults. When machines/machine_setup.sh is run, the values chosen by the user are saved in the [moment_kinetics] section of LocalPreferences.toml, and these values are used as the defaults next time machines/machine_setup.sh is run, in order to make it easier to re-run the setup, e.g. because some dependencies need updating, or to change just one or a few settings.","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"A few settings (which are needed before Julia can be started for the first time) are saved into hidden files (.julia_default.txt, .this_machine_name.txt, and .julia_directory_default.txt) instead of into LocalPreferences.toml, to avoid needing to parse a TOML file using bash.","category":"page"},{"location":"machine_setup_notes/#bin/julia","page":"machine_setup notes","title":"bin/julia","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"A symlink or script is created at bin/julia to call the chosen julia executable. On HPC systems we create a file julia.env which must be source'd (to load the right modules, etc.) before julia can be used - in this case julia.env can be used to set up any environment variables, etc. so a symlink is sufficient. On laptops/desktops that will be used interactively, it is inconvenient to have to remember to source julia.env, especially if you have multiple instances of moment_kinetics, so instead the necessary setup (of the JULIA_DEPOT_PATH environment variable, if needed, and a Python venv if the Plots-based post processing is enabled) is done by making bin/julia a small bash script, which does that setup and then calls the chosen julia executable, passing through to it any command line arguments.","category":"page"},{"location":"machine_setup_notes/#julia.env","page":"machine_setup notes","title":"julia.env","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"A julia.env file is used on HPC systems to set up the environment (modules and environment variables). On laptop/desktop systems this would be inconvenient (especially if there are multiple instances of moment_kinetics) so a julia.env is not used for these.","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"The julia.env is created from a template julia.env which is located in the subdirectory of machines/ for the specific machine being set up.","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"If you need to run julia interactively (for moment_kinetics) on a machine that uses julia.env, either run source julia.env in each terminal session where you want to use moment_kinetics, or add it to your .bashrc (if this does not conflict with any other projects).","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"warning: Warning\nNote that julia.env runs module purge to remove any already loaded modules (to get a clean environment). It is therefore very likely to interfere with other projects.","category":"page"},{"location":"machine_setup_notes/#Setup-of-post-processing-packages","page":"machine_setup notes","title":"Setup of post processing packages","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"See Post processing packages.","category":"page"},{"location":"machine_setup_notes/#Use-of-system-images","page":"machine_setup notes","title":"Use of system images","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"On HPC clusters, creating system images moment_kinetics.so and for post processing makie_postproc.so and/or plots_postproc.so is required. This is to avoid (as far as practical) wasting CPU hours doing identical compilation in large parallel jobs. If you wanted to remove this requirement for some reason (although this is not recommended), you would need to go to the subdirectory of machines/ for the machine you are working on, and edit the jobscript-run.template, jobscript-restart.template, jobscript-postprocess.template, and jobscript-postprocess-plotsjl.template files to remove the -J*.so argument. If you do do this, please do not commit those changes and merge them to the master branch of moment_kinetics.","category":"page"},{"location":"machine_setup_notes/#Operations-done-by-machines/machine_setup.sh","page":"machine_setup notes","title":"Operations done by machines/machine_setup.sh","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"The convenience script machine_setup.sh is provide because the actual setup happens in multiple stages, with Julia being restarted in between (as this is required on some machines), and because the script is able to download Julia if Julia is not already installed.","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"The steps done by machines/machine_setp.sh are:","category":"page"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"Get the name of the 'machine' ('generic-pc', 'archer', etc.) so that machine-dependent setup can be done and machine-specific defaults can be used. ()\nDownload a Julia executable, or prompt the user for the location of one (defaulting to any julia found in $PATH).\nGet the location of the .julia directory to be used by (this copy of) moment_kinetics. At this point we have enough setup to start using julia. Export JULIA_DEPOT_PATH so that this is used any time julia is run in the rest of the script.\nRun machines/shared/machine_setup.jl. This script (whose functions are documented in API documentation):\nprompts the user for most of the settings (and saves them to LocalPreferences.toml from where they can be accessed by other scripts later and used as defaults if machines/machine_setup is re-run)\ncreates the julia.env file (from the template for the given machine) on HPC systems\ncreates the bin/julia symlink or script (see bin/julia)\ncreates a link to the compile_dependencies.sh script for the machine (if there is one).\ninstalls the Revise package and adds using Revise to the startup.jl file (on laptop/desktop systems, and if the user did not de-select this).\nIt is necessary to restart julia after this script has been run, so that we can first source julia.env (if it exists) or use the script at bin/julia in order to use the environment settings in them.\nIf julia.env exists, run source julia.env to load modules, etc.\nSet the optimization flags that will be used for running simulations or for running post processing. These need to be set the same as will be used eventually so that precompilation of dependencies and packages that happens while running machines/machine_setup.sh does not need to be overwritten (due to different optimization flags) later, as this would be a waste of time (although it should work fine).\nAdd various dependencies to the top-level project, by calling machines/shared/add_dependencies_to_project.jl. This will set up MPI and HDF5 to link to the correct libraries. julia needs to be restarted after the setup of MPI and HDF5 is done, which is why this is a separate script from the following one (this separation also allows add_dependencies_to_project.jl to be re-used in makie_post_processing_setup.jl and plots_post_processing_setup.jl if these are to be set up as separate projects from the top-level one).\nComplete the setup by running machines/shared/machine_setup_stage_two.jl, which creates a Python venv with matplotlib installed (if plots_post_processing is enabled), creates symlinks at the top level to scripts to submit batch jobs (if setting up for an HPC cluster), and submits a job to compile a system image for moment_kinetics (if setting up for an HPC cluster, and if the user did not de-select this).\nSet up makie_post_processing (if enabled) by running machines/shared/makie_post_processing_setup.jl and/or plots_post_processing (if enabled) by running machines/shared/plots_post_processing_setup.jl. These scripts also submit jobs to create system images for makie_post_processing or plots_post_processing (if setting up for an HPC cluster, and if the user did not de-select this).\nPrint a message indicating which optimization flags to use for running simulations or for post-processing.","category":"page"},{"location":"machine_setup_notes/#machine_setup_api_documentation","page":"machine_setup notes","title":"API documentation","text":"","category":"section"},{"location":"machine_setup_notes/","page":"machine_setup notes","title":"machine_setup notes","text":"Modules = [moment_kinetics.machine_setup]","category":"page"},{"location":"machine_setup_notes/#moment_kinetics.machine_setup","page":"machine_setup notes","title":"moment_kinetics.machine_setup","text":"Functions to help setting up on known machines\n\n\n\n\n\n","category":"module"},{"location":"machine_setup_notes/#moment_kinetics.machine_setup.get_setting","page":"machine_setup notes","title":"moment_kinetics.machine_setup.get_setting","text":"get_setting(setting_name, message, machine, local_defaults,\n possible_values=nothing)\n\nPrompt the user to set a setting called setting_name after printing message. Default value is read from local_defaults if it exists there (which it will do if it has been set before, as then it is stored in LocalPreferences.toml), or from sensible defaults in the machine section of default_settings otherwise.\n\n\n\n\n\n","category":"function"},{"location":"machine_setup_notes/#moment_kinetics.machine_setup.get_user_input-Tuple{Any, Any}","page":"machine_setup notes","title":"moment_kinetics.machine_setup.get_user_input","text":"get_user_input(possible_values, default_value)\n\nPrompt for user input. If the user enters nothing, return default_value. Check that the entered value is one of possible_values, if not prompt again.\n\n\n\n\n\n","category":"method"},{"location":"machine_setup_notes/#moment_kinetics.machine_setup.machine_setup_moment_kinetics-Tuple{String}","page":"machine_setup notes","title":"moment_kinetics.machine_setup.machine_setup_moment_kinetics","text":"machine_setup_moment_kinetics(machine::String; ; no_force_exit::Bool=false,\n interactive::Bool=true)\n\nDo setup for a known machine, prompting the user for various settings (with defaults set to sensible values - if the script has been run before, the defaults are the previously used values):\n\nOn clusters that use a module system, provide julia.env at the top level of the moment_kinetics repo.\nCall\nsource julia.env\nto get the correct modules for running moment_kinetics, either on the command line (to get them for the current session) or in your .bashrc (to get them by default). Note that this calls module purge so will remove any currently loaded modules when it is run.\nMakes a symlink to, or a bash script that calls, the Julia executable used to run this command at bin/julia under the moment_kinetics repo, so that setup and job submission scripts can use a known relative path.\nnote: Note\nIf you change the Julia executable, e.g. to update to a new verison, you will need to either replace the symlink /bin/julia or edit the bash script at /bin/julia by hand, or re-run this function using the new executable.\n\nUsually it is necessary for Julia to be restarted after running this function to run Julia with the correct JULIA_DEPOT_PATH, etc. so the function will force Julia to exit. If for some reason this is not desired (e.g. when debugging), pass no_force_exit=true.\n\nThe interactive argument exists so that when this function is called from another script, terminal output with instructions for the next step can be disabled.\n\nCurrently supported machines:\n\n\"generic-pc\" - A generic personal computer (i.e. laptop or desktop machine).. Set up for interactive use, rather than for submitting jobs to a batch queue.\n\"generic-batch\" - A generic cluster using a batch queue. Requires some manual setup first, see machines/generic-batch-template/README.md.\n\"archer\" - the UK supercomputer ARCHER2\n\"marconi\" - the EUROfusion supercomputer Marconi\n\nnote: Note\nThe settings created by this function are saved in LocalPreferences.toml. It might sometimes be useful to edit these by hand (e.g. the account setting if this needs to be changed.): it is fine to do this.\n\n\n\n\n\n","category":"method"}] } diff --git a/dev/shared_memory_debugging/index.html b/dev/shared_memory_debugging/index.html index af9b26c9f6..976c6f6024 100644 --- a/dev/shared_memory_debugging/index.html +++ b/dev/shared_memory_debugging/index.html @@ -1,2 +1,2 @@ -Shared memory debugging · moment_kinetics

      Shared memory debugging

      This debug_test directory contains scripts for running a set of short runs, intended to be used with the --debug flag to check for bugs (e.g. race conditions). The output is not checked - the intention is just to catch errors raised by the debugging checks.

      The inputs only have 3 time-steps, and very few grid points, because the debug checks are very slow. The actual output is not important, so it does not matter that the runs are badly under-resolved.

      It may be necessary to use the --compiled-modules=no flag to Julia for changes to the --debug setting to be picked up correctly. This setting means that all precompilation is redone each time Julia is started, which can be slow. An alternative workaround is to hard-code the moment_kinetics.debugging._debug_level variable in debugging.jl to the desired value.

      To run the debug tests, call (from the top-level moment_kinetics directory) something like

      julia --project --check-bounds=yes --compiled-modules=no debug_test/runtests.jl --debug 99

      Collision operator and 'anyv' region

      The collision operator uses a slightly hacky special set of functions for shared memory parallelism, to allow the outer loop over species and spatial dimensions to be parallelised, but also inner loops over vperp, vpa or vperp and vpa to be parallelised - changing the type of inner-loop parallelism within the outer loop. This happens within an 'anyv' region, which is started with the begin_s_r_z_anyv_region() function. The debug checks within an 'anyv' region only check for correctness on the sub-block communicator that parallelises over velocity space, so if there were errors due to incorrect species or spatial parallelism they would not (might not?) be detected. These errors should be unlikely as the collision operator only writes to a single species at a single spatial point.

      Finding race conditions

      The code is parallelized using MPI with shared memory arrays. 'Race conditions' can occur if a shared array is accessed incorrectly. All the processes sharing an array can be synchronized, ensuring they pass through the following code block with a consistent state, by using the _block_synchronize() function (which calls MPI.Barrier() to synchronize the processes). Race conditions occur if between consecutive calls to _block_synchronize() any array is:

      1. written by 2 or more processes at the same position
      2. written by one process at a certain position, and read by one or more other processes at the same position.

      If a race condition occurs, it can result in errors in the results. These are sometimes small, but often show inconsistent results between runs (because results erroneously depend on the execution order on different processes). They are undefined behaviour though, and so can also cause anything up to segfaults.

      The provided debugging routines can help to pin down where either of these errors happen.

      The @debug_shared_array macro (activated at --debug 2 or higher) counts all reads and writes to shared arrays by each process, and checks at each _block_synchronize() call whether either pattern has occurred since the previous _block_synchronize(). If they have and in addition @debug_track_array_allocate_location is active (--debug 3 or higher), then the array for which the error occured is identified by printing a stack-trace of the location where it was allocated, and the stack-trace for the exception shows the location of the _block_synchronize() call where the error occured.

      @debug_block_synchronize (activated at --debug 4)checks that all processes called _block_synchronize() from the same place - i.e. the same line in the code, checked by comparing stack traces.

      @debug_detect_redundant_block_synchronize (activated at --debug 5) aims to find any unnecessary calls to _block_synchronize(). These calls can be somewhat expensive (for large numbers of processes at least), so it is good to minimise the number. When this mode is active, at each _block_synchronize() a check is made whether there would be a race-condition error if the previous _block_synchronize() call was removed. If there would not be, then the previous call was unnecessary and could be removed. The tricky part is that whether it was necessary or not could depend on the options being used... Detecting redundant block_synchronize() calls requires that all dimensions that could be split over processes are actually split over processes, which demands a large number of processes are used. The @debug_detect_redundant_block_synchronize flag, when activated, modifies the splitting algorithm to force every dimension to be split if possible, and raise an error if not.

      Suggested debugging strategy for race conditions is:

      • Look at the loop types and ensure that there is an appropriate begin_*_region() call before each new loop type.
      • Run debug_test/runtests.jl with @debug_shared_array activated, but not @debug_detect_redundant_block_synchronize. It will be faster to first run without @debug_track_array_allocate_location to find failing tests, then with @debug_track_array_allocate_location to help identify the cause of the failure. Usually a failure should indicate where there is a missing begin_*_region() call. There may be places though where synchronization is required even though the type of loop macros used does not change (for example when phi is calculated contributions from all ion species need to be summed, resulting in an unusual pattern of array accesses); in this case _block_synchronize() can be called directly.
        • The function debug_check_shared_memory() can be inserted between begin_*_region() calls when debugging to narrow down the location where the incorrect array access occured. It is defined when @debug_shared_array is active, and can be imported with using ..communication: debug_check_shared_memory(). The function runs the same error checks as are added by @debug_shared_array in _block_synchronize().
        • The tests in debug_test/ check for correctness by looping over the dimensions and forcing each to be split over separate processes in turn. This allows the correctness checks to be run using only 2 processes, which would not be possible if all dimensions had to be split at the same time.
      • [This final level of checking only looks for minor optimizations rather than finding bugs, so it is much less important than the checks above.] Run debug_test/debug_redundant_synchronization/runtests.jl with @debug_detect_redundant_block_synchronize activated. This should show if any call to _block_synchronize() (including the ones inside begin_*_region() calls) was 'unnecessary' - i.e. there would be no incorrect array accesses if it was removed. This test needs to be run on a suitable combination of grid sizes and numbers of processes so that all dimensions are split across multiple processes to avoid false positives. Any redundant calls which appear in all tests can be deleted. Redundant calls that appear in only some tests (unless they are in some code block that is just not called in all the other tests) should preferably be moved inside a conditional block, so that they are called only when necessary, if a suitable one exists. If there is no conditional block that the call can be moved to, it may sometimes be necessary to just test one or more options before calling, e.g.
        moments.evolve_upar && _block_synchronize()
        • The checks for redundant _block_synchronize() calls have been separated from the correctness checks so that the correctness checks can be run in the CI using only 2 processes, while the redundancy checks can be run manually on a machine with enough memory and cpu cores.

      You can find out what loop type is currently active by looking at loop_ranges[].parallel_dims. This variable is a Tuple containing Symbols for each dimension currently being parallelized.

      +Shared memory debugging · moment_kinetics

      Shared memory debugging

      This debug_test directory contains scripts for running a set of short runs, intended to be used with the --debug flag to check for bugs (e.g. race conditions). The output is not checked - the intention is just to catch errors raised by the debugging checks.

      The inputs only have 3 time-steps, and very few grid points, because the debug checks are very slow. The actual output is not important, so it does not matter that the runs are badly under-resolved.

      It may be necessary to use the --compiled-modules=no flag to Julia for changes to the --debug setting to be picked up correctly. This setting means that all precompilation is redone each time Julia is started, which can be slow. An alternative workaround is to hard-code the moment_kinetics.debugging._debug_level variable in debugging.jl to the desired value.

      To run the debug tests, call (from the top-level moment_kinetics directory) something like

      julia --project --check-bounds=yes --compiled-modules=no debug_test/runtests.jl --debug 99

      Collision operator and 'anyv' region

      The collision operator uses a slightly hacky special set of functions for shared memory parallelism, to allow the outer loop over species and spatial dimensions to be parallelised, but also inner loops over vperp, vpa or vperp and vpa to be parallelised - changing the type of inner-loop parallelism within the outer loop. This happens within an 'anyv' region, which is started with the begin_s_r_z_anyv_region() function. The debug checks within an 'anyv' region only check for correctness on the sub-block communicator that parallelises over velocity space, so if there were errors due to incorrect species or spatial parallelism they would not (might not?) be detected. These errors should be unlikely as the collision operator only writes to a single species at a single spatial point.

      Finding race conditions

      The code is parallelized using MPI with shared memory arrays. 'Race conditions' can occur if a shared array is accessed incorrectly. All the processes sharing an array can be synchronized, ensuring they pass through the following code block with a consistent state, by using the _block_synchronize() function (which calls MPI.Barrier() to synchronize the processes). Race conditions occur if between consecutive calls to _block_synchronize() any array is:

      1. written by 2 or more processes at the same position
      2. written by one process at a certain position, and read by one or more other processes at the same position.

      If a race condition occurs, it can result in errors in the results. These are sometimes small, but often show inconsistent results between runs (because results erroneously depend on the execution order on different processes). They are undefined behaviour though, and so can also cause anything up to segfaults.

      The provided debugging routines can help to pin down where either of these errors happen.

      The @debug_shared_array macro (activated at --debug 2 or higher) counts all reads and writes to shared arrays by each process, and checks at each _block_synchronize() call whether either pattern has occurred since the previous _block_synchronize(). If they have and in addition @debug_track_array_allocate_location is active (--debug 3 or higher), then the array for which the error occured is identified by printing a stack-trace of the location where it was allocated, and the stack-trace for the exception shows the location of the _block_synchronize() call where the error occured.

      @debug_block_synchronize (activated at --debug 4)checks that all processes called _block_synchronize() from the same place - i.e. the same line in the code, checked by comparing stack traces.

      @debug_detect_redundant_block_synchronize (activated at --debug 5) aims to find any unnecessary calls to _block_synchronize(). These calls can be somewhat expensive (for large numbers of processes at least), so it is good to minimise the number. When this mode is active, at each _block_synchronize() a check is made whether there would be a race-condition error if the previous _block_synchronize() call was removed. If there would not be, then the previous call was unnecessary and could be removed. The tricky part is that whether it was necessary or not could depend on the options being used... Detecting redundant block_synchronize() calls requires that all dimensions that could be split over processes are actually split over processes, which demands a large number of processes are used. The @debug_detect_redundant_block_synchronize flag, when activated, modifies the splitting algorithm to force every dimension to be split if possible, and raise an error if not.

      Suggested debugging strategy for race conditions is:

      • Look at the loop types and ensure that there is an appropriate begin_*_region() call before each new loop type.
      • Run debug_test/runtests.jl with @debug_shared_array activated, but not @debug_detect_redundant_block_synchronize. It will be faster to first run without @debug_track_array_allocate_location to find failing tests, then with @debug_track_array_allocate_location to help identify the cause of the failure. Usually a failure should indicate where there is a missing begin_*_region() call. There may be places though where synchronization is required even though the type of loop macros used does not change (for example when phi is calculated contributions from all ion species need to be summed, resulting in an unusual pattern of array accesses); in this case _block_synchronize() can be called directly.
        • The function debug_check_shared_memory() can be inserted between begin_*_region() calls when debugging to narrow down the location where the incorrect array access occured. It is defined when @debug_shared_array is active, and can be imported with using ..communication: debug_check_shared_memory(). The function runs the same error checks as are added by @debug_shared_array in _block_synchronize().
        • The tests in debug_test/ check for correctness by looping over the dimensions and forcing each to be split over separate processes in turn. This allows the correctness checks to be run using only 2 processes, which would not be possible if all dimensions had to be split at the same time.
      • [This final level of checking only looks for minor optimizations rather than finding bugs, so it is much less important than the checks above.] Run debug_test/debug_redundant_synchronization/runtests.jl with @debug_detect_redundant_block_synchronize activated. This should show if any call to _block_synchronize() (including the ones inside begin_*_region() calls) was 'unnecessary' - i.e. there would be no incorrect array accesses if it was removed. This test needs to be run on a suitable combination of grid sizes and numbers of processes so that all dimensions are split across multiple processes to avoid false positives. Any redundant calls which appear in all tests can be deleted. Redundant calls that appear in only some tests (unless they are in some code block that is just not called in all the other tests) should preferably be moved inside a conditional block, so that they are called only when necessary, if a suitable one exists. If there is no conditional block that the call can be moved to, it may sometimes be necessary to just test one or more options before calling, e.g.
        moments.evolve_upar && _block_synchronize()
        • The checks for redundant _block_synchronize() calls have been separated from the correctness checks so that the correctness checks can be run in the CI using only 2 processes, while the redundancy checks can be run manually on a machine with enough memory and cpu cores.

      You can find out what loop type is currently active by looking at loop_ranges[].parallel_dims. This variable is a Tuple containing Symbols for each dimension currently being parallelized.

      diff --git a/dev/timestepping/index.html b/dev/timestepping/index.html index 9ebc75e8ae..50283c0f49 100644 --- a/dev/timestepping/index.html +++ b/dev/timestepping/index.html @@ -1,2 +1,2 @@ -Timestepping · moment_kinetics

      Timestepping

      Timestepping in moment_kinetics can be done with various explicit Runge-Kutta (RK) schemes. The default is a fixed-timestep 3rd-order, 4-stage, strong stability preserving (SSP) RK scheme.

      Several schemes (including all the fixed-timestep schemes) use a 'low storage' option, where only values from the first stage and previous stage are required for each stage update[1].

      Fixed-timestep schemes

      The fixed timestep schemes use a constant dt, specified in the input file, for the whole simulation. The available types are:

      • "SSPRK1" - forward Euler method
      • "SSPRK2" - Heun's method
      • "SSPRK3" - a 3-stage, 3rd order method, see this Wikipedia list
      • "SSPRK4" - the default, a 4-stage, 3rd order method, see [R.J. Spiteri, and S.J. Ruuth. "A new class of optimal high-order strong-stability-preserving time discretization methods." SIAM Journal on Numerical Analysis 40.2 (2002): 469-491., referenced in Dale E. Durran, “Numerical Methods for Fluid Dynamics”, Springer. Second Edition].

      Adaptive-timestep schemes

      Several SSP schemes are included from [Fekete, Conde and Shadid, "Embedded pairs for optimal explicit strong stability preserving Runge-Kutta methods", Journal of Computational and Applied Mathematics 421 (2022) 114325, https://doi.org/10.1016/j.cam.2022.114325]:

      • "Fekete4(3)" a 4-stage, 3rd order method, the recommended 3rd order method in Fekete et al. Identical to the default "SSPRK4" fixed-step method, but with an embedded 2nd order method used to provide error control for adaptive timestepping. This is probably a good first choice for an adaptive timestep method.
      • "Fekete4(2)" a 4-stage, 2nd order method, the recommended 2nd order method in Fekete et al.
      • "Fekete10(4)" a 10-stage, 4th order method, the recommended 4th order method in Fekete et al. May allow longer timesteps than "Fekete4(3)", but probably not any faster as more stages are required per timestep. However, if very high accuracy is required (very tight rtol and atol tolerances), the higher accuracy may be an advantage.
      • "Fekete6(4)" a 6-stage, 4th order method.

      The classic "Runge-Kutta-Fehlberg" method [https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta%E2%80%93Fehlberg_method, 'COEFFICIENTS FOR RK4(5), FORMULA 2 Table III in Fehlberg' - note the Wikipedia page seems to have a typo in one of the error coefficients, see comment in utils/calculate_rk_coeffs.jl] is also provided as "RKF5(4)". This method seems to require a significantly smaller timestep to be stable than the SSP methods from Fekete et al., but might be useful if very high accuracy is required as it is a 5th-order accurate method. It uses 6 stages per step.

      Algorithm for choosing the next timestep

      These adaptive timestepping methods use several criteria to set or limit the timestep:

      • Truncation error, which is estimated by the difference between the higher and lower order methods of an 'embedded pair'. The timestep size needed to maintain a specified accuracy can be estimated from the size of the trucation error (knowing the order of accuracy of the method), as described for example in Fehlberg et al. This estimate is used unless it is larger than any of the following limits. The error limit is set by relative tolerance "rtol" and absolute tolerance "atol" parameters. For each variable $X$ the error metric (calculated in moment_kinetics.time_advance.local_error_norm is the root-mean-square (RMS, or 'L2 norm') of $\epsilon$:

        \[\epsilon = \frac{E_{X}}{(\mathtt{rtol}*|X| + \mathtt{atol})}\]

        where $E_{X}$ is the truncation error estimate for $X$. If the RMS of $\epsilon$, averaged over all evolved variables, is greater than 1, then the step is considered 'failed' and is re-done with a shorter timestep (set by the lower of half of the failed timestep, or the timestep calculated using the estimate based on $\epsilon$).
      • CFL criteria [https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition]. These are estimated for the spatial advection and velocity-space advection terms in the kinetic equation(s), using the methods moment_kinetics.utils.get_minimum_CFL_z, moment_kinetics.utils.get_minimum_CFL_vpa, moment_kinetics.utils.get_minimum_CFL_neutral_z, moment_kinetics.utils.get_minimum_CFL_neutral_vz. These estimates are multiplied by a user-set prefactor - the correct value for the prefactor depends on both the timestepping scheme and the spatial discretisation, so to be pragmatic we tune the value by trial and error. [CFL limits associated with other terms in the equations could be added in a similar way if it is useful.]
      • At each step, the timestep is allowed to increase by at most a (user-set) factor, to avoid large jumps that might cause numerical instability.
      • There is an option to set a minimum timestep, which may be useful to push the simulation through initial transients where there is some numerical instability which would make the truncation error estimate push the timestep to ridiculously small values. Since we might not care about accuracy too much during these initial transients, it can be useful to set a minimum to stop the timestep getting too small (as long as the minimum is small enough that the simulation does not crash).

      The estimates and limits just described are controlled by various tuning parameters, described in timestepping-input-parameters, that may need to be set appropriately to get good performance from the adaptive timestepping methods. The timestep achievable may be limited by accuracy or by stability. If the CFL_prefactor is set too high (or the relevant CFL limit is not being checked) then the timestep will try to increase too high for stability - when this happens, the step will also become inaccurate, causing timestep failures and reducing the timestep. So the simulation should continue without crashing, however it will be inefficient as the truncation error estimate will not 'see' the stability limit until the limit is exceeded, resulting in a cycle of increasing timestep followed by (probably repeated) timestep failures. The aim should probably be to set the CFL_limit_prefactor and max_increase_factor to the highest values that do not lead to too many timestep failures (a few failures are OK, especially during the initial transient phase of simulations). step_update_prefactor can also be decreased to use a bigger margin in the timestep estimated from the error metric $\epsilon$ - using a smaller step_update_prefactor will make the timestep smaller when it is limited by accuracy, but this can (sometimes!) help avoid timestep failures, which might decrease the total number of steps.

      Special treatment is needed for the time points where output is to be written. When the next timestep would take the simulation time beyond the next time where output is to be written, the timestep is set instead to take the simulation to the output time. Then output is written and the timestep is reset to the last full timestep value from before the output.

      Alternative algorithm for choosing the next timestep

      It might turn out that the particular CFL limits that are included in the algorithm described in Algorithm for choosing the next timestep are not a complete set of the things that set the stability limit for the explicit RK timestep. If that is the case, it may be useful to have a more generic algorithm that can still fairly robustly choose a good timestep size, without a large number of timestep failures. One option is described in this subsection. For the parameters discussed, see again timestepping-input-parameters.

      If we assume that dt that last failed the timestep truncation error test is a good estimate of the dt that is the boundary between stable and unstable timstep values, then it makes sense to try to keep timesteps close to that (to avoid failures), although we also want to allow the timestep to increase past that value in case it was a bad estimate (e.g. during some sort of transient) or because the stability limits have changed (e.g. parallel gradients in the simulation have changed significantly). We would like to stay close to a marginally stable (rather than marginally unstable) timestep, so take as the estimate the last successful timestep before the most recent failed timestep (this is stored in the code as t_params.dt_before_last_fail[]). When dt is within a factor last_fail_proximity_factor of this value, we limit the increase in timestep to max_increase_factor_near_last_fail, rather than max_increase_factor. Suggested setup (which of course is likely to need adjusting depending on the simulation!):

      • Set max_increase_factor_near_last_fail to a value very close to 1, say 1.001. This means that the timestep can only very slowly approach and exceed t_params.dt_before_last_fail[]. Setting this value closer to 1 should decrease the number of timestep failures.
      • Set max_increase_factor to a relatively large value, say 1.5 or 2, so that when a timestep does fail, dt quickly recovers to a value close to the last successful value before the failure.
      • Set step_update_prefactor to a relatively small value, say 0.5. step_update_prefactor controls how far dt is set below the value needed to comply with the requested tolerances. Setting a smallish value (so a large margin below the value that would trigger a timestep failure) seems to help - current guess (JTO 20/3/2024) is that: when dt is close to (or maybe just above) the value that would be unstable, the error starts to grow; with some margin, and with the factor by which dt increases limited to a small value, so that dt is at worst very marginally unstable, the truncation error estimate can feel the error and decrease dt (modestly) back to a stable value, before the error becomes big enough to cause a timestep failure. Once dt has been decreased (but not too much) it is again only allowed to increase slowly, so as long as these decreases happen often enough, dt can stay around the stability boundary without causing timestep failures. Decreasing this value should decrease the number of timestep failures.
      • last_fail_proximity_factor - current guess (JTO 20/3/2024) is that the default value of 1.05 is reasonable. Increasing this value should decrease the number of timestep failures, but will also increase the number of steps needed before the timestep can increase past a too-low value (from a bad estimate, transient, changed simulation conditions, etc.).
      • As a rough guideline, more than one timestep failures on average per 100 timesteps is probably too many to be efficient, while around or less than this many is probably acceptable. If there are too many failures, try tweaking parameters as indicated above.

      In at least one case JTO has been able to use this method to get a simulation to run without imposing CFL restrictions explicitly, in a similar number of steps as when using (well-tuned) explicit CFL restrictions.

      Input parameters

      Option nameDefault valueDescription
      nstep5nstep*dt is the total length of the run. For fixed-step timestepping, nstep is the total number of timesteps
      dt$0.00025/T$For fixed-step, gives the length of the timestep. For adaptive-step gives the initial guess for the timestep. $T$ in the default value is the initial temperature of the ions
      CFL_prefactor-1.0Prefactor that the CFL limits from moment_kinetics.utils.get_minimum_CFL_z, moment_kinetics.utils.get_minimum_CFL_vpa, moment_kinetics.utils.get_minimum_CFL_neutral_z, moment_kinetics.utils.get_minimum_CFL_neutral_vz are multiplied by to set the timestep limit. If no value is given, a default is set according to which timestepping scheme is chosen (see moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!).
      nwrite1Output of moment quantities is written every nwrite*dt time units.
      nwrite_dfnsnothingOutput of distribution function quantities is written every nwrite_dfns*dt time units. By default distribution function quantities are written only at the beginning and end of the simulation.
      type"SSPRK4"Timestepping method, see Fixed-timestep schemes and Adaptive-timestep schemes.
      split_operatorsfalseIf true, use operator splitting. Operator splitting is currently only partially implemented.
      stopfile_name"stop"Name of the file that can be created in the output directory to stop the simulation cleanly after the next output is written.
      steady_state_residualfalseSet to true to print out the maximum residual $r(t) = \frac{\left| n(t)-n(t-\delta t)\right| }{\delta t}$ of the density for each species at each output step
      converged_residual_value-1.0If steady_state_residual = true and converged_residual_value is set to a positive value, then the simulation will be stopped if all the density residuals are less than converged_residual_value. Note the residuals are only calculated and checked at time steps where output for moment variables is written.
      rtol1.0e-5Relative tolerance used for the truncation error metric.
      atol1.0e-12Absolute tolerance used for the truncation error metric.
      atol_upar1.0e-2*rtolAbsolute tolerance used parallel flow moment variables in the truncation error metric. This is separate from atol as the flow moments are expected to pass through zero somewhere, unlike distribution functions, densities, or pressures that should always be positive.
      step_update_prefactor0.9When timestep is limited by accuracy (rather than something else), it is set to step_update_prefactor times the estimated timestep which would give an RMS error metric $\epsilon$ of 1 at the next step. This value should always be less than 1. Smaller values give a bigger margin under the failure threshold, so may help reduce the number of timestep failures.
      max_increase_factor1.05Timestep can be increased by at most this factor at each step.
      max_increase_factor_near_last_failInfIf set to finite value, replaces max_increase_factor when the timestep is near the last failed dt value (defined as within last_fail_proximity_factor of the last successful dt value before a timestep failure). If set, must be less than max_increase_factor.
      last_fail_proximity_factor1.05Defines the range considered 'near to' the last failed dt value: dt_before_last_fail/last_fail_proximity_factor < dt < dt_before_last_fail*last_fail_proximity_factor.
      minimum_dt0.0Timestep is not allowed to decrease below this value, regardless of accuracy or stability limits.
      maximum_dtInfTimestep is not allowed to increase above this value.
      high_precision_error_sumfalseIf this is set to true, then quad-precision values (Float128 from the Quadmath package) are used to calculate the sum in the truncation error estimates. When different numbers of processes are used, the sums are calculated in different orders, so the rounding errors will be different. When adaptive timestepping is used this means that different timesteps will be used when different numbers of processes are used, so results will not be exactly the same (although they should be consistent within the timestepper tolerances and discretisation errors). When comparing 'identical' simulations run on different numbers of processes (e.g. for debugging), these differences can be inconvenient. The differences can be avoided (or at least massively reduced) by using a higher precision for the sum, so that the order of the addition operations does not matter (at least until there are so many contributions to the sum that the rounding errors reduce the precision of the quad-precision result to less than double-precision, which would take a very large number!). This feature was originally added in an attempt to make adaptive-timestepping tests give consistent results (at a level $\sim 10^{-14}$) on the CI servers. However, rounding errors change randomly on different systems (operating system, compiler, hardware, etc.), not only because of the different order of terms in the sum in the truncation error norm, so consistency is not possible between different systems even with this feature.

      Diagnostics

      To help tune the settings for adaptive timestepping methods, several diagnostics are written to the output files:

      • step_counter is the cumulative number of time steps taken to reach each output.
      • dt is the most recent timestep size at each output.
      • failure_counter is the cumulative number of timestep failures.
      • failure_caused_by counts the (cumulative) number of times each evolved variable (distribution functions or, for moment-kinetic simulations, moment variables) caused a timestep failure. failure_caused_by is a 2d array - the second dimension is time, the index of the first indicates the variable (see below for plotting of the diagnostics).
      • limit_caused_by counts the (cumulative) number of times each factor (accuracy, CFL limits, maximum timestep increase factor, minimum timestep) set the timestep limit. limit_caused_by is a 2d array - the second dimension is time, the index of the first indicates the factor (see below for plotting of the diagnostics).

      These diagnostics (after being converted from cumulative counts to counts per output step) as well as the CFL limits are plotted and/or animated by makie_post_processing.timestep_diagnostics. This function will be called when running makie_post_processing.makie_post_process if options in the [timestep_diagnostics] section of the post processing input are set: plot=true for plots or animate_CFL=true to make animations of the CFL limits for various terms.

      Developing

      The script utils/calculate_rk_coeffs.jl provides some functions to convert a 'Butcher tableau' to the rk_coefs array used internally in moment_kinetics. To add more RK methods (adaptive or fixed-step) it may be useful to add them in this script, to get the rk_coefs values, which can be copied into moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!.

      API

      See moment_kinetics.time_advance, moment_kinetics.runge_kutta.

      • 1At present, we take advantage of this property to reduce the number of computations in the RK update step, but do not actually reduce the memory usage - we still store the results from every RK stage. It would be fairly straightforward to save memory, but would only reduce from 4 copies to 3 for the standard cases, so not a big saving.
      +Timestepping · moment_kinetics

      Timestepping

      Timestepping in moment_kinetics can be done with various explicit Runge-Kutta (RK) schemes. The default is a fixed-timestep 3rd-order, 4-stage, strong stability preserving (SSP) RK scheme.

      Several schemes (including all the fixed-timestep schemes) use a 'low storage' option, where only values from the first stage and previous stage are required for each stage update[1].

      Fixed-timestep schemes

      The fixed timestep schemes use a constant dt, specified in the input file, for the whole simulation. The available types are:

      • "SSPRK1" - forward Euler method
      • "SSPRK2" - Heun's method
      • "SSPRK3" - a 3-stage, 3rd order method, see this Wikipedia list
      • "SSPRK4" - the default, a 4-stage, 3rd order method, see [R.J. Spiteri, and S.J. Ruuth. "A new class of optimal high-order strong-stability-preserving time discretization methods." SIAM Journal on Numerical Analysis 40.2 (2002): 469-491., referenced in Dale E. Durran, “Numerical Methods for Fluid Dynamics”, Springer. Second Edition].

      Adaptive-timestep schemes

      Several SSP schemes are included from [Fekete, Conde and Shadid, "Embedded pairs for optimal explicit strong stability preserving Runge-Kutta methods", Journal of Computational and Applied Mathematics 421 (2022) 114325, https://doi.org/10.1016/j.cam.2022.114325]:

      • "Fekete4(3)" a 4-stage, 3rd order method, the recommended 3rd order method in Fekete et al. Identical to the default "SSPRK4" fixed-step method, but with an embedded 2nd order method used to provide error control for adaptive timestepping. This is probably a good first choice for an adaptive timestep method.
      • "Fekete4(2)" a 4-stage, 2nd order method, the recommended 2nd order method in Fekete et al.
      • "Fekete10(4)" a 10-stage, 4th order method, the recommended 4th order method in Fekete et al. May allow longer timesteps than "Fekete4(3)", but probably not any faster as more stages are required per timestep. However, if very high accuracy is required (very tight rtol and atol tolerances), the higher accuracy may be an advantage.
      • "Fekete6(4)" a 6-stage, 4th order method.

      The classic "Runge-Kutta-Fehlberg" method [https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta%E2%80%93Fehlberg_method, 'COEFFICIENTS FOR RK4(5), FORMULA 2 Table III in Fehlberg' - note the Wikipedia page seems to have a typo in one of the error coefficients, see comment in utils/calculate_rk_coeffs.jl] is also provided as "RKF5(4)". This method seems to require a significantly smaller timestep to be stable than the SSP methods from Fekete et al., but might be useful if very high accuracy is required as it is a 5th-order accurate method. It uses 6 stages per step.

      Algorithm for choosing the next timestep

      These adaptive timestepping methods use several criteria to set or limit the timestep:

      • Truncation error, which is estimated by the difference between the higher and lower order methods of an 'embedded pair'. The timestep size needed to maintain a specified accuracy can be estimated from the size of the trucation error (knowing the order of accuracy of the method), as described for example in Fehlberg et al. This estimate is used unless it is larger than any of the following limits. The error limit is set by relative tolerance "rtol" and absolute tolerance "atol" parameters. For each variable $X$ the error metric (calculated in moment_kinetics.time_advance.local_error_norm is the root-mean-square (RMS, or 'L2 norm') of $\epsilon$:

        \[\epsilon = \frac{E_{X}}{(\mathtt{rtol}*|X| + \mathtt{atol})}\]

        where $E_{X}$ is the truncation error estimate for $X$. If the RMS of $\epsilon$, averaged over all evolved variables, is greater than 1, then the step is considered 'failed' and is re-done with a shorter timestep (set by the lower of half of the failed timestep, or the timestep calculated using the estimate based on $\epsilon$).
      • CFL criteria [https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition]. These are estimated for the spatial advection and velocity-space advection terms in the kinetic equation(s), using the methods moment_kinetics.utils.get_minimum_CFL_z, moment_kinetics.utils.get_minimum_CFL_vpa, moment_kinetics.utils.get_minimum_CFL_neutral_z, moment_kinetics.utils.get_minimum_CFL_neutral_vz. These estimates are multiplied by a user-set prefactor - the correct value for the prefactor depends on both the timestepping scheme and the spatial discretisation, so to be pragmatic we tune the value by trial and error. [CFL limits associated with other terms in the equations could be added in a similar way if it is useful.]
      • At each step, the timestep is allowed to increase by at most a (user-set) factor, to avoid large jumps that might cause numerical instability.
      • There is an option to set a minimum timestep, which may be useful to push the simulation through initial transients where there is some numerical instability which would make the truncation error estimate push the timestep to ridiculously small values. Since we might not care about accuracy too much during these initial transients, it can be useful to set a minimum to stop the timestep getting too small (as long as the minimum is small enough that the simulation does not crash).

      The estimates and limits just described are controlled by various tuning parameters, described in timestepping-input-parameters, that may need to be set appropriately to get good performance from the adaptive timestepping methods. The timestep achievable may be limited by accuracy or by stability. If the CFL_prefactor is set too high (or the relevant CFL limit is not being checked) then the timestep will try to increase too high for stability - when this happens, the step will also become inaccurate, causing timestep failures and reducing the timestep. So the simulation should continue without crashing, however it will be inefficient as the truncation error estimate will not 'see' the stability limit until the limit is exceeded, resulting in a cycle of increasing timestep followed by (probably repeated) timestep failures. The aim should probably be to set the CFL_limit_prefactor and max_increase_factor to the highest values that do not lead to too many timestep failures (a few failures are OK, especially during the initial transient phase of simulations). step_update_prefactor can also be decreased to use a bigger margin in the timestep estimated from the error metric $\epsilon$ - using a smaller step_update_prefactor will make the timestep smaller when it is limited by accuracy, but this can (sometimes!) help avoid timestep failures, which might decrease the total number of steps.

      Special treatment is needed for the time points where output is to be written. When the next timestep would take the simulation time beyond the next time where output is to be written, the timestep is set instead to take the simulation to the output time. Then output is written and the timestep is reset to the last full timestep value from before the output.

      Alternative algorithm for choosing the next timestep

      It might turn out that the particular CFL limits that are included in the algorithm described in Algorithm for choosing the next timestep are not a complete set of the things that set the stability limit for the explicit RK timestep. If that is the case, it may be useful to have a more generic algorithm that can still fairly robustly choose a good timestep size, without a large number of timestep failures. One option is described in this subsection. For the parameters discussed, see again timestepping-input-parameters.

      If we assume that dt that last failed the timestep truncation error test is a good estimate of the dt that is the boundary between stable and unstable timstep values, then it makes sense to try to keep timesteps close to that (to avoid failures), although we also want to allow the timestep to increase past that value in case it was a bad estimate (e.g. during some sort of transient) or because the stability limits have changed (e.g. parallel gradients in the simulation have changed significantly). We would like to stay close to a marginally stable (rather than marginally unstable) timestep, so take as the estimate the last successful timestep before the most recent failed timestep (this is stored in the code as t_params.dt_before_last_fail[]). When dt is within a factor last_fail_proximity_factor of this value, we limit the increase in timestep to max_increase_factor_near_last_fail, rather than max_increase_factor. Suggested setup (which of course is likely to need adjusting depending on the simulation!):

      • Set max_increase_factor_near_last_fail to a value very close to 1, say 1.001. This means that the timestep can only very slowly approach and exceed t_params.dt_before_last_fail[]. Setting this value closer to 1 should decrease the number of timestep failures.
      • Set max_increase_factor to a relatively large value, say 1.5 or 2, so that when a timestep does fail, dt quickly recovers to a value close to the last successful value before the failure.
      • Set step_update_prefactor to a relatively small value, say 0.5. step_update_prefactor controls how far dt is set below the value needed to comply with the requested tolerances. Setting a smallish value (so a large margin below the value that would trigger a timestep failure) seems to help - current guess (JTO 20/3/2024) is that: when dt is close to (or maybe just above) the value that would be unstable, the error starts to grow; with some margin, and with the factor by which dt increases limited to a small value, so that dt is at worst very marginally unstable, the truncation error estimate can feel the error and decrease dt (modestly) back to a stable value, before the error becomes big enough to cause a timestep failure. Once dt has been decreased (but not too much) it is again only allowed to increase slowly, so as long as these decreases happen often enough, dt can stay around the stability boundary without causing timestep failures. Decreasing this value should decrease the number of timestep failures.
      • last_fail_proximity_factor - current guess (JTO 20/3/2024) is that the default value of 1.05 is reasonable. Increasing this value should decrease the number of timestep failures, but will also increase the number of steps needed before the timestep can increase past a too-low value (from a bad estimate, transient, changed simulation conditions, etc.).
      • As a rough guideline, more than one timestep failures on average per 100 timesteps is probably too many to be efficient, while around or less than this many is probably acceptable. If there are too many failures, try tweaking parameters as indicated above.

      In at least one case JTO has been able to use this method to get a simulation to run without imposing CFL restrictions explicitly, in a similar number of steps as when using (well-tuned) explicit CFL restrictions.

      Input parameters

      Option nameDefault valueDescription
      nstep5nstep*dt is the total length of the run. For fixed-step timestepping, nstep is the total number of timesteps
      dt$0.00025/T$For fixed-step, gives the length of the timestep. For adaptive-step gives the initial guess for the timestep. $T$ in the default value is the initial temperature of the ions
      CFL_prefactor-1.0Prefactor that the CFL limits from moment_kinetics.utils.get_minimum_CFL_z, moment_kinetics.utils.get_minimum_CFL_vpa, moment_kinetics.utils.get_minimum_CFL_neutral_z, moment_kinetics.utils.get_minimum_CFL_neutral_vz are multiplied by to set the timestep limit. If no value is given, a default is set according to which timestepping scheme is chosen (see moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!).
      nwrite1Output of moment quantities is written every nwrite*dt time units.
      nwrite_dfnsnothingOutput of distribution function quantities is written every nwrite_dfns*dt time units. By default distribution function quantities are written only at the beginning and end of the simulation.
      type"SSPRK4"Timestepping method, see Fixed-timestep schemes and Adaptive-timestep schemes.
      split_operatorsfalseIf true, use operator splitting. Operator splitting is currently only partially implemented.
      stopfile_name"stop"Name of the file that can be created in the output directory to stop the simulation cleanly after the next output is written.
      steady_state_residualfalseSet to true to print out the maximum residual $r(t) = \frac{\left| n(t)-n(t-\delta t)\right| }{\delta t}$ of the density for each species at each output step
      converged_residual_value-1.0If steady_state_residual = true and converged_residual_value is set to a positive value, then the simulation will be stopped if all the density residuals are less than converged_residual_value. Note the residuals are only calculated and checked at time steps where output for moment variables is written.
      rtol1.0e-5Relative tolerance used for the truncation error metric.
      atol1.0e-12Absolute tolerance used for the truncation error metric.
      atol_upar1.0e-2*rtolAbsolute tolerance used parallel flow moment variables in the truncation error metric. This is separate from atol as the flow moments are expected to pass through zero somewhere, unlike distribution functions, densities, or pressures that should always be positive.
      step_update_prefactor0.9When timestep is limited by accuracy (rather than something else), it is set to step_update_prefactor times the estimated timestep which would give an RMS error metric $\epsilon$ of 1 at the next step. This value should always be less than 1. Smaller values give a bigger margin under the failure threshold, so may help reduce the number of timestep failures.
      max_increase_factor1.05Timestep can be increased by at most this factor at each step.
      max_increase_factor_near_last_failInfIf set to finite value, replaces max_increase_factor when the timestep is near the last failed dt value (defined as within last_fail_proximity_factor of the last successful dt value before a timestep failure). If set, must be less than max_increase_factor.
      last_fail_proximity_factor1.05Defines the range considered 'near to' the last failed dt value: dt_before_last_fail/last_fail_proximity_factor < dt < dt_before_last_fail*last_fail_proximity_factor.
      minimum_dt0.0Timestep is not allowed to decrease below this value, regardless of accuracy or stability limits.
      maximum_dtInfTimestep is not allowed to increase above this value.
      high_precision_error_sumfalseIf this is set to true, then quad-precision values (Float128 from the Quadmath package) are used to calculate the sum in the truncation error estimates. When different numbers of processes are used, the sums are calculated in different orders, so the rounding errors will be different. When adaptive timestepping is used this means that different timesteps will be used when different numbers of processes are used, so results will not be exactly the same (although they should be consistent within the timestepper tolerances and discretisation errors). When comparing 'identical' simulations run on different numbers of processes (e.g. for debugging), these differences can be inconvenient. The differences can be avoided (or at least massively reduced) by using a higher precision for the sum, so that the order of the addition operations does not matter (at least until there are so many contributions to the sum that the rounding errors reduce the precision of the quad-precision result to less than double-precision, which would take a very large number!). This feature was originally added in an attempt to make adaptive-timestepping tests give consistent results (at a level $\sim 10^{-14}$) on the CI servers. However, rounding errors change randomly on different systems (operating system, compiler, hardware, etc.), not only because of the different order of terms in the sum in the truncation error norm, so consistency is not possible between different systems even with this feature.

      Diagnostics

      To help tune the settings for adaptive timestepping methods, several diagnostics are written to the output files:

      • step_counter is the cumulative number of time steps taken to reach each output.
      • dt is the most recent timestep size at each output.
      • failure_counter is the cumulative number of timestep failures.
      • failure_caused_by counts the (cumulative) number of times each evolved variable (distribution functions or, for moment-kinetic simulations, moment variables) caused a timestep failure. failure_caused_by is a 2d array - the second dimension is time, the index of the first indicates the variable (see below for plotting of the diagnostics).
      • limit_caused_by counts the (cumulative) number of times each factor (accuracy, CFL limits, maximum timestep increase factor, minimum timestep) set the timestep limit. limit_caused_by is a 2d array - the second dimension is time, the index of the first indicates the factor (see below for plotting of the diagnostics).

      These diagnostics (after being converted from cumulative counts to counts per output step) as well as the CFL limits are plotted and/or animated by makie_post_processing.timestep_diagnostics. This function will be called when running makie_post_processing.makie_post_process if options in the [timestep_diagnostics] section of the post processing input are set: plot=true for plots or animate_CFL=true to make animations of the CFL limits for various terms.

      Developing

      The script utils/calculate_rk_coeffs.jl provides some functions to convert a 'Butcher tableau' to the rk_coefs array used internally in moment_kinetics. To add more RK methods (adaptive or fixed-step) it may be useful to add them in this script, to get the rk_coefs values, which can be copied into moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!.

      API

      See moment_kinetics.time_advance, moment_kinetics.runge_kutta.

      • 1At present, we take advantage of this property to reduce the number of computations in the RK update step, but do not actually reduce the memory usage - we still store the results from every RK stage. It would be fairly straightforward to save memory, but would only reduce from 4 copies to 3 for the standard cases, so not a big saving.
      diff --git a/dev/wall_boundary_conditions/index.html b/dev/wall_boundary_conditions/index.html index 7acfc5f455..f8fc2b8052 100644 --- a/dev/wall_boundary_conditions/index.html +++ b/dev/wall_boundary_conditions/index.html @@ -117,4 +117,4 @@ N_\mathrm{out} &= \frac{\left(u_{n} - N_\mathrm{in} I_{1}\right)}{K_{1}} \\ 1 &= N_\mathrm{in} I_{0} + \frac{K_{0} \left(u_{n} - N_\mathrm{in} I_{1}\right)}{K_{1}} \\ \Rightarrow N_\mathrm{in} &= \frac{\left(1 - \frac{K_{0} u_{n}}{K_{1}}\right)}{\left(I_{0} - \frac{K_{0} I_{1}}{K_{1}}\right)} -\end{align}\]

      +\end{align}\]

      diff --git a/dev/zz_advection/index.html b/dev/zz_advection/index.html index ed880ba25d..48fd4d1bed 100644 --- a/dev/zz_advection/index.html +++ b/dev/zz_advection/index.html @@ -1,2 +1,2 @@ -advection · moment_kinetics

      advection

      +advection · moment_kinetics

      advection

      diff --git a/dev/zz_analysis/index.html b/dev/zz_analysis/index.html index 1fd1ddc933..90e7beb823 100644 --- a/dev/zz_analysis/index.html +++ b/dev/zz_analysis/index.html @@ -1,5 +1,5 @@ -analysis · moment_kinetics

      analysis

      moment_kinetics.analysis.check_Chodura_conditionFunction

      Check the (kinetic) Chodura condition

      Chodura condition is: ∫d^3v F/vpa^2 ≤ mi ne/Te

      Return a tuple (whose first entry is the result for the lower boundary and second for the upper) of the ratio which is 1 if the Chodura condition is satisfied (with equality): Te/(mi ne) * ∫d^3v F/vpa^2

      Currently only evaluates condition for the first species: is=1

      2D2V

      In normalised form (normalised variables suffixed with 'N'): vpa = cref vpaN vperp = cref vperpN ne = nref neN Te = Tref TeN F = FN nref / cref^3 pi^3/2 cref = sqrt(2 Tref / mi)

      cref^3 ∫d^3vN FN nref / cref^3 pi^3/2 cref^2 vpaN^2 ≤ mi nref neN / Tref TeN nref / (pi^3/2 cref^2) * ∫d^3vN FN / vpaN^2 ≤ mi nref neN / Tref TeN mi nref / (pi^3/2 2 Tref) * ∫d^3vN FN / vpaN^2 ≤ mi nref neN / Tref TeN 1 / (2 pi^3/2) * ∫d^3vN FN / vpaN^2 ≤ neN / TeN 1 / (2 pi^3/2) * ∫d^3vN FN / vpaN^2 ≤ neN / TeN TeN / (2 neN pi^3/2) * ∫d^3vN FN / vpaN^2 ≤ 1

      Note that integrate_over_vspace() includes the 1/pi^3/2 factor already.

      1D1V

      The 1D1V code evolves the marginalised distribution function f = ∫d^2vperp F so the Chodura condition becomes ∫dvpa f/vpa^2 ≤ mi ne/Te

      In normalised form (normalised variables suffixed with 'N'): vpa = cref vpaN ne = nref neN Te = Tref TeN f = fN nref / cref sqrt(pi) cref = sqrt(2 Tref / mi)

      cref ∫dvpaN fN nref / cref sqrt(pi) cref^2 vpaN^2 ≤ mi nref neN / Tref TeN nref / (sqrt(pi) cref^2) * ∫dvpaN fN / vpaN^2 ≤ mi nref neN / Tref TeN mi nref / (sqrt(pi) 2 Tref) * ∫dvpaN fN / vpaN^2 ≤ mi nref neN / Tref TeN 1 / (2 sqrt(pi)) * ∫dvpaN fN / vpaN^2 ≤ neN / TeN 1 / (2 sqrt(pi)) * ∫dvpaN fN / vpaN^2 ≤ neN / TeN TeN / (2 neN sqrt(pi)) * ∫dvpaN fN / vpaN^2 ≤ 1

      Note that integrate_over_vspace() includes the 1/sqrt(pi) factor already.

      If ir0 is passed, only load the data for as single r-point (to save memory).

      If find_extra_offset=true is passed, calculates how many entries of f_lower/f_upper adjacent to $v_∥=0$ would need to be zero-ed out in order for the condition to be satisfied.

      source
      moment_kinetics.analysis.fit_cosineFunction

      Fit a cosine to a 1d array

      Fit function is Acos(2πn(z + δ)/L)

      The domain z is taken to be periodic, with the first and last points identified, so L=z[end]-z[begin]

      Arguments

      z : Array 1d array with positions of the grid points - should have the same length as data data : Array 1d array of the data to be fit amplitudeguess : Float Initial guess for the amplitude (the value from the previous time point might be a good choice) offsetguess : Float Initial guess for the offset (the value from the previous time point might be a good choice) n : Int, default 1 The periodicity used for the fit

      Returns

      amplitude : Float The amplitude A of the cosine fit offset : Float The offset δ of the cosine fit error : Float The RMS of the difference between data and the fit

      source
      moment_kinetics.analysis.fit_delta_phi_modeMethod

      Fit delta_phi to get the frequency and growth rate.

      Note, expect the input to be a standing wave (as simulations are initialised with just a density perturbation), so need to extract both frequency and growth rate from the time-variation of the amplitude.

      The function assumes that if the amplitude does not cross zero, then the mode is non-oscillatory and so fits just an exponential, not exp*cos. The simulation used as input should be long enough to contain at least ~1 period of oscillation if the mode is oscillatory or the fit will not work.

      Arguments

      z : Array{mkfloat, 1} 1d array of the grid point positions t : Array{mkfloat, 1} 1d array of the time points deltaphi : Array{mkfloat, 2} 2d array of the values of delta_phi(z, t)

      Returns

      phifitresult struct whose fields are: growthrate : mkfloat Fitted growth rate of the mode amplitude0 : mkfloat Fitted amplitude at t=0 frequency : mkfloat Fitted frequency of the mode offset0 : mkfloat Fitted offset at t=0 amplitudefiterror : mkfloat RMS error in fit to ln(amplitude) - i.e. ln(A) offsetfiterror : mkfloat RMS error in fit to offset - i.e. δ cosinefiterror : mkfloat Maximum of the RMS errors of the cosine fits at each time point amplitude : Array{mkfloat, 1} Values of amplitude from which growthrate fit was calculated offset : Array{mk_float, 1} Values of offset from which frequency fit was calculated

      source
      moment_kinetics.analysis.steady_state_residualsMethod
      steady_state_residuals(variable, variable_at_previous_time, dt;
      -                       epsilon=0.0001, use_mpi=false)

      Calculate how close a variable is to steady state.

      Calculates several quantities. Define the 'squared absolute residual' $r_\mathrm{abs}(t)^2$ for a quantity $a(t,x)$ as

      $r_\mathrm{abs}(t)^2 = \left( a(t,x) - a(t - \delta t,x) \right)$

      and the 'squared relative residual' $r_\mathrm{rel}(t)^2$

      $r_\mathrm{rel}(t)^2 = \left( \frac{a(t,x) - a(t - \delta t,x)}{\delta t \left| a(t,x) + \epsilon \max_x(a(t,x)) \right|} \right)$

      where $x$ stands for any spatial and velocity coordinates, and the offset $\epsilon \max_x(a(t,x))$ is used to avoid points where $a(t,x)$ happens to be very close to zero from dominating the result in the 'squared relative residual', with $max_x$ being the maximum over the $x$ coordinate(s). Returns an OrderedDict containing: the maximum 'absolute residual' $\max_x\left( \sqrt{r_\mathrm{abs}(t)^2} \right)$ ("RMS absolute residual"); the root-mean-square (RMS) 'absolute residual' $\left< \sqrt{r_\mathrm{abs}(t)^2} \right>_x$ ("max absolute residual"); the maximum 'relative residual' $\max_x\left( \sqrt{r_\mathrm{rel}(t)^2} \right)$ ("RMS relative residual"); the root-mean-square (RMS) 'relative residual' $\left< \sqrt{r_\mathrm{rel}(t)^2} \right>_x$ ("max relative residual").

      variable gives the value of $a(t,x)$ at the current time, variable_at_previous_time the value $a(t - \delta t, x)$ at a previous time and dt gives the difference in times $\delta t$. All three can be arrays with a time dimension of the same length, or have no time dimension.

      By default runs in serial, but if use_mpi=true is passed, assume MPI has been initialised, and that variable has r and z dimensions but no species dimension, and use @loop_* macros. In this case the result is returned only on global rank 0. When using distributed-memory MPI, this routine will double-count the points on block boundaries.

      If only_max_abs=true is passed, then only calculate the 'maxium absolute residual'. In this case the OrderedDict returned will have only one entry, for "max absolute residual".

      source
      moment_kinetics.analysis.steady_state_square_residualsMethod
      steady_state_square_residuals(variable, variable_at_previous_time, dt;
      +analysis · moment_kinetics

      analysis

      moment_kinetics.analysis.check_Chodura_conditionFunction

      Check the (kinetic) Chodura condition

      Chodura condition is: ∫d^3v F/vpa^2 ≤ mi ne/Te

      Return a tuple (whose first entry is the result for the lower boundary and second for the upper) of the ratio which is 1 if the Chodura condition is satisfied (with equality): Te/(mi ne) * ∫d^3v F/vpa^2

      Currently only evaluates condition for the first species: is=1

      2D2V

      In normalised form (normalised variables suffixed with 'N'): vpa = cref vpaN vperp = cref vperpN ne = nref neN Te = Tref TeN F = FN nref / cref^3 pi^3/2 cref = sqrt(2 Tref / mi)

      cref^3 ∫d^3vN FN nref / cref^3 pi^3/2 cref^2 vpaN^2 ≤ mi nref neN / Tref TeN nref / (pi^3/2 cref^2) * ∫d^3vN FN / vpaN^2 ≤ mi nref neN / Tref TeN mi nref / (pi^3/2 2 Tref) * ∫d^3vN FN / vpaN^2 ≤ mi nref neN / Tref TeN 1 / (2 pi^3/2) * ∫d^3vN FN / vpaN^2 ≤ neN / TeN 1 / (2 pi^3/2) * ∫d^3vN FN / vpaN^2 ≤ neN / TeN TeN / (2 neN pi^3/2) * ∫d^3vN FN / vpaN^2 ≤ 1

      Note that integrate_over_vspace() includes the 1/pi^3/2 factor already.

      1D1V

      The 1D1V code evolves the marginalised distribution function f = ∫d^2vperp F so the Chodura condition becomes ∫dvpa f/vpa^2 ≤ mi ne/Te

      In normalised form (normalised variables suffixed with 'N'): vpa = cref vpaN ne = nref neN Te = Tref TeN f = fN nref / cref sqrt(pi) cref = sqrt(2 Tref / mi)

      cref ∫dvpaN fN nref / cref sqrt(pi) cref^2 vpaN^2 ≤ mi nref neN / Tref TeN nref / (sqrt(pi) cref^2) * ∫dvpaN fN / vpaN^2 ≤ mi nref neN / Tref TeN mi nref / (sqrt(pi) 2 Tref) * ∫dvpaN fN / vpaN^2 ≤ mi nref neN / Tref TeN 1 / (2 sqrt(pi)) * ∫dvpaN fN / vpaN^2 ≤ neN / TeN 1 / (2 sqrt(pi)) * ∫dvpaN fN / vpaN^2 ≤ neN / TeN TeN / (2 neN sqrt(pi)) * ∫dvpaN fN / vpaN^2 ≤ 1

      Note that integrate_over_vspace() includes the 1/sqrt(pi) factor already.

      If ir0 is passed, only load the data for as single r-point (to save memory).

      If find_extra_offset=true is passed, calculates how many entries of f_lower/f_upper adjacent to $v_∥=0$ would need to be zero-ed out in order for the condition to be satisfied.

      source
      moment_kinetics.analysis.fit_cosineFunction

      Fit a cosine to a 1d array

      Fit function is Acos(2πn(z + δ)/L)

      The domain z is taken to be periodic, with the first and last points identified, so L=z[end]-z[begin]

      Arguments

      z : Array 1d array with positions of the grid points - should have the same length as data data : Array 1d array of the data to be fit amplitudeguess : Float Initial guess for the amplitude (the value from the previous time point might be a good choice) offsetguess : Float Initial guess for the offset (the value from the previous time point might be a good choice) n : Int, default 1 The periodicity used for the fit

      Returns

      amplitude : Float The amplitude A of the cosine fit offset : Float The offset δ of the cosine fit error : Float The RMS of the difference between data and the fit

      source
      moment_kinetics.analysis.fit_delta_phi_modeMethod

      Fit delta_phi to get the frequency and growth rate.

      Note, expect the input to be a standing wave (as simulations are initialised with just a density perturbation), so need to extract both frequency and growth rate from the time-variation of the amplitude.

      The function assumes that if the amplitude does not cross zero, then the mode is non-oscillatory and so fits just an exponential, not exp*cos. The simulation used as input should be long enough to contain at least ~1 period of oscillation if the mode is oscillatory or the fit will not work.

      Arguments

      z : Array{mkfloat, 1} 1d array of the grid point positions t : Array{mkfloat, 1} 1d array of the time points deltaphi : Array{mkfloat, 2} 2d array of the values of delta_phi(z, t)

      Returns

      phifitresult struct whose fields are: growthrate : mkfloat Fitted growth rate of the mode amplitude0 : mkfloat Fitted amplitude at t=0 frequency : mkfloat Fitted frequency of the mode offset0 : mkfloat Fitted offset at t=0 amplitudefiterror : mkfloat RMS error in fit to ln(amplitude) - i.e. ln(A) offsetfiterror : mkfloat RMS error in fit to offset - i.e. δ cosinefiterror : mkfloat Maximum of the RMS errors of the cosine fits at each time point amplitude : Array{mkfloat, 1} Values of amplitude from which growthrate fit was calculated offset : Array{mk_float, 1} Values of offset from which frequency fit was calculated

      source
      moment_kinetics.analysis.steady_state_residualsMethod
      steady_state_residuals(variable, variable_at_previous_time, dt;
      +                       epsilon=0.0001, use_mpi=false)

      Calculate how close a variable is to steady state.

      Calculates several quantities. Define the 'squared absolute residual' $r_\mathrm{abs}(t)^2$ for a quantity $a(t,x)$ as

      $r_\mathrm{abs}(t)^2 = \left( a(t,x) - a(t - \delta t,x) \right)$

      and the 'squared relative residual' $r_\mathrm{rel}(t)^2$

      $r_\mathrm{rel}(t)^2 = \left( \frac{a(t,x) - a(t - \delta t,x)}{\delta t \left| a(t,x) + \epsilon \max_x(a(t,x)) \right|} \right)$

      where $x$ stands for any spatial and velocity coordinates, and the offset $\epsilon \max_x(a(t,x))$ is used to avoid points where $a(t,x)$ happens to be very close to zero from dominating the result in the 'squared relative residual', with $max_x$ being the maximum over the $x$ coordinate(s). Returns an OrderedDict containing: the maximum 'absolute residual' $\max_x\left( \sqrt{r_\mathrm{abs}(t)^2} \right)$ ("RMS absolute residual"); the root-mean-square (RMS) 'absolute residual' $\left< \sqrt{r_\mathrm{abs}(t)^2} \right>_x$ ("max absolute residual"); the maximum 'relative residual' $\max_x\left( \sqrt{r_\mathrm{rel}(t)^2} \right)$ ("RMS relative residual"); the root-mean-square (RMS) 'relative residual' $\left< \sqrt{r_\mathrm{rel}(t)^2} \right>_x$ ("max relative residual").

      variable gives the value of $a(t,x)$ at the current time, variable_at_previous_time the value $a(t - \delta t, x)$ at a previous time and dt gives the difference in times $\delta t$. All three can be arrays with a time dimension of the same length, or have no time dimension.

      By default runs in serial, but if use_mpi=true is passed, assume MPI has been initialised, and that variable has r and z dimensions but no species dimension, and use @loop_* macros. In this case the result is returned only on global rank 0. When using distributed-memory MPI, this routine will double-count the points on block boundaries.

      If only_max_abs=true is passed, then only calculate the 'maxium absolute residual'. In this case the OrderedDict returned will have only one entry, for "max absolute residual".

      source
      moment_kinetics.analysis.steady_state_square_residualsMethod
      steady_state_square_residuals(variable, variable_at_previous_time, dt;
                                     variable_max=nothing, epsilon=1.0e-4,
      -                              use_mpi=false, only_max_abs=false)

      Used to calculate the mean square residual for steady_state_residuals.

      Useful to define this separately as it can be called on (equally-sized) chunks of the variable and then combined appropriately. If this is done, the global maximum of abs.(variable) should be passed to variable_max.

      See steady_state_residuals for documenation of the other arguments. The return values of steady_state_residuals are the square-root of the return values of this function.

      source
      + use_mpi=false, only_max_abs=false)

      Used to calculate the mean square residual for steady_state_residuals.

      Useful to define this separately as it can be called on (equally-sized) chunks of the variable and then combined appropriately. If this is done, the global maximum of abs.(variable) should be passed to variable_max.

      See steady_state_residuals for documenation of the other arguments. The return values of steady_state_residuals are the square-root of the return values of this function.

      source
      diff --git a/dev/zz_array_allocation/index.html b/dev/zz_array_allocation/index.html index 30d014b415..cde3e10684 100644 --- a/dev/zz_array_allocation/index.html +++ b/dev/zz_array_allocation/index.html @@ -1,2 +1,2 @@ -array_allocation · moment_kinetics

      array_allocation

      +array_allocation · moment_kinetics

      array_allocation

      diff --git a/dev/zz_bgk/index.html b/dev/zz_bgk/index.html index 24e3071e80..792a5dcbb4 100644 --- a/dev/zz_bgk/index.html +++ b/dev/zz_bgk/index.html @@ -1,2 +1,2 @@ -bgk · moment_kinetics

      bgk

      moment_kinetics.bgk.passing_pdf!Method

      inputs

      • pdf is the particle distribution function, with the passing part of phase space not filled in
      • phi_max is the maximum value that e * phi / Te takes
      • tau = Ti/Te is the ion-electron temperature ratio
      • x = mvpa^2/2Te + ephi/Te is 1D array containing the total parallel energy (conserved)

      output

      • pdf = particle distribution function; this function fills in the part of phase space where x > e*phi_max/T
      source
      moment_kinetics.bgk.total_energy_gridMethod

      inputs:

      • vpa = parallel velocity normalized by vts = sqrt(2*Te/ms)
      • phi = electrostatic potential normalized by Te/e

      output: x = vpa^2 + phi is the total parallel energy

      source
      moment_kinetics.bgk.trapped_pdf!Method

      inputs

      • phi_max is the maximum value that e * phi / Te takes
      • tau = Ti/Te is the ion-electron temperature ratio
      • x = vpa^2 + e*phi is a 2D array containing the total parallel energy on the (z,vpa) grid
      • y = dummy coordinate for the necessary integrals in the function
      • integrand = dummy array used to hold integrands defined and integrated in this function
      • wgts = integration weights associated with y integrals

      output

      • pdf is the particle distribution function for all of phase space, with this function filling in only the part with x < e*phi_max/T
      source
      +bgk · moment_kinetics

      bgk

      moment_kinetics.bgk.passing_pdf!Method

      inputs

      • pdf is the particle distribution function, with the passing part of phase space not filled in
      • phi_max is the maximum value that e * phi / Te takes
      • tau = Ti/Te is the ion-electron temperature ratio
      • x = mvpa^2/2Te + ephi/Te is 1D array containing the total parallel energy (conserved)

      output

      • pdf = particle distribution function; this function fills in the part of phase space where x > e*phi_max/T
      source
      moment_kinetics.bgk.total_energy_gridMethod

      inputs:

      • vpa = parallel velocity normalized by vts = sqrt(2*Te/ms)
      • phi = electrostatic potential normalized by Te/e

      output: x = vpa^2 + phi is the total parallel energy

      source
      moment_kinetics.bgk.trapped_pdf!Method

      inputs

      • phi_max is the maximum value that e * phi / Te takes
      • tau = Ti/Te is the ion-electron temperature ratio
      • x = vpa^2 + e*phi is a 2D array containing the total parallel energy on the (z,vpa) grid
      • y = dummy coordinate for the necessary integrals in the function
      • integrand = dummy array used to hold integrands defined and integrated in this function
      • wgts = integration weights associated with y integrals

      output

      • pdf is the particle distribution function for all of phase space, with this function filling in only the part with x < e*phi_max/T
      source
      diff --git a/dev/zz_boundary_conditions/index.html b/dev/zz_boundary_conditions/index.html index 75754ff168..d2b5db8d63 100644 --- a/dev/zz_boundary_conditions/index.html +++ b/dev/zz_boundary_conditions/index.html @@ -1,2 +1,2 @@ -boundary_conditions · moment_kinetics

      boundary_conditions

      moment_kinetics.boundary_conditions.enforce_initial_tapered_zero_incoming!Method

      Set up an initial condition that tries to be smoothly compatible with the sheath boundary condition for ions, by setting f(±(v_parallel-u0)<0) where u0=0 at the sheath boundaries and for z<0 increases linearly to u0=vpa.L at z=0, while for z>0 increases from u0=-vpa.L at z=0 to zero at the z=z.L/2 sheath.

      To be applied to 'full-f' distribution function on vparallel grid (not wparallel grid).

      source
      moment_kinetics.boundary_conditions.skip_f_electron_bc_points_in_JacobianMethod
      skip_f_electron_bc_points_in_Jacobian(iz, ivperp, ivpa, z, vperp, vpa)

      This function returns true when the grid point specified by iz, ivperp, ivpa would be set by the boundary conditions on the electron distribution function. When this happens, the corresponding row should be skipped when adding contributions to the Jacobian matrix, so that the row remains the same as a row of the identity matrix, so that the Jacobian matrix does not modify those points. Returns false otherwise.

      source
      +boundary_conditions · moment_kinetics

      boundary_conditions

      moment_kinetics.boundary_conditions.enforce_initial_tapered_zero_incoming!Method

      Set up an initial condition that tries to be smoothly compatible with the sheath boundary condition for ions, by setting f(±(v_parallel-u0)<0) where u0=0 at the sheath boundaries and for z<0 increases linearly to u0=vpa.L at z=0, while for z>0 increases from u0=-vpa.L at z=0 to zero at the z=z.L/2 sheath.

      To be applied to 'full-f' distribution function on vparallel grid (not wparallel grid).

      source
      diff --git a/dev/zz_calculus/index.html b/dev/zz_calculus/index.html index ea84e3d145..aee5a62a02 100644 --- a/dev/zz_calculus/index.html +++ b/dev/zz_calculus/index.html @@ -1,3 +1,3 @@ -calculus · moment_kinetics

      calculus

      moment_kinetics.calculus.elementwise_derivative!Function
      elementwise_derivative!(coord, f, adv_fac, spectral)
      -elementwise_derivative!(coord, f, spectral)

      Generic function for element-by-element derivatives

      First signature, with adv_fac, calculates an upwind derivative, the second signature calculates a derivative without upwinding information.

      Result is stored in coord.scratch_2d.

      source
      moment_kinetics.calculus.reconcile_element_boundaries_upwind!Method

      if at the boundary point within the element, must carefully choose which value of df to use; this is because df is multi-valued at the overlapping point at the boundary between neighboring elements. here we choose to use the value of df from the upwind element.

      source
      +calculus · moment_kinetics

      calculus

      moment_kinetics.calculus.elementwise_derivative!Function
      elementwise_derivative!(coord, f, adv_fac, spectral)
      +elementwise_derivative!(coord, f, spectral)

      Generic function for element-by-element derivatives

      First signature, with adv_fac, calculates an upwind derivative, the second signature calculates a derivative without upwinding information.

      Result is stored in coord.scratch_2d.

      source
      moment_kinetics.calculus.reconcile_element_boundaries_upwind!Method

      if at the boundary point within the element, must carefully choose which value of df to use; this is because df is multi-valued at the overlapping point at the boundary between neighboring elements. here we choose to use the value of df from the upwind element.

      source
      diff --git a/dev/zz_charge_exchange/index.html b/dev/zz_charge_exchange/index.html index 5ec277c55a..c6a4f05a73 100644 --- a/dev/zz_charge_exchange/index.html +++ b/dev/zz_charge_exchange/index.html @@ -1,2 +1,2 @@ -charge_exchange · moment_kinetics

      charge_exchange

      +charge_exchange · moment_kinetics

      charge_exchange

      diff --git a/dev/zz_chebyshev/index.html b/dev/zz_chebyshev/index.html index 4f5d281837..e68d150494 100644 --- a/dev/zz_chebyshev/index.html +++ b/dev/zz_chebyshev/index.html @@ -1,2 +1,2 @@ -chebyshev · moment_kinetics

      chebyshev

      moment_kinetics.calculus.elementwise_derivative!Method
      elementwise_derivative!(coord, ff, adv_fac, spectral::chebyshev_info)

      Chebyshev transform f to get Chebyshev spectral coefficients and use them to calculate f'.

      Note: Chebyshev derivative does not make use of upwinding information within each element.

      source
      moment_kinetics.chebyshev.cheb_derivative_matrix_elementwise!Method

      derivative matrix for Gauss-Lobatto points using the analytical specification from Chapter 8.2 from Trefethen 1994 https://people.maths.ox.ac.uk/trefethen/8all.pdf full list of Chapters may be obtained here https://people.maths.ox.ac.uk/trefethen/pdetext.html

      source
      moment_kinetics.chebyshev.chebyshev_forward_transform!Method

      takes the real function ff on a Chebyshev grid in z (domain [-1, 1]), which corresponds to the domain [π, 2π] in variable theta = ArcCos(z). interested in functions of form f(z) = sumn cn Tn(z) using Tn(cos(theta)) = cos(ntheta) and z = cos(theta) gives f(z) = sumn cn cos(ntheta) thus a Chebyshev transform is equivalent to a discrete cosine transform doing this directly turns out to be slower than extending the domain from [0, 2pi] and using the fact that f(z) must be even (as cosines are all even) on this extended domain, can do a standard complex-to-complex fft fext is an array used to store f(theta) on the extended grid theta ∈ [0,2π) ff is f(theta) on the grid [π,2π] the Chebyshev coefficients of ff are calculated and stored in chebyf n is the number of grid points on the Chebyshev-Gauss-Lobatto grid transform is the plan for the complex-to-complex, in-place fft

      source
      moment_kinetics.chebyshev.scaled_chebyshev_gridMethod

      initialize chebyshev grid scaled to interval [-boxlength/2, boxlength/2] we no longer pass the boxlength to this function, but instead pass precomputed arrays elementscale and element_shift that are needed to compute the grid.

      ngrid – number of points per element (including boundary points) nelementlocal – number of elements in the local (distributed memory MPI) grid n – total number of points in the local grid (excluding duplicate points) elementscale – the scale factor in the transform from the coordinates where the element limits are -1, 1 to the coordinate where the limits are Aj = coord.grid[imin[j]-1] and Bj = coord.grid[imax[j]] elementscale = 0.5*(Bj - Aj) elementshift – the centre of the element in the extended grid coordinate element_shift = 0.5*(Aj + Bj) imin – the array of minimum indices of each element on the extended grid. By convention, the duplicated points are not included, so for element index j > 1 the lower boundary point is actually imin[j] - 1 imax – the array of maximum indices of each element on the extended grid.

      source
      +chebyshev · moment_kinetics

      chebyshev

      moment_kinetics.calculus.elementwise_derivative!Method
      elementwise_derivative!(coord, ff, adv_fac, spectral::chebyshev_info)

      Chebyshev transform f to get Chebyshev spectral coefficients and use them to calculate f'.

      Note: Chebyshev derivative does not make use of upwinding information within each element.

      source
      moment_kinetics.chebyshev.cheb_derivative_matrix_elementwise!Method

      derivative matrix for Gauss-Lobatto points using the analytical specification from Chapter 8.2 from Trefethen 1994 https://people.maths.ox.ac.uk/trefethen/8all.pdf full list of Chapters may be obtained here https://people.maths.ox.ac.uk/trefethen/pdetext.html

      source
      moment_kinetics.chebyshev.chebyshev_forward_transform!Method

      takes the real function ff on a Chebyshev grid in z (domain [-1, 1]), which corresponds to the domain [π, 2π] in variable theta = ArcCos(z). interested in functions of form f(z) = sumn cn Tn(z) using Tn(cos(theta)) = cos(ntheta) and z = cos(theta) gives f(z) = sumn cn cos(ntheta) thus a Chebyshev transform is equivalent to a discrete cosine transform doing this directly turns out to be slower than extending the domain from [0, 2pi] and using the fact that f(z) must be even (as cosines are all even) on this extended domain, can do a standard complex-to-complex fft fext is an array used to store f(theta) on the extended grid theta ∈ [0,2π) ff is f(theta) on the grid [π,2π] the Chebyshev coefficients of ff are calculated and stored in chebyf n is the number of grid points on the Chebyshev-Gauss-Lobatto grid transform is the plan for the complex-to-complex, in-place fft

      source
      moment_kinetics.chebyshev.scaled_chebyshev_gridMethod

      initialize chebyshev grid scaled to interval [-boxlength/2, boxlength/2] we no longer pass the boxlength to this function, but instead pass precomputed arrays elementscale and element_shift that are needed to compute the grid.

      ngrid – number of points per element (including boundary points) nelementlocal – number of elements in the local (distributed memory MPI) grid n – total number of points in the local grid (excluding duplicate points) elementscale – the scale factor in the transform from the coordinates where the element limits are -1, 1 to the coordinate where the limits are Aj = coord.grid[imin[j]-1] and Bj = coord.grid[imax[j]] elementscale = 0.5*(Bj - Aj) elementshift – the centre of the element in the extended grid coordinate element_shift = 0.5*(Aj + Bj) imin – the array of minimum indices of each element on the extended grid. By convention, the duplicated points are not included, so for element index j > 1 the lower boundary point is actually imin[j] - 1 imax – the array of maximum indices of each element on the extended grid.

      source
      diff --git a/dev/zz_clenshaw_curtis/index.html b/dev/zz_clenshaw_curtis/index.html index f6cd28d7f9..f89287fe39 100644 --- a/dev/zz_clenshaw_curtis/index.html +++ b/dev/zz_clenshaw_curtis/index.html @@ -1,2 +1,2 @@ -clenshaw_curtis · moment_kinetics
      +clenshaw_curtis · moment_kinetics
      diff --git a/dev/zz_command_line_options/index.html b/dev/zz_command_line_options/index.html index ebadcc1075..4353449206 100644 --- a/dev/zz_command_line_options/index.html +++ b/dev/zz_command_line_options/index.html @@ -1,2 +1,2 @@ -command_line_options · moment_kinetics
      +command_line_options · moment_kinetics
      diff --git a/dev/zz_communication/index.html b/dev/zz_communication/index.html index de754716f6..c334b3bf9a 100644 --- a/dev/zz_communication/index.html +++ b/dev/zz_communication/index.html @@ -1,2 +1,2 @@ -communication · moment_kinetics

      communication

      moment_kinetics.communicationModule

      Communication functions and setup

      Split the grid into 'blocks'. Each block can use shared memory (MPI shared memory arrays). At the moment only works with a single 'block' containing the whole grid - eventually add more MPI communication functions to communicate between blocks. A block should probably be a 'NUMA region' for maximum efficiency.

      Note: charge-exchange collisions loop over neutral species for each ion species. At the moment this loop is not parallelised (although it could be, by introducing some more loop ranges), as at the moment we only run with 1 ion species and 1 neutral species.

      source
      moment_kinetics.communication.comm_anyv_subblockConstant

      Communicator for the local velocity-space subset of a shared-memory block in a 'anyv' region

      The 'anyv' region is used to parallelise the collision operator. See moment_kinetics.looping.get_best_anyv_split.

      Must use a Ref{MPI.Comm} to allow a non-const MPI.Comm to be stored. Need to actually assign to this and not just copy a pointer into the .val member because otherwise the MPI.Comm object created by MPI.Comm_split() would be deleted, which probably makes MPI.jl delete the communicator.

      source
      moment_kinetics.communication.comm_blockConstant

      Communicator connecting a shared-memory region

      Must use a Ref{MPI.Comm} to allow a non-const MPI.Comm to be stored. Need to actually assign to this and not just copy a pointer into the .val member because otherwise the MPI.Comm object created by MPI.Comm_split() would be deleted, which probably makes MPI.jl delete the communicator.

      source
      moment_kinetics.communication.comm_inter_blockConstant

      Communicator connecting the root processes of each shared memory block

      Must use a Ref{MPI.Comm} to allow a non-const MPI.Comm to be stored. Need to actually assign to this and not just copy a pointer into the .val member because otherwise the MPI.Comm object created by MPI.Comm_split() would be deleted, which probably makes MPI.jl delete the communicator.

      source
      moment_kinetics.communication.MPISharedArrayType

      Type used to declare a shared-memory array. When debugging is not active MPISharedArray is just an alias for Array, but when @debug_shared_array is activated, it is instead defined as an alias for DebugMPISharedArray.

      source
      moment_kinetics.communication._anyv_subblock_synchronizeMethod

      Call an MPI Barrier for all processors in an 'anyv' sub-block.

      The 'anyv' region is used to parallelise the collision operator. See moment_kinetics.looping.get_best_anyv_split.

      Used to synchronise processors that are working on the same shared-memory array(s) between operations, to avoid race conditions. Should be even cheaper than _block_synchronize because it only requires communication on a smaller communicator.

      Note: _anyv_subblock_synchronize() may be called different numbers of times on different sub-blocks, depending on how the species and spatial dimensions are split up. @debug_detect_redundant_block_synchronize is not implemented (yet?) for _anyv_subblock_synchronize().

      source
      moment_kinetics.communication._block_synchronizeMethod

      Call an MPI Barrier for all processors in a block.

      Used to synchronise processors that are working on the same shared-memory array(s) between operations, to avoid race conditions. Should be (much) cheaper than a global MPI Barrier because it only requires communication within a single node.

      Note: some debugging code currently assumes that if blocksynchronize() is called on one block, it is called simultaneously on all blocks. It seems likely that this will always be true, but if it ever changes (i.e. different blocks doing totally different work), the debugging routines need to be updated.

      source
      moment_kinetics.communication.allocate_sharedMethod

      Get a shared-memory array of mk_float (shared by all processes in a 'block')

      Create a shared-memory array using MPI.Win_allocate_shared(). Pointer to the memory allocated is wrapped in a Julia array. Memory is not managed by the Julia array though. A reference to the MPI.Win needs to be freed - this is done by saving the MPI.Win into a Vector in the Communication module, which has all its entries freed by the finalize_comms!() function, which should be called when moment_kinetics is done running a simulation/test.

      Arguments

      dims - mkint or Tuple{mkint} Dimensions of the array to be created. Dimensions passed define the size of the array which is being handled by the 'block' (rather than the global array, or a subset for a single process). comm - MPI.Comm, default comm_block[] MPI communicator containing the processes that share the array. maybe_debug - Bool Can be set to false to force not creating a DebugMPISharedArray when debugging is active. This avoids recursion when including a shared-memory array as a member of a DebugMPISharedArray for debugging purposes.

      Returns

      Array{mk_float}

      source
      moment_kinetics.communication.finalize_comms!Method

      Clean up from communications

      Do any needed clean-up for MPI, etc. Does not call MPI.Finalize() - this is called anyway when Julia exits, and we do not want to call it explicitly so that multiple runs can be done in a single Julia session.

      Frees any shared-memory arrays.

      source
      moment_kinetics.communication.initialize_comms!Method

      Set up communications

      Check that global variables are in the correct state (i.e. caches were emptied correctly if they were used before).

      Also does some set up for debugging routines, if they are active.

      source
      moment_kinetics.communication.setup_distributed_memory_MPIMethod

      Function to take information from user about r z grids and number of processes allocated to set up communicators notation definitions: - block: group of processes that share data with shared memory - z group: group of processes that need to communicate data for z derivatives - r group: group of processes that need to communicate data for r derivatives This routine assumes that the number of processes is selected by the user to match exactly the number the ratio

      nblocks = (rnelementglobal/rnelementlocal)*(znelementglobal/znelementlocal)

      This guarantees perfect load balancing. Shared memory is used to parallelise the other dimensions within each distributed-memory parallelised rz block.

      source
      moment_kinetics.communication.setup_distributed_memory_MPI_for_weights_precomputationMethod

      Function to take information from user about vpa vperp grids and number of processes allocated to set up communicators for precomputation of the Rosenbluth potential integration weights notation definitions: - block: group of processes that share data with shared memory - vpa group: group of processes that need to communicate data for vpa derivatives/integrals - vperp group: group of processes that need to communicate data for vperp derivatives/integrals This routine assumes that the number of processes is selected by the user to match or be larger than the ratio

      nblocks = (vpanelementglobal/vpanelementlocal)*(vperpnelementglobal/vperpnelementlocal)

      We also need to know (from user input) the maximum number of cores per shared memory region. A fraction of the cores will not contribute to the calculation, as we cannot guarantee that the same number of cores is required for the rz parallelisation as the vpa vperp parallelisation

      source
      +communication · moment_kinetics

      communication

      moment_kinetics.communicationModule

      Communication functions and setup

      Split the grid into 'blocks'. Each block can use shared memory (MPI shared memory arrays). At the moment only works with a single 'block' containing the whole grid - eventually add more MPI communication functions to communicate between blocks. A block should probably be a 'NUMA region' for maximum efficiency.

      Note: charge-exchange collisions loop over neutral species for each ion species. At the moment this loop is not parallelised (although it could be, by introducing some more loop ranges), as at the moment we only run with 1 ion species and 1 neutral species.

      source
      moment_kinetics.communication.comm_anyv_subblockConstant

      Communicator for the local velocity-space subset of a shared-memory block in a 'anyv' region

      The 'anyv' region is used to parallelise the collision operator. See moment_kinetics.looping.get_best_anyv_split.

      Must use a Ref{MPI.Comm} to allow a non-const MPI.Comm to be stored. Need to actually assign to this and not just copy a pointer into the .val member because otherwise the MPI.Comm object created by MPI.Comm_split() would be deleted, which probably makes MPI.jl delete the communicator.

      source
      moment_kinetics.communication.comm_blockConstant

      Communicator connecting a shared-memory region

      Must use a Ref{MPI.Comm} to allow a non-const MPI.Comm to be stored. Need to actually assign to this and not just copy a pointer into the .val member because otherwise the MPI.Comm object created by MPI.Comm_split() would be deleted, which probably makes MPI.jl delete the communicator.

      source
      moment_kinetics.communication.comm_inter_blockConstant

      Communicator connecting the root processes of each shared memory block

      Must use a Ref{MPI.Comm} to allow a non-const MPI.Comm to be stored. Need to actually assign to this and not just copy a pointer into the .val member because otherwise the MPI.Comm object created by MPI.Comm_split() would be deleted, which probably makes MPI.jl delete the communicator.

      source
      moment_kinetics.communication.MPISharedArrayType

      Type used to declare a shared-memory array. When debugging is not active MPISharedArray is just an alias for Array, but when @debug_shared_array is activated, it is instead defined as an alias for DebugMPISharedArray.

      source
      moment_kinetics.communication._anyv_subblock_synchronizeMethod

      Call an MPI Barrier for all processors in an 'anyv' sub-block.

      The 'anyv' region is used to parallelise the collision operator. See moment_kinetics.looping.get_best_anyv_split.

      Used to synchronise processors that are working on the same shared-memory array(s) between operations, to avoid race conditions. Should be even cheaper than _block_synchronize because it only requires communication on a smaller communicator.

      Note: _anyv_subblock_synchronize() may be called different numbers of times on different sub-blocks, depending on how the species and spatial dimensions are split up. @debug_detect_redundant_block_synchronize is not implemented (yet?) for _anyv_subblock_synchronize().

      source
      moment_kinetics.communication._block_synchronizeMethod

      Call an MPI Barrier for all processors in a block.

      Used to synchronise processors that are working on the same shared-memory array(s) between operations, to avoid race conditions. Should be (much) cheaper than a global MPI Barrier because it only requires communication within a single node.

      Note: some debugging code currently assumes that if blocksynchronize() is called on one block, it is called simultaneously on all blocks. It seems likely that this will always be true, but if it ever changes (i.e. different blocks doing totally different work), the debugging routines need to be updated.

      source
      moment_kinetics.communication.allocate_sharedMethod

      Get a shared-memory array of mk_float (shared by all processes in a 'block')

      Create a shared-memory array using MPI.Win_allocate_shared(). Pointer to the memory allocated is wrapped in a Julia array. Memory is not managed by the Julia array though. A reference to the MPI.Win needs to be freed - this is done by saving the MPI.Win into a Vector in the Communication module, which has all its entries freed by the finalize_comms!() function, which should be called when moment_kinetics is done running a simulation/test.

      Arguments

      dims - mkint or Tuple{mkint} Dimensions of the array to be created. Dimensions passed define the size of the array which is being handled by the 'block' (rather than the global array, or a subset for a single process). comm - MPI.Comm, default comm_block[] MPI communicator containing the processes that share the array. maybe_debug - Bool Can be set to false to force not creating a DebugMPISharedArray when debugging is active. This avoids recursion when including a shared-memory array as a member of a DebugMPISharedArray for debugging purposes.

      Returns

      Array{mk_float}

      source
      moment_kinetics.communication.finalize_comms!Method

      Clean up from communications

      Do any needed clean-up for MPI, etc. Does not call MPI.Finalize() - this is called anyway when Julia exits, and we do not want to call it explicitly so that multiple runs can be done in a single Julia session.

      Frees any shared-memory arrays.

      source
      moment_kinetics.communication.initialize_comms!Method

      Set up communications

      Check that global variables are in the correct state (i.e. caches were emptied correctly if they were used before).

      Also does some set up for debugging routines, if they are active.

      source
      moment_kinetics.communication.setup_distributed_memory_MPIMethod

      Function to take information from user about r z grids and number of processes allocated to set up communicators notation definitions: - block: group of processes that share data with shared memory - z group: group of processes that need to communicate data for z derivatives - r group: group of processes that need to communicate data for r derivatives This routine assumes that the number of processes is selected by the user to match exactly the number the ratio

      nblocks = (rnelementglobal/rnelementlocal)*(znelementglobal/znelementlocal)

      This guarantees perfect load balancing. Shared memory is used to parallelise the other dimensions within each distributed-memory parallelised rz block.

      source
      moment_kinetics.communication.setup_distributed_memory_MPI_for_weights_precomputationMethod

      Function to take information from user about vpa vperp grids and number of processes allocated to set up communicators for precomputation of the Rosenbluth potential integration weights notation definitions: - block: group of processes that share data with shared memory - vpa group: group of processes that need to communicate data for vpa derivatives/integrals - vperp group: group of processes that need to communicate data for vperp derivatives/integrals This routine assumes that the number of processes is selected by the user to match or be larger than the ratio

      nblocks = (vpanelementglobal/vpanelementlocal)*(vperpnelementglobal/vperpnelementlocal)

      We also need to know (from user input) the maximum number of cores per shared memory region. A fraction of the cores will not contribute to the calculation, as we cannot guarantee that the same number of cores is required for the rz parallelisation as the vpa vperp parallelisation

      source
      diff --git a/dev/zz_constants/index.html b/dev/zz_constants/index.html index 338ad9b850..3179d3204b 100644 --- a/dev/zz_constants/index.html +++ b/dev/zz_constants/index.html @@ -1,2 +1,2 @@ -constants · moment_kinetics
      +constants · moment_kinetics
      diff --git a/dev/zz_continuity/index.html b/dev/zz_continuity/index.html index 832e6ba546..edf29b7a44 100644 --- a/dev/zz_continuity/index.html +++ b/dev/zz_continuity/index.html @@ -1,2 +1,2 @@ -continuity · moment_kinetics
      +continuity · moment_kinetics
      diff --git a/dev/zz_coordinates/index.html b/dev/zz_coordinates/index.html index 674915d059..b0f59643a5 100644 --- a/dev/zz_coordinates/index.html +++ b/dev/zz_coordinates/index.html @@ -1,9 +1,9 @@ -coordinates · moment_kinetics

      coordinates

      moment_kinetics.coordinates.define_coordinateFunction
      define_coordinate(input_dict, name; parallel_io::Bool=false,
      +coordinates · moment_kinetics

      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
      + 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
      diff --git a/dev/zz_debugging/index.html b/dev/zz_debugging/index.html index 2c576a6c92..2c626fd0c2 100644 --- a/dev/zz_debugging/index.html +++ b/dev/zz_debugging/index.html @@ -1,2 +1,2 @@ -debugging · moment_kinetics

      debugging

      moment_kinetics.debuggingModule

      Define debugging levels that can be used to include extra debugging steps

      Provides a bunch of macros (see the macronames Vector) that can be used to surround code in other modules so that it only runs if the 'debug level' passed to the --debug or -d command line argument is high enough.

      Also provides macro *_ifelse whose names are taken from macronames, which can be used to switch definitions, etc. For example, if debug_shared_array is in macronames, then

      const MPISharedArray = @debug_shared_array_ifelse(DebugMPISharedArray, Array)

      can be used to make the type represented by MPISharedArray depend on the debug level.

      source
      +debugging · moment_kinetics

      debugging

      moment_kinetics.debuggingModule

      Define debugging levels that can be used to include extra debugging steps

      Provides a bunch of macros (see the macronames Vector) that can be used to surround code in other modules so that it only runs if the 'debug level' passed to the --debug or -d command line argument is high enough.

      Also provides macro *_ifelse whose names are taken from macronames, which can be used to switch definitions, etc. For example, if debug_shared_array is in macronames, then

      const MPISharedArray = @debug_shared_array_ifelse(DebugMPISharedArray, Array)

      can be used to make the type represented by MPISharedArray depend on the debug level.

      source
      diff --git a/dev/zz_derivatives/index.html b/dev/zz_derivatives/index.html index 68211da1b3..c92f22111d 100644 --- a/dev/zz_derivatives/index.html +++ b/dev/zz_derivatives/index.html @@ -1,2 +1,2 @@ -derivatives · moment_kinetics

      derivatives

      moment_kinetics.derivativesModule

      This module contains all the necessary derivatives needed to carry out distributed memory differential operations on the arrays in moment kinetics. We provide separate derivative functions for each (i) distributed dimension and (ii) array shape. We do not need to provide derivatives for non-distributed dimensions as these can by handled by the derivative! function from calculus.jl

      source
      +derivatives · moment_kinetics

      derivatives

      moment_kinetics.derivativesModule

      This module contains all the necessary derivatives needed to carry out distributed memory differential operations on the arrays in moment kinetics. We provide separate derivative functions for each (i) distributed dimension and (ii) array shape. We do not need to provide derivatives for non-distributed dimensions as these can by handled by the derivative! function from calculus.jl

      source
      diff --git a/dev/zz_electron_fluid_equations/index.html b/dev/zz_electron_fluid_equations/index.html index 89f6da0e59..dabe0fe013 100644 --- a/dev/zz_electron_fluid_equations/index.html +++ b/dev/zz_electron_fluid_equations/index.html @@ -1,4 +1,4 @@ -electron_fluid_equations · moment_kinetics

      electron_fluid_equations

      moment_kinetics.electron_fluid_equations.calculate_Epar_from_electron_force_balance!Method

      solve the electron force balance (parallel momentum) equation for the parallel electric field, Epar: Epar = -dphi/dz = (2/ne) * (-dppare/dz + frictionforce + ne * me * nn * Ren * (un - ue)) NB: in 1D only Epar is needed for update of ion pdf, so boundary phi is irrelevant inputs: dense = electron density dppardz = zed derivative of electron parallel pressure nuei = electron-ion collision frequency friction = electron-ion parallel friction force nneutralspecies = number of evolved neutral species chargeexchange = electron-neutral charge exchange frequency meovermi = electron-ion mass ratio densn = neutral density uparn = neutral parallel flow upare = electron parallel flow output: Epar = parallel electric field

      source
      moment_kinetics.electron_fluid_equations.calculate_electron_density!Method

      use quasineutrality to obtain the electron density from the initial densities of the various ion species: sumi densi = dense inputs: dense = electron density at previous time level updated = flag indicating if the electron density is updated densi = updated ion density output: dense = updated electron density updated = flag indicating that the electron density has been updated

      source
      moment_kinetics.electron_fluid_equations.calculate_electron_qpar!Method

      calculate the parallel component of the electron heat flux. there are currently two supported options for the parallel heat flux: Braginskii collisional closure - qpare = -3.16*ppare/(me*nuei)dT/dz - 0.71ppare*(upari-upare) collisionless closure - d(qpare)/dz = 0 ==> qpare = constant inputs: qpare = parallel electron heat flux at the previous time level qparupdated = flag indicating whether qpar is updated already pdf = electron pdf ppare = electron parallel pressure upare = electron parallel flow vthe = electron thermal speed dTedz = zed derivative of electron temperature upari = ion parallel flow nuei = electron-ion collision frequency meovermi = electron-to-ion mass ratio electronmodel = choice of model for electron physics vpa = struct containing information about the vpa coordinate output: qpare = updated parallel electron heat flux qparupdated = flag indicating that the parallel electron heat flux is updated

      source
      moment_kinetics.electron_fluid_equations.calculate_electron_upar_from_charge_conservation!Method

      use charge conservation equation to solve for the electron parallel flow density: d/dz(sumi ni upari - ne upare) = 0 ==> {sumi ni upari}(z) - {sumi ni upari}(zbound) = {ne upare}(z) - {ne upare}(zbound) inputs: upare = should contain updated electron parallel flow at boundaries in zed updated = flag indicating whether the electron parallel flow is already updated dense = electron particle density upari = ion parallel flow density densi = ion particle density output: upare = contains the updated electron parallel flow

      source
      moment_kinetics.electron_fluid_equations.electron_energy_residual!Method
      electron_energy_residual!(residual, electron_ppar_out, electron_ppar, in,
      -                          fvec_in, moments, collisions, composition,
      -                          external_source_settings, num_diss_params, z, dt, ir)

      The residual is a function whose input is electron_ppar, so that when it's output residual is zero, electronppar is the result of a backward-Euler timestep: (fout - fin) / dt = RHS(fout) ⇒ (fout - fin) - dt*RHS(f_out) = 0

      This function assumes any needed moment derivatives are already calculated using electron_ppar_out and stored in moments.electron.

      Note that this function operates on a single point in r, given by ir, and residual, electron_ppar_out, and electron_ppar_in should have no r-dimension.

      source
      +electron_fluid_equations · moment_kinetics

      electron_fluid_equations

      moment_kinetics.electron_fluid_equations.calculate_Epar_from_electron_force_balance!Method

      solve the electron force balance (parallel momentum) equation for the parallel electric field, Epar: Epar = -dphi/dz = (2/ne) * (-dppare/dz + frictionforce + ne * me * nn * Ren * (un - ue)) NB: in 1D only Epar is needed for update of ion pdf, so boundary phi is irrelevant inputs: dense = electron density dppardz = zed derivative of electron parallel pressure nuei = electron-ion collision frequency friction = electron-ion parallel friction force nneutralspecies = number of evolved neutral species chargeexchange = electron-neutral charge exchange frequency meovermi = electron-ion mass ratio densn = neutral density uparn = neutral parallel flow upare = electron parallel flow output: Epar = parallel electric field

      source
      moment_kinetics.electron_fluid_equations.calculate_electron_density!Method

      use quasineutrality to obtain the electron density from the initial densities of the various ion species: sumi densi = dense inputs: dense = electron density at previous time level updated = flag indicating if the electron density is updated densi = updated ion density output: dense = updated electron density updated = flag indicating that the electron density has been updated

      source
      moment_kinetics.electron_fluid_equations.calculate_electron_qpar!Method

      calculate the parallel component of the electron heat flux. there are currently two supported options for the parallel heat flux: Braginskii collisional closure - qpare = -3.16*ppare/(me*nuei)dT/dz - 0.71ppare*(upari-upare) collisionless closure - d(qpare)/dz = 0 ==> qpare = constant inputs: qpare = parallel electron heat flux at the previous time level qparupdated = flag indicating whether qpar is updated already pdf = electron pdf ppare = electron parallel pressure upare = electron parallel flow vthe = electron thermal speed dTedz = zed derivative of electron temperature upari = ion parallel flow nuei = electron-ion collision frequency meovermi = electron-to-ion mass ratio electronmodel = choice of model for electron physics vpa = struct containing information about the vpa coordinate output: qpare = updated parallel electron heat flux qparupdated = flag indicating that the parallel electron heat flux is updated

      source
      moment_kinetics.electron_fluid_equations.calculate_electron_upar_from_charge_conservation!Method

      use charge conservation equation to solve for the electron parallel flow density: d/dz(sumi ni upari - ne upare) = 0 ==> {sumi ni upari}(z) - {sumi ni upari}(zbound) = {ne upare}(z) - {ne upare}(zbound) inputs: upare = should contain updated electron parallel flow at boundaries in zed updated = flag indicating whether the electron parallel flow is already updated dense = electron particle density upari = ion parallel flow density densi = ion particle density output: upare = contains the updated electron parallel flow

      source
      moment_kinetics.electron_fluid_equations.electron_energy_residual!Method
      electron_energy_residual!(residual, electron_ppar_out, fvec_in, moments,
      +                          collisions, composition, external_source_settings,
      +                          num_diss_params, z, dt)

      The residual is a function whose input is electron_ppar, so that when it's output residual is zero, electronppar is the result of a backward-Euler timestep: (fout - fin) / dt = RHS(fout) ⇒ (fout - fin) - dt*RHS(f_out) = 0

      This function assumes any needed moment derivatives are already calculated using electron_ppar_out and stored in moments.electron.

      source
      diff --git a/dev/zz_electron_kinetic_equation/index.html b/dev/zz_electron_kinetic_equation/index.html index 5ef6f3f7a7..d7463d668f 100644 --- a/dev/zz_electron_kinetic_equation/index.html +++ b/dev/zz_electron_kinetic_equation/index.html @@ -1,21 +1,12 @@ -electron_kinetic_equation · moment_kinetics

      electron_kinetic_equation

      moment_kinetics.electron_kinetic_equation.calculate_contribution_from_z_advection!Method

      calculates the contribution to the residual of the electron kinetic equation from the z advection term: residual = zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa - pdf * prefactor INPUTS: zadvectionterm = dummy array to be filled with the contribution to the residual from the z advection term pdf = modified electron pdf used in the kinetic equation = (true electron pdf / dense) * vthe vthe = electron thermal speed z = z grid vpa = vparallel grid zspectral = spectral representation of the z grid scratchdummy = dummy array to be used for temporary storage OUTPUT: zadvectionterm = updated contribution to the residual from the z advection term

      source
      moment_kinetics.electron_kinetic_equation.electron_adaptive_timestep_update!Method
      electron_adaptive_timestep_update!(scratch, t, t_params, moments, phi, z_advect,
      +electron_kinetic_equation · moment_kinetics

      electron_kinetic_equation

      moment_kinetics.electron_kinetic_equation.calculate_contribution_from_z_advection!Method

      calculates the contribution to the residual of the electron kinetic equation from the z advection term: residual = zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa - pdf * prefactor INPUTS: zadvectionterm = dummy array to be filled with the contribution to the residual from the z advection term pdf = modified electron pdf used in the kinetic equation = (true electron pdf / dense) * vthe vthe = electron thermal speed z = z grid vpa = vparallel grid zspectral = spectral representation of the z grid scratchdummy = dummy array to be used for temporary storage OUTPUT: zadvectionterm = updated contribution to the residual from the z advection term

      source
      moment_kinetics.electron_kinetic_equation.electron_backward_euler!Method

      Update the electron distribution function using backward-Euler for an artifical time advance of the electron kinetic equation until a steady-state solution is reached.

      Note that this function does not use the runge_kutta timestep functionality. t_params.previous_dt[] is used to store the (adaptively updated) initial timestep of the pseudotimestepping loop (initial value of t_params.dt[] within electron_backward_euler!()). t_params.dt[] is adapted according to the iteration counts of the Newton solver.

      source
      moment_kinetics.electron_kinetic_equation.electron_kinetic_equation_euler_update!Method
      electron_kinetic_equation_euler_update!(f_out, ppar_out, f_in, ppar_in, moments,
      -                                        z, vperp, vpa, z_spectral, vpa_spectral,
      -                                        z_advect, vpa_advect, scratch_dummy,
      -                                        collisions, composition,
      -                                        external_source_settings,
      -                                        num_diss_params, t_params, ir;
      -                                        evolve_ppar=false, ion_dt=nothing)

      Do a forward-Euler update of the electron kinetic equation.

      When evolve_ppar=true is passed, also updates the electron parallel pressure.

      Note that this function operates on a single point in r, given by ir, and f_out, ppar_out, f_in, and ppar_in should have no r-dimension.

      source
      moment_kinetics.electron_kinetic_equation.fill_electron_kinetic_equation_Jacobian!Method
      fill_electron_kinetic_equation_Jacobian!(jacobian_matrix, f, ppar, moments,
      -                                         collisions, composition, z, vperp, vpa,
      -                                         z_spectral, vperp_specral,
      -                                         vpa_spectral, z_advect, vpa_advect,
      -                                         scratch_dummy, external_source_settings,
      -                                         num_diss_params, t_params, ion_dt,
      -                                         ir, evolve_ppar)

      Fill a pre-allocated matrix with the Jacobian matrix for electron kinetic equation and (if evolve_ppar=true) the electron energy equation.

      source
      moment_kinetics.electron_kinetic_equation.implicit_electron_advance!Method
      implicit_electron_advance!()

      Do an implicit solve which finds: the steady-state electron shape function $g_e$; the backward-Euler advanced electron pressure which is updated using $g_e$ at the new time-level.

      The r-dimension is not parallelised. For 1D runs this makes no difference. In 2D it might or might not be necessary. If r-dimension parallelisation is needed, it would need some work. The simplest option would be a non-parallelised outer loop over r, with each nonlinear solve being parallelised over {z,vperp,vpa}. More efficient might be to add an equivalent to the 'anyv' parallelisation used for the collision operator (e.g. 'anyzv'?) to allow the outer r-loop to be parallelised.

      source
      moment_kinetics.electron_kinetic_equation.update_electron_pdf!Method

      updateelectronpdf is a function that uses the electron kinetic equation to solve for the updated electron pdf

      The electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * pre_factor

      INPUTS:
      +                                   evolve_ppar=false)

      Check the error estimate for the embedded RK method and adjust the timestep if appropriate.

      source
      moment_kinetics.electron_kinetic_equation.implicit_electron_advance!Method
      implicit_electron_advance!()

      Do an implicit solve which finds: the steady-state electron shape function $g_e$; the backward-Euler advanced electron pressure which is updated using $g_e$ at the new time-level.

      Implicit electron solve includes r-dimension. For 1D runs this makes no difference. In 2D it might or might not be necessary. If the r-dimension is not needed in the implicit solve, we would need to work on the parallelisation. The simplest option would be a non-parallelised outer loop over r, with each nonlinear solve being parallelised over {z,vperp,vpa}. More efficient might be to add an equivalent to the 'anyv' parallelisation used for the collision operator (e.g. 'anyzv'?) to allow the outer r-loop to be parallelised.

      source
      moment_kinetics.electron_kinetic_equation.update_electron_pdf!Method

      updateelectronpdf is a function that uses the electron kinetic equation to solve for the updated electron pdf

      The electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * pre_factor

      INPUTS:
       scratch = `scratch_pdf` struct used to store Runge-Kutta stages
       pdf = modified electron pdf @ previous time level = (true electron pdf / dens_e) * vth_e
       dens = electron density
      @@ -34,7 +25,7 @@
       max_electron_pdf_iterations = maximum number of iterations to use in the solution of the electron kinetic equation
       ion_dt = if this is passed, the electron pressure is evolved in a form that results in
                a backward-Euler update on the ion timestep (ion_dt) once the electron
      -         pseudo-timestepping reaches steady state.

      OUTPUT: pdf = updated (modified) electron pdf

      source
      moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_picard_iteration!Method

      use Picard iteration to solve the electron kinetic equation

      The electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * pre_factor Picard iteration uses the previous iteration of the electron pdf to calculate the next iteration: zdot * d(pdf^{i+1})/dz + wpadot^{i} * d(pdf^{i})/dwpa = pdf^{i} * prefactor^{i}

      INPUTS: pdf = modified electron pdf @ previous time level = (true electron pdf / dense) * vthe dens = electron density vthe = electron thermal speed ppar = electron parallel pressure ddensdz = z-derivative of the electron density dppardz = z-derivative of the electron parallel pressure dqpardz = z-derivative of the electron parallel heat flux dvthdz = z-derivative of the electron thermal speed z = struct containing z-coordinate information vpa = struct containing vpa-coordinate information zspectral = struct containing spectral information for the z-coordinate vpaspectral = struct containing spectral information for the vpa-coordinate scratchdummy = dummy arrays to be used for temporary storage maxelectronpdfiterations = maximum number of iterations to use in the solution of the electron kinetic equation OUTPUT: pdf = updated (modified) electron pdf

      source
      moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_shooting_method!Method

      updateelectronpdfwithshooting_method is a function that using a shooting method to solve for the electron pdf

      The electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * prefactor The shooting method is 'explicit' in z, solving zdoti * (pdf{i+1} - pdf{i})/dz{i} + wpadot{i} * d(pdf{i})/dwpa = pdf{i} * prefactor{i}

      INPUTS:
      +         pseudo-timestepping reaches steady state.

      OUTPUT: pdf = updated (modified) electron pdf

      source
      moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_picard_iteration!Method

      use Picard iteration to solve the electron kinetic equation

      The electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * pre_factor Picard iteration uses the previous iteration of the electron pdf to calculate the next iteration: zdot * d(pdf^{i+1})/dz + wpadot^{i} * d(pdf^{i})/dwpa = pdf^{i} * prefactor^{i}

      INPUTS: pdf = modified electron pdf @ previous time level = (true electron pdf / dense) * vthe dens = electron density vthe = electron thermal speed ppar = electron parallel pressure ddensdz = z-derivative of the electron density dppardz = z-derivative of the electron parallel pressure dqpardz = z-derivative of the electron parallel heat flux dvthdz = z-derivative of the electron thermal speed z = struct containing z-coordinate information vpa = struct containing vpa-coordinate information zspectral = struct containing spectral information for the z-coordinate vpaspectral = struct containing spectral information for the vpa-coordinate scratchdummy = dummy arrays to be used for temporary storage maxelectronpdfiterations = maximum number of iterations to use in the solution of the electron kinetic equation OUTPUT: pdf = updated (modified) electron pdf

      source
      moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_shooting_method!Method

      updateelectronpdfwithshooting_method is a function that using a shooting method to solve for the electron pdf

      The electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * prefactor The shooting method is 'explicit' in z, solving zdoti * (pdf{i+1} - pdf{i})/dz{i} + wpadot{i} * d(pdf{i})/dwpa = pdf{i} * prefactor{i}

      INPUTS:
       pdf = modified electron pdf @ previous time level = (true electron pdf / dens_e) * vth_e
       dens = electron density
       vthe = electron thermal speed
      @@ -46,7 +37,7 @@
       z = struct containing z-coordinate information
       vpa = struct containing vpa-coordinate information
       vpa_spectral = struct containing spectral information for the vpa-coordinate
      -scratch_dummy = dummy arrays to be used for temporary storage

      OUTPUT: pdf = updated (modified) electron pdf

      source
      moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_time_advance!Method

      updateelectronpdfwithtime_advance is a function that introduces an artifical time derivative to advance the electron kinetic equation until a steady-state solution is reached.

      The electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * pre_factor

      INPUTS:
      +scratch_dummy = dummy arrays to be used for temporary storage

      OUTPUT: pdf = updated (modified) electron pdf

      source
      moment_kinetics.electron_kinetic_equation.update_electron_pdf_with_time_advance!Method

      updateelectronpdfwithtime_advance is a function that introduces an artifical time derivative to advance the electron kinetic equation until a steady-state solution is reached.

      The electron kinetic equation is: zdot * d(pdf)/dz + wpadot * d(pdf)/dwpa = pdf * pre_factor

      INPUTS:
       pdf = modified electron pdf @ previous time level = (true electron pdf / dens_e) * vth_e
       dens = electron density
       vthe = electron thermal speed
      @@ -65,4 +56,4 @@
       initial_time = initial value for the (pseudo-)time
       ion_dt = if this is passed, the electron pressure is evolved in a form that results in
                a backward-Euler update on the ion timestep (ion_dt) once the electron
      -         pseudo-timestepping reaches steady state.

      OUTPUT: pdf = updated (modified) electron pdf

      source
      + pseudo-timestepping reaches steady state.

      OUTPUT: pdf = updated (modified) electron pdf

      source
      diff --git a/dev/zz_electron_vpa_advection/index.html b/dev/zz_electron_vpa_advection/index.html index eb369382cf..abdc06fb9d 100644 --- a/dev/zz_electron_vpa_advection/index.html +++ b/dev/zz_electron_vpa_advection/index.html @@ -1,2 +1,2 @@ -electron_vpa_advection · moment_kinetics
      +electron_vpa_advection · moment_kinetics
      diff --git a/dev/zz_electron_z_advection/index.html b/dev/zz_electron_z_advection/index.html index a5142f156b..dd259fede1 100644 --- a/dev/zz_electron_z_advection/index.html +++ b/dev/zz_electron_z_advection/index.html @@ -1,2 +1,2 @@ -electron_z_advection · moment_kinetics
      +electron_z_advection · moment_kinetics
      diff --git a/dev/zz_em_fields/index.html b/dev/zz_em_fields/index.html index af0b55fad7..ca36413c9d 100644 --- a/dev/zz_em_fields/index.html +++ b/dev/zz_em_fields/index.html @@ -1,2 +1,2 @@ -em_fields · moment_kinetics
      +em_fields · moment_kinetics
      diff --git a/dev/zz_energy_equation/index.html b/dev/zz_energy_equation/index.html index 53bcb1dadc..e9853d14d0 100644 --- a/dev/zz_energy_equation/index.html +++ b/dev/zz_energy_equation/index.html @@ -1,2 +1,2 @@ -energy_equation · moment_kinetics
      +energy_equation · moment_kinetics
      diff --git a/dev/zz_external_sources/index.html b/dev/zz_external_sources/index.html index f3b6f483d2..7fe8666216 100644 --- a/dev/zz_external_sources/index.html +++ b/dev/zz_external_sources/index.html @@ -1,9 +1,7 @@ -external_sources · moment_kinetics

      external_sources

      moment_kinetics.external_sourcesModule

      Maxwellian source terms with spatially varying parameters representing external sources of particles and energy.

      Note there is no parallel momentum input from the external sources.

      The sources can be controlled by a PI controller to set density to a target value or profile. Note that the PI controller should not be used with operator splitting - implementing it in a way that would be compatible with splitting is complicated because the source contributes to several terms.

      source
      moment_kinetics.external_sources.external_electron_source!Method
      external_electron_source!(pdf_out, pdf_in, electron_density, electron_upar,
      +external_sources · moment_kinetics

      external_sources

      moment_kinetics.external_sourcesModule

      Maxwellian source terms with spatially varying parameters representing external sources of particles and energy.

      Note there is no parallel momentum input from the external sources.

      The sources can be controlled by a PI controller to set density to a target value or profile. Note that the PI controller should not be used with operator splitting - implementing it in a way that would be compatible with splitting is complicated because the source contributes to several terms.

      source
      moment_kinetics.external_sources.external_electron_source!Method
      external_electron_source!(pdf_out, pdf_in, electron_density, electron_upar,
                                 moments, composition, electron_source, index, vperp,
      -                          vpa, dt, ir)

      Add external source term to the electron kinetic equation.

      Note that this function operates on a single point in r, given by ir, and pdf_out, pdf_in, electron_density, and electron_upar should have no r-dimension.

      source
      moment_kinetics.external_sources.external_electron_source_controller!Method
      external_electron_source_controller!(fvec_in, moments, electron_source_settings, dt)

      Calculate the amplitude, e.g. when using a PI controller for the density to set the external source amplitude.

      As the electron density source must be equal to the ion density source in order not to inject charge into the simulation, the electron source (at least in some modes of operation) depends on the ion source, so external_ion_source_controller! must be called before this function is called so that moments.ion.external_source_amplitude is up to date.

      source
      moment_kinetics.external_sources.initialize_external_source_amplitude!Method
      initialize_external_source_amplitude!(moments, external_source_settings, vperp,
      -                                      vzeta, vr, n_neutral_species)

      Initialize the arrays moments.ion.external_source_amplitude, moments.ion.external_source_density_amplitude, moments.ion.external_source_momentum_amplitude, moments.ion.external_source_pressure_amplitude, moments.electron.external_source_amplitude, moments.electron.external_source_density_amplitude, moments.electron.external_source_momentum_amplitude, moments.electron.external_source_pressure_amplitude, moments.neutral.external_source_amplitude, moments.neutral.external_source_density_amplitude, moments.neutral.external_source_momentum_amplitude, and moments.neutral.external_source_pressure_amplitude, using the settings in external_source_settings

      source
      moment_kinetics.external_sources.setup_external_sources!Method
      setup_external_sources!(input_dict, r, z)

      Set up parameters for the external sources using settings in input_dict.

      Updates input_dict with defaults for unset parameters.

      r and z are the coordinates.coordinate objects for the r- and z-coordinates.

      Returns a NamedTuple (ion=ion_source_settings, neutral=neutral_source_settings) containing two NamedTuples of settings.

      source
      + vpa, dt)

      Add external source term to the electron kinetic equation.

      source
      moment_kinetics.external_sources.external_electron_source_controller!Method
      external_electron_source_controller!(fvec_in, moments, electron_source_settings, dt)

      Calculate the amplitude, e.g. when using a PI controller for the density to set the external source amplitude.

      As the electron density source must be equal to the ion density source in order not to inject charge into the simulation, the electron source (at least in some modes of operation) depends on the ion source, so external_ion_source_controller! must be called before this function is called so that moments.ion.external_source_amplitude is up to date.

      source
      moment_kinetics.external_sources.initialize_external_source_amplitude!Method
      initialize_external_source_amplitude!(moments, external_source_settings, vperp,
      +                                      vzeta, vr, n_neutral_species)

      Initialize the arrays moments.ion.external_source_amplitude, moments.ion.external_source_density_amplitude, moments.ion.external_source_momentum_amplitude, moments.ion.external_source_pressure_amplitude, moments.electron.external_source_amplitude, moments.electron.external_source_density_amplitude, moments.electron.external_source_momentum_amplitude, moments.electron.external_source_pressure_amplitude, moments.neutral.external_source_amplitude, moments.neutral.external_source_density_amplitude, moments.neutral.external_source_momentum_amplitude, and moments.neutral.external_source_pressure_amplitude, using the settings in external_source_settings

      source
      moment_kinetics.external_sources.setup_external_sources!Method
      setup_external_sources!(input_dict, r, z)

      Set up parameters for the external sources using settings in input_dict.

      Updates input_dict with defaults for unset parameters.

      r and z are the coordinates.coordinate objects for the r- and z-coordinates.

      Returns a NamedTuple (ion=ion_source_settings, neutral=neutral_source_settings) containing two NamedTuples of settings.

      source
      diff --git a/dev/zz_file_io/index.html b/dev/zz_file_io/index.html index 0d49c77118..a2f882ce53 100644 --- a/dev/zz_file_io/index.html +++ b/dev/zz_file_io/index.html @@ -1,9 +1,9 @@ -file_io · moment_kinetics

      file_io

      moment_kinetics.file_io.debug_output_fileConstant

      An nc_info instance that may be initialised for writing debug output

      This is a non-const module variable, so does cause type instability, but it is only used for debugging (from debug_dump()) so performance is not critical.

      source
      moment_kinetics.file_io.append_to_dynamic_varFunction
      append_to_dynamic_var(io_var, data, t_idx, parallel_io, coords...; only_root=false)

      Append data to the dynamic variable io_var. The time-index of the data being appended is t_idx. parallel_io indicates whether parallel I/O is being used. coords... is used to get the ranges to write from/to (needed for parallel I/O) - the entries in the coords tuple can be either coordinate instances or integers (for an integer n the range is 1:n).

      If only_root=true is passed, the data is only written once - from the global root process if parallel I/O is being used (if parallel I/O is not used, this has no effect as each file is only written by one process).

      source
      moment_kinetics.file_io.create_dynamic_variable!Function
      create_dynamic_variable!(file_or_group, name, type,
      +file_io · moment_kinetics

      file_io

      moment_kinetics.file_io.debug_output_fileConstant

      An nc_info instance that may be initialised for writing debug output

      This is a non-const module variable, so does cause type instability, but it is only used for debugging (from debug_dump()) so performance is not critical.

      source
      moment_kinetics.file_io.append_to_dynamic_varFunction
      append_to_dynamic_var(io_var, data, t_idx, parallel_io, coords...; only_root=false)

      Append data to the dynamic variable io_var. The time-index of the data being appended is t_idx. parallel_io indicates whether parallel I/O is being used. coords... is used to get the ranges to write from/to (needed for parallel I/O) - the entries in the coords tuple can be either coordinate instances or integers (for an integer n the range is 1:n).

      If only_root=true is passed, the data is only written once - from the global root process if parallel I/O is being used (if parallel I/O is not used, this has no effect as each file is only written by one process).

      source
      moment_kinetics.file_io.create_dynamic_variable!Function
      create_dynamic_variable!(file_or_group, name, type,
                                coords::{coordinate,NamedTuple}...;
      -                         description=nothing, units=nothing)

      Create a time-evolving variable in file_or_group named name of type type. coords are the coordinates corresponding to the dimensions of the array, in the order of the array dimensions - they may be either coordinate structs or NamedTuples that contain at least the fields name, n. The species dimension does not have a coordinate, so the number of species is passed as nspecies. A description and/or units can be added with the keyword arguments.

      source
      moment_kinetics.file_io.debug_dumpFunction
      debug_dump(ff, dens, upar, ppar, phi, t; istage=0, label="")
      -debug_dump(fvec::scratch_pdf, fields::em_fields_struct, t; istage=0, label="")

      Dump variables into a NetCDF file for debugging

      Intended to be called more frequently than write_data_to_binary(), possibly several times within a timestep, so includes a label argument to identify the call site.

      Writes to a file called debug_output.h5 in the current directory.

      Can either be called directly with the arrays to be dumped (fist signature), or using scratch_pdf and em_fields_struct structs.

      nothing can be passed to any of the positional arguments (if they are unavailable at a certain point in the code, or just not interesting). t=nothing will set t to the value saved in the previous call (or 0.0 on the first call). Passing nothing to the other arguments will set that array to 0.0 for this call (need to write some value so all the arrays have the same length, with an entry for each call to debug_dump()).

      source
      moment_kinetics.file_io.write_Dict_to_sectionMethod
      write_Dict_to_section(section_io, section_dict, parallel_io)

      Write the contents of section_dict into the I/O group section_io.

      Any nested Dicts in section_dict are written to subsections.

      All the keys in section_dict (and any nested Dicts) should be Strings.

      parallel_io is a Bool indicating whether parallel I/O is being used.

      source
      moment_kinetics.file_io.write_single_value!Function
      write_single_value!(file_or_group, name,
      +                         description=nothing, units=nothing)

      Create a time-evolving variable in file_or_group named name of type type. coords are the coordinates corresponding to the dimensions of the array, in the order of the array dimensions - they may be either coordinate structs or NamedTuples that contain at least the fields name, n. The species dimension does not have a coordinate, so the number of species is passed as nspecies. A description and/or units can be added with the keyword arguments.

      source
      moment_kinetics.file_io.debug_dumpFunction
      debug_dump(ff, dens, upar, ppar, phi, t; istage=0, label="")
      +debug_dump(fvec::scratch_pdf, fields::em_fields_struct, t; istage=0, label="")

      Dump variables into a NetCDF file for debugging

      Intended to be called more frequently than write_data_to_binary(), possibly several times within a timestep, so includes a label argument to identify the call site.

      Writes to a file called debug_output.h5 in the current directory.

      Can either be called directly with the arrays to be dumped (fist signature), or using scratch_pdf and em_fields_struct structs.

      nothing can be passed to any of the positional arguments (if they are unavailable at a certain point in the code, or just not interesting). t=nothing will set t to the value saved in the previous call (or 0.0 on the first call). Passing nothing to the other arguments will set that array to 0.0 for this call (need to write some value so all the arrays have the same length, with an entry for each call to debug_dump()).

      source
      moment_kinetics.file_io.write_Dict_to_sectionMethod
      write_Dict_to_section(section_io, section_dict, parallel_io)

      Write the contents of section_dict into the I/O group section_io.

      Any nested Dicts in section_dict are written to subsections.

      All the keys in section_dict (and any nested Dicts) should be Strings.

      parallel_io is a Bool indicating whether parallel I/O is being used.

      source
      moment_kinetics.file_io.write_single_value!Function
      write_single_value!(file_or_group, name,
                           data::Union{Number, AbstractString, AbstractArray{T,N}},
                           coords::Union{coordinate,mk_int,NamedTuple}...; parallel_io,
      -                    description=nothing, units=nothing) where {T,N}

      Write a single variable to a file or group. If a description or units are passed, add as attributes of the variable.

      source
      + description=nothing, units=nothing) where {T,N}

      Write a single variable to a file or group. If a description or units are passed, add as attributes of the variable.

      source
      diff --git a/dev/zz_finite_differences/index.html b/dev/zz_finite_differences/index.html index a4c70e6bf3..03eb54028d 100644 --- a/dev/zz_finite_differences/index.html +++ b/dev/zz_finite_differences/index.html @@ -1,2 +1,2 @@ -finite_differences · moment_kinetics

      finite_differences

      moment_kinetics.calculus.elementwise_derivative!Method
      elementwise_derivative!(coord, f, adv_fac, not_spectral::finite_difference_info)

      Calculate the derivative of f using finite differences, with particular scheme specified by coord.finitedifferenceoption; result stored in coord.scratch_2d.

      source
      +finite_differences · moment_kinetics

      finite_differences

      moment_kinetics.calculus.elementwise_derivative!Method
      elementwise_derivative!(coord, f, adv_fac, not_spectral::finite_difference_info)

      Calculate the derivative of f using finite differences, with particular scheme specified by coord.finitedifferenceoption; result stored in coord.scratch_2d.

      source
      diff --git a/dev/zz_fokker_planck/index.html b/dev/zz_fokker_planck/index.html index 46e1f9d825..15dcf5d922 100644 --- a/dev/zz_fokker_planck/index.html +++ b/dev/zz_fokker_planck/index.html @@ -1,2 +1,2 @@ -fokker_planck · moment_kinetics

      fokker_planck

      moment_kinetics.fokker_planckModule

      module for including the Full-F Fokker-Planck Collision Operator

      The functions in this module are split into two groups.

      The first set of functions implement the weak-form Collision operator using the Rosenbluth-MacDonald-Judd formulation in a divergence form. The Green's functions for the Rosenbluth potentials are used to obtain the Rosenbluth potentials at the boundaries. To find the potentials everywhere else elliptic solves of the PDEs for the Rosenbluth potentials are performed with Dirichlet boundary conditions. These routines provide the default collision operator used in the code.

      The second set of functions are used to set up the necessary arrays to compute the Rosenbluth potentials everywhere in vpa, vperp by direct integration of the Green's functions. These functions are supported for the purposes of testing and debugging.

      Lower-level routines are provided by functions from moment_kinetics.fokker_planck_calculus.

      Parallelisation of the collision operator uses a special 'anyv' region type, see Collision operator and anyv region.

      source
      moment_kinetics.fokker_planck.fokker_planck_collision_operator_weak_form!Method

      Function for evaluating $C_{ss'} = C_{ss'}[F_s,F_{s'}]$

      The result is stored in the array fkpl_arrays.CC.

      The normalised collision frequency for collisions between species s and s' is defined by

      \[\tilde{\nu}_{ss'} = \frac{L_{\mathrm{ref}}}{c_{\mathrm{ref}}}\frac{\gamma_{ss'} n_\mathrm{ref}}{m_s^2 c_\mathrm{ref}^3}\]

      with $\gamma_{ss'} = 2 \pi (Z_s Z_{s'})^2 e^4 \ln \Lambda_{ss'} / (4 \pi \epsilon_0)^2$. The input parameter to this code is

      \[\tilde{\nu}_{ii} = \frac{L_{\mathrm{ref}}}{c_{\mathrm{ref}}}\frac{\gamma_\mathrm{ref} n_\mathrm{ref}}{m_\mathrm{ref}^2 c_\mathrm{ref}^3}\]

      with $\gamma_\mathrm{ref} = 2 \pi e^4 \ln \Lambda_{ii} / (4 \pi \epsilon_0)^2$. This means that $\tilde{\nu}_{ss'} = (Z_s Z_{s'})^2\tilde{\nu}_\mathrm{ref}$ and this conversion is handled explicitly in the code with the charge number input provided by the user.

      source
      moment_kinetics.fokker_planck.init_fokker_planck_collisions_direct_integrationMethod

      function that initialises the arrays needed to calculate the Rosenbluth potentials by direct integration. As this function is only supported to keep the testing of the direct integration method, the struct 'fka' created here does not contain all of the arrays necessary to compute the weak-form operator. This functionality could be ported if necessary.

      source
      +fokker_planck · moment_kinetics

      fokker_planck

      moment_kinetics.fokker_planckModule

      module for including the Full-F Fokker-Planck Collision Operator

      The functions in this module are split into two groups.

      The first set of functions implement the weak-form Collision operator using the Rosenbluth-MacDonald-Judd formulation in a divergence form. The Green's functions for the Rosenbluth potentials are used to obtain the Rosenbluth potentials at the boundaries. To find the potentials everywhere else elliptic solves of the PDEs for the Rosenbluth potentials are performed with Dirichlet boundary conditions. These routines provide the default collision operator used in the code.

      The second set of functions are used to set up the necessary arrays to compute the Rosenbluth potentials everywhere in vpa, vperp by direct integration of the Green's functions. These functions are supported for the purposes of testing and debugging.

      Lower-level routines are provided by functions from moment_kinetics.fokker_planck_calculus.

      Parallelisation of the collision operator uses a special 'anyv' region type, see Collision operator and anyv region.

      source
      moment_kinetics.fokker_planck.fokker_planck_collision_operator_weak_form!Method

      Function for evaluating $C_{ss'} = C_{ss'}[F_s,F_{s'}]$

      The result is stored in the array fkpl_arrays.CC.

      The normalised collision frequency for collisions between species s and s' is defined by

      \[\tilde{\nu}_{ss'} = \frac{L_{\mathrm{ref}}}{c_{\mathrm{ref}}}\frac{\gamma_{ss'} n_\mathrm{ref}}{m_s^2 c_\mathrm{ref}^3}\]

      with $\gamma_{ss'} = 2 \pi (Z_s Z_{s'})^2 e^4 \ln \Lambda_{ss'} / (4 \pi \epsilon_0)^2$. The input parameter to this code is

      \[\tilde{\nu}_{ii} = \frac{L_{\mathrm{ref}}}{c_{\mathrm{ref}}}\frac{\gamma_\mathrm{ref} n_\mathrm{ref}}{m_\mathrm{ref}^2 c_\mathrm{ref}^3}\]

      with $\gamma_\mathrm{ref} = 2 \pi e^4 \ln \Lambda_{ii} / (4 \pi \epsilon_0)^2$. This means that $\tilde{\nu}_{ss'} = (Z_s Z_{s'})^2\tilde{\nu}_\mathrm{ref}$ and this conversion is handled explicitly in the code with the charge number input provided by the user.

      source
      moment_kinetics.fokker_planck.init_fokker_planck_collisions_direct_integrationMethod

      function that initialises the arrays needed to calculate the Rosenbluth potentials by direct integration. As this function is only supported to keep the testing of the direct integration method, the struct 'fka' created here does not contain all of the arrays necessary to compute the weak-form operator. This functionality could be ported if necessary.

      source
      diff --git a/dev/zz_fokker_planck_calculus/index.html b/dev/zz_fokker_planck_calculus/index.html index 8d00644e03..42b34d26bc 100644 --- a/dev/zz_fokker_planck_calculus/index.html +++ b/dev/zz_fokker_planck_calculus/index.html @@ -1,2 +1,2 @@ -fokker_planck_calculus · moment_kinetics

      fokker_planck_calculus

      moment_kinetics.fokker_planck_calculus.calculate_rosenbluth_integrals!Method

      Function to carry out the integration of the revelant distribution functions to form the required coefficients for the full-F operator. We assume that the weights are precalculated. The function takes as arguments the arrays of coefficients (which we fill), the required distributions, the precomputed weights, the indicies of the `field' velocities, and the sizes of the primed vpa and vperp coordinates arrays.

      source
      moment_kinetics.fokker_planck_calculus.get_global_compound_indexMethod
      get_global_compound_index(vpa,vperp,ielement_vpa,ielement_vperp,ivpa_local,ivperp_local)

      For local (within the single element specified by ielement_vpa and ielement_vperp) indices ivpa_local and ivperp_local, get the global index in the 'linear-indexed' 2d space of size (vperp.n, vpa.n) (as returned by ic_func).

      source
      moment_kinetics.fokker_planck_calculus.ic_funcMethod
      ic_func(ivpa::mk_int,ivperp::mk_int,nvpa::mk_int)

      Get the 'linear index' corresponding to ivpa and ivperp. Defined so that the linear index corresponds to the underlying layout in memory of a 2d array indexed by [ivpa,ivperp], i.e. for a 2d array f2d:

      • size(f2d) == (vpa.n, vperp.n)
      • For a reference to f2d that is reshaped to a vector (a 1d array) f1d = vec(f2d) than for any ivpa and ivperp it is true that f1d[ic_func(ivpa,ivperp)] == f2d[ivpa,ivperp].
      source
      moment_kinetics.fokker_planck_calculus.interpolate_2D_vspace!Method

      function to interpolate f(vpa,vperp) from one velocity grid to another, assuming that both grids are represented by vpa, vperp in normalised units, but have different normalisation factors defining the meaning of these grids in physical units.

      E.g. vpai, vperpi = ci * vpa, ci * vperp vpae, vperpe = ce * vpa, ce * vperp

      with ci = sqrt(Ti/mi), ce = sqrt(Te/mi)

      scalefac = ci / ce is the ratio of the two reference speeds

      source
      +fokker_planck_calculus · moment_kinetics

      fokker_planck_calculus

      moment_kinetics.fokker_planck_calculus.calculate_rosenbluth_integrals!Method

      Function to carry out the integration of the revelant distribution functions to form the required coefficients for the full-F operator. We assume that the weights are precalculated. The function takes as arguments the arrays of coefficients (which we fill), the required distributions, the precomputed weights, the indicies of the `field' velocities, and the sizes of the primed vpa and vperp coordinates arrays.

      source
      moment_kinetics.fokker_planck_calculus.get_global_compound_indexMethod
      get_global_compound_index(vpa,vperp,ielement_vpa,ielement_vperp,ivpa_local,ivperp_local)

      For local (within the single element specified by ielement_vpa and ielement_vperp) indices ivpa_local and ivperp_local, get the global index in the 'linear-indexed' 2d space of size (vperp.n, vpa.n) (as returned by ic_func).

      source
      moment_kinetics.fokker_planck_calculus.ic_funcMethod
      ic_func(ivpa::mk_int,ivperp::mk_int,nvpa::mk_int)

      Get the 'linear index' corresponding to ivpa and ivperp. Defined so that the linear index corresponds to the underlying layout in memory of a 2d array indexed by [ivpa,ivperp], i.e. for a 2d array f2d:

      • size(f2d) == (vpa.n, vperp.n)
      • For a reference to f2d that is reshaped to a vector (a 1d array) f1d = vec(f2d) than for any ivpa and ivperp it is true that f1d[ic_func(ivpa,ivperp)] == f2d[ivpa,ivperp].
      source
      moment_kinetics.fokker_planck_calculus.interpolate_2D_vspace!Method

      function to interpolate f(vpa,vperp) from one velocity grid to another, assuming that both grids are represented by vpa, vperp in normalised units, but have different normalisation factors defining the meaning of these grids in physical units.

      E.g. vpai, vperpi = ci * vpa, ci * vperp vpae, vperpe = ce * vpa, ce * vperp

      with ci = sqrt(Ti/mi), ce = sqrt(Te/mi)

      scalefac = ci / ce is the ratio of the two reference speeds

      source
      diff --git a/dev/zz_fokker_planck_test/index.html b/dev/zz_fokker_planck_test/index.html index 5f6a0920d9..fa8eba3add 100644 --- a/dev/zz_fokker_planck_test/index.html +++ b/dev/zz_fokker_planck_test/index.html @@ -1,2 +1,2 @@ -fokker_planck_test · moment_kinetics

      fokker_planck_test

      +fokker_planck_test · moment_kinetics

      fokker_planck_test

      diff --git a/dev/zz_force_balance/index.html b/dev/zz_force_balance/index.html index 112ef854e9..0dd8116deb 100644 --- a/dev/zz_force_balance/index.html +++ b/dev/zz_force_balance/index.html @@ -1,2 +1,2 @@ -force_balance · moment_kinetics
      +force_balance · moment_kinetics
      diff --git a/dev/zz_gauss_legendre/index.html b/dev/zz_gauss_legendre/index.html index 74dfd174fc..056efa30eb 100644 --- a/dev/zz_gauss_legendre/index.html +++ b/dev/zz_gauss_legendre/index.html @@ -1,2 +1,2 @@ -gauss_legendre · moment_kinetics

      gauss_legendre

      moment_kinetics.gauss_legendre.GaussLegendre_derivative_vector!Method

      Gauss-Legendre derivative at arbitrary x values, for boundary condition on radau points D0 – the vector xj – the x location where the derivative is evaluated ngrid – number of points in x x – the grid from -1, 1 Note that D0 is not scaled to the physical grid

      source
      moment_kinetics.gauss_legendre.gausslobattolegendre_differentiation_matrix!Method

      Formula for differentiation matrix taken from p196 of Chpt The Spectral Elemtent Method' ofComputational Seismology'. Heiner Igel First Edition. Published in 2017 by Oxford University Press. Or https://doc.nektar.info/tutorials/latest/fundamentals/differentiation/fundamentals-differentiationch2.html

      D – differentiation matrix x – Gauss-Legendre-Lobatto points in [-1,1] ngrid – number of points per element (incl. boundary points)

      Note that D has does not include a scaling factor

      source
      moment_kinetics.gauss_legendre.setup_global_strong_form_matrix!Method

      A function that assigns the local matrices to a global array QQ_global for later evaluating strong form of required 1D equation.

      The 'option' variable is a flag for choosing the type of matrix to be constructed. Currently the function is set up to assemble the elemental matrices without imposing boundary conditions on the first and final rows of the matrix. This means that the operators constructed from this function can only be used for differentiation, and not solving 1D ODEs. The shared points in the element assembly are averaged (instead of simply added) to be consistent with the derivativeelementstofullgrid!() function in calculus.jl.

      source
      moment_kinetics.gauss_legendre.setup_global_weak_form_matrix!Method

      A function that assigns the local weak-form matrices to a global array QQ_global for later solving weak form of required 1D equation.

      The 'option' variable is a flag for choosing the type of matrix to be constructed. Currently the function is set up to assemble the elemental matrices without imposing boundary conditions on the first and final rows of the matrix by default. This means that the operators constructed from this function can only be used for differentiation, and not solving 1D ODEs. This assembly function assumes that the coordinate is not distributed. To extend this function to support distributed-memory MPI, addition of off-memory matrix elements to the exterior points would be required.

      The typical use of this function is to assemble matrixes M and K in

      M * d2f = K * f

      where M is the mass matrix and K is the stiffness matrix, and we wish to solve for d2f given f. To solve 1D ODEs

      K * f = b = M * d2f

      for f given boundary data on f with periodic or dirichlet boundary conditions, set

      periodic_bc = true, b[end] = 0

      or

      dirichlet_bc = true, b[1] = f[1] (except for cylindrical coordinates), b[end] = f[end]

      in the function call, and create new matrices for this purpose in the gausslegendre_info struct. Currently the Laplacian matrix is supported with boundary conditions.

      source
      +gauss_legendre · moment_kinetics

      gauss_legendre

      moment_kinetics.gauss_legendre.GaussLegendre_derivative_vector!Method

      Gauss-Legendre derivative at arbitrary x values, for boundary condition on radau points D0 – the vector xj – the x location where the derivative is evaluated ngrid – number of points in x x – the grid from -1, 1 Note that D0 is not scaled to the physical grid

      source
      moment_kinetics.gauss_legendre.gausslobattolegendre_differentiation_matrix!Method

      Formula for differentiation matrix taken from p196 of Chpt The Spectral Elemtent Method' ofComputational Seismology'. Heiner Igel First Edition. Published in 2017 by Oxford University Press. Or https://doc.nektar.info/tutorials/latest/fundamentals/differentiation/fundamentals-differentiationch2.html

      D – differentiation matrix x – Gauss-Legendre-Lobatto points in [-1,1] ngrid – number of points per element (incl. boundary points)

      Note that D has does not include a scaling factor

      source
      moment_kinetics.gauss_legendre.setup_global_weak_form_matrix!Method

      A function that assigns the local weak-form matrices to a global array QQ_global for later solving weak form of required 1D equation.

      The 'option' variable is a flag for choosing the type of matrix to be constructed. Currently the function is set up to assemble the elemental matrices without imposing boundary conditions on the first and final rows of the matrix by default. This means that the operators constructed from this function can only be used for differentiation, and not solving 1D ODEs. This assembly function assumes that the coordinate is not distributed. To extend this function to support distributed-memory MPI, addition of off-memory matrix elements to the exterior points would be required.

      The typical use of this function is to assemble matrixes M and K in

      M * d2f = K * f

      where M is the mass matrix and K is the stiffness matrix, and we wish to solve for d2f given f. To solve 1D ODEs

      K * f = b = M * d2f

      for f given boundary data on f with periodic or dirichlet boundary conditions, set

      periodic_bc = true, b[end] = 0

      or

      dirichlet_bc = true, b[1] = f[1] (except for cylindrical coordinates), b[end] = f[end]

      in the function call, and create new matrices for this purpose in the gausslegendre_info struct. Currently the Laplacian matrix is supported with boundary conditions.

      source
      diff --git a/dev/zz_geo/index.html b/dev/zz_geo/index.html index 0bbe5cdcba..a3ff0c77fd 100644 --- a/dev/zz_geo/index.html +++ b/dev/zz_geo/index.html @@ -1,2 +1,2 @@ -geo · moment_kinetics

      geo

      moment_kinetics.geoModule

      module for including axisymmetric geometry in coordinates (z,r), with z the vertical coordinate and r the radial coordinate

      source
      moment_kinetics.geo.geometric_coefficientsType

      struct containing the geometric data necessary for non-trivial axisymmetric geometries, to be passed around the inside of the code, replacing the geometry_input struct from input_structs.jl

      The arrays of 2 dimensions are functions of (z,r)

      source
      +geo · moment_kinetics

      geo

      moment_kinetics.geoModule

      module for including axisymmetric geometry in coordinates (z,r), with z the vertical coordinate and r the radial coordinate

      source
      moment_kinetics.geo.geometric_coefficientsType

      struct containing the geometric data necessary for non-trivial axisymmetric geometries, to be passed around the inside of the code, replacing the geometry_input struct from input_structs.jl

      The arrays of 2 dimensions are functions of (z,r)

      source
      diff --git a/dev/zz_gyroaverages/index.html b/dev/zz_gyroaverages/index.html index 415924262e..a56cb58dbd 100644 --- a/dev/zz_gyroaverages/index.html +++ b/dev/zz_gyroaverages/index.html @@ -1,2 +1,2 @@ -gyroaverages · moment_kinetics

      gyroaverages

      moment_kinetics.gyroaverages.elementlist!Method

      for a given list of coordinate values, determine in which elements they are found -1 indicates that the required element would be outside of the existing grid

      – assume here that the coordinates are fully local in memory

      source
      +gyroaverages · moment_kinetics

      gyroaverages

      moment_kinetics.gyroaverages.elementlist!Method

      for a given list of coordinate values, determine in which elements they are found -1 indicates that the required element would be outside of the existing grid

      – assume here that the coordinates are fully local in memory

      source
      diff --git a/dev/zz_initial_conditions/index.html b/dev/zz_initial_conditions/index.html index 0e0df2247f..9fe0085f03 100644 --- a/dev/zz_initial_conditions/index.html +++ b/dev/zz_initial_conditions/index.html @@ -1,2 +1,2 @@ -initial_conditions · moment_kinetics

      initial_conditions

      moment_kinetics.initial_conditions.convert_full_f_ion_to_normalised!Method

      Take the full ion distribution function, calculate the moments, then normalise and shift to the moment-kinetic grid.

      Uses input value of f and modifies in place to the normalised distribution functions. Input density, upar, ppar, and vth are not used, the values are overwritten with the moments of f.

      Inputs/outputs depend on z, vperp, and vpa (should be inside loops over species, r)

      source
      moment_kinetics.initial_conditions.convert_full_f_neutral_to_normalised!Method

      Take the full neutral-particle distribution function, calculate the moments, then normalise and shift to the moment-kinetic grid.

      Uses input value of f and modifies in place to the normalised distribution functions. Input density, upar, ppar, and vth are not used, the values are overwritten with the moments of f.

      Inputs/outputs depend on z, vzeta, vr and vz (should be inside loops over species, r)

      source
      moment_kinetics.initial_conditions.init_electron_pdf_over_density_and_boundary_phi!Method

      initelectronpdfoverdensityandboundaryphi initialises the normalised electron pdf = pdfe * vthe / dense and the boundary values of the electrostatic potential phi; care is taken to ensure that the parallel boundary condition is satisfied; NB: as the electron pdf is obtained via a time-independent equation, this 'initital' value for the electron will just be the first guess in an iterative solution

      source
      +initial_conditions · moment_kinetics

      initial_conditions

      moment_kinetics.initial_conditions.convert_full_f_ion_to_normalised!Method

      Take the full ion distribution function, calculate the moments, then normalise and shift to the moment-kinetic grid.

      Uses input value of f and modifies in place to the normalised distribution functions. Input density, upar, ppar, and vth are not used, the values are overwritten with the moments of f.

      Inputs/outputs depend on z, vperp, and vpa (should be inside loops over species, r)

      source
      moment_kinetics.initial_conditions.convert_full_f_neutral_to_normalised!Method

      Take the full neutral-particle distribution function, calculate the moments, then normalise and shift to the moment-kinetic grid.

      Uses input value of f and modifies in place to the normalised distribution functions. Input density, upar, ppar, and vth are not used, the values are overwritten with the moments of f.

      Inputs/outputs depend on z, vzeta, vr and vz (should be inside loops over species, r)

      source
      moment_kinetics.initial_conditions.init_electron_pdf_over_density_and_boundary_phi!Method

      initelectronpdfoverdensityandboundaryphi initialises the normalised electron pdf = pdfe * vthe / dense and the boundary values of the electrostatic potential phi; care is taken to ensure that the parallel boundary condition is satisfied; NB: as the electron pdf is obtained via a time-independent equation, this 'initital' value for the electron will just be the first guess in an iterative solution

      source
      diff --git a/dev/zz_input_structs/index.html b/dev/zz_input_structs/index.html index b0a36d5576..fd4d4bf871 100644 --- a/dev/zz_input_structs/index.html +++ b/dev/zz_input_structs/index.html @@ -1,3 +1,3 @@ -input_structs · moment_kinetics

      input_structs

      moment_kinetics.input_structs.ion_source_dataType

      Source profile structs for ions and electrons which allows them to have any number of different sources (from wall perhaps, superposition of core sources, etc.). These sources are then contained in a vector of structs.

      Since the ion source must be the same as the electron source in all respects (apart from possibly a different electron temperature or source strength), the electron vector of source profile structs will be a kind of mirror of the ion vector of structs.

      source
      moment_kinetics.input_structs.time_infoType

      t_error_sum is included so that a type which might be mkfloat or Float128 can be set by an option but known at compile time when a `timeinfo` struct is passed as a function argument.

      source
      Base.getMethod

      Utility method for converting a string to an Enum when getting from a Dict, based on the type of the default value

      source
      moment_kinetics.input_structs.options_to_TOMLMethod
      options_to_toml(io::IO [=stdout], data::AbstractDict; sorted=false, by=identity)

      Convert moment_kinetics 'options' (in the form of a Dict) to TOML format.

      This function is defined so that we can handle some extra types, for example Enum.

      For descriptions of the arguments, see TOML.print.

      source
      moment_kinetics.input_structs.set_defaults_and_check_section!Function
      set_defaults_and_check_section!(options::AbstractDict, struct_type::Type,
      -                                name::Union{String,Nothing}=nothing)

      Alternative form to be used when the options should be stored in a struct of type struct_type rather than a NamedTuple. struct_type must be defined using @kwdef.

      The returned instance of struct_type is immutable, so if you need to modify the settings

      • e.g. to apply some logic to set defaults depending on other settings/parameters - then

      you should use the 'standard' version of set_defaults_and_check_section! that returns a Dict that can be modified, and then use that Dict to initialise the struct_type.

      The name of the section in the options that will be read defaults to the name of struct_type, but can be set using the section_name argument.

      Returns an instance of struct_type.

      source
      moment_kinetics.input_structs.set_defaults_and_check_top_level!Method

      Set the defaults for options in the top level of the input, and check that there are not any unexpected options (i.e. options that have no default).

      Modifies the options[section_name]::Dict by adding defaults for any values that are not already present.

      Ignores any sections, as these will be checked separately.

      source
      +input_structs · moment_kinetics

      input_structs

      moment_kinetics.input_structs.ion_source_dataType

      Source profile structs for ions and electrons which allows them to have any number of different sources (from wall perhaps, superposition of core sources, etc.). These sources are then contained in a vector of structs.

      Since the ion source must be the same as the electron source in all respects (apart from possibly a different electron temperature or source strength), the electron vector of source profile structs will be a kind of mirror of the ion vector of structs.

      source
      moment_kinetics.input_structs.time_infoType

      t_error_sum is included so that a type which might be mkfloat or Float128 can be set by an option but known at compile time when a `timeinfo` struct is passed as a function argument.

      source
      Base.getMethod

      Utility method for converting a string to an Enum when getting from a Dict, based on the type of the default value

      source
      moment_kinetics.input_structs.options_to_TOMLMethod
      options_to_toml(io::IO [=stdout], data::AbstractDict; sorted=false, by=identity)

      Convert moment_kinetics 'options' (in the form of a Dict) to TOML format.

      This function is defined so that we can handle some extra types, for example Enum.

      For descriptions of the arguments, see TOML.print.

      source
      moment_kinetics.input_structs.set_defaults_and_check_section!Function
      set_defaults_and_check_section!(options::AbstractDict, struct_type::Type,
      +                                name::Union{String,Nothing}=nothing)

      Alternative form to be used when the options should be stored in a struct of type struct_type rather than a NamedTuple. struct_type must be defined using @kwdef.

      The returned instance of struct_type is immutable, so if you need to modify the settings

      • e.g. to apply some logic to set defaults depending on other settings/parameters - then

      you should use the 'standard' version of set_defaults_and_check_section! that returns a Dict that can be modified, and then use that Dict to initialise the struct_type.

      The name of the section in the options that will be read defaults to the name of struct_type, but can be set using the section_name argument.

      Returns an instance of struct_type.

      source
      moment_kinetics.input_structs.set_defaults_and_check_top_level!Method

      Set the defaults for options in the top level of the input, and check that there are not any unexpected options (i.e. options that have no default).

      Modifies the options[section_name]::Dict by adding defaults for any values that are not already present.

      Ignores any sections, as these will be checked separately.

      source
      diff --git a/dev/zz_interpolation/index.html b/dev/zz_interpolation/index.html index e9d75b2772..dfadef0abe 100644 --- a/dev/zz_interpolation/index.html +++ b/dev/zz_interpolation/index.html @@ -1,2 +1,2 @@ -interpolation · moment_kinetics

      interpolation

      moment_kinetics.interpolation.interpolate_to_grid_1d!Function

      Interpolation from a regular grid to a 1d grid with arbitrary spacing

      Arguments

      result : Array{mkfloat, 1} Array to be overwritten with the result of the interpolation newgrid : Array{mkfloat, 1} Grid of points to interpolate coord to f : Array{mkfloat} Field to be interpolated coord : coordinate coordinate struct giving the coordinate along which f varies spectral : discretization_info struct containing information for discretization, whose type determines which method is used.

      source
      moment_kinetics.interpolation.interpolate_to_grid_1dMethod

      Interpolation from a regular grid to a 1d grid with arbitrary spacing

      This version allocates a new array for the result, which is returned.

      Arguments

      newgrid : Array{mkfloat, 1} Grid of points to interpolate coord to f : Array{mkfloat} Field to be interpolated coord : coordinate coordinate struct giving the coordinate along which f varies spectral : Bool or chebyshevinfo struct containing information for discretization, whose type determines which method is used.

      Returns

      result : Array Array with the values of f interpolated to the points in new_grid.

      source
      moment_kinetics.interpolation.single_element_interpolate!Function
      single_element_interpolate!(result, newgrid, f, imin, imax, coord, spectral)

      Interpolation within a single element.

      f is an array with the values of the input variable in the element to be interpolated. imin and imax give the start and end points of the element in the grid (used to calculate shift and scale factors to a normalised grid).

      newgrid gives the points within the element where output is required. result is filled with the interpolated values at those points.

      coord is the coordinate struct for the dimension along which interpolation is being done. spectral is the corresponding discretization_info.

      source
      +interpolation · moment_kinetics

      interpolation

      moment_kinetics.interpolation.interpolate_to_grid_1d!Function

      Interpolation from a regular grid to a 1d grid with arbitrary spacing

      Arguments

      result : Array{mkfloat, 1} Array to be overwritten with the result of the interpolation newgrid : Array{mkfloat, 1} Grid of points to interpolate coord to f : Array{mkfloat} Field to be interpolated coord : coordinate coordinate struct giving the coordinate along which f varies spectral : discretization_info struct containing information for discretization, whose type determines which method is used.

      source
      moment_kinetics.interpolation.interpolate_to_grid_1dMethod

      Interpolation from a regular grid to a 1d grid with arbitrary spacing

      This version allocates a new array for the result, which is returned.

      Arguments

      newgrid : Array{mkfloat, 1} Grid of points to interpolate coord to f : Array{mkfloat} Field to be interpolated coord : coordinate coordinate struct giving the coordinate along which f varies spectral : Bool or chebyshevinfo struct containing information for discretization, whose type determines which method is used.

      Returns

      result : Array Array with the values of f interpolated to the points in new_grid.

      source
      moment_kinetics.interpolation.single_element_interpolate!Function
      single_element_interpolate!(result, newgrid, f, imin, imax, coord, spectral)

      Interpolation within a single element.

      f is an array with the values of the input variable in the element to be interpolated. imin and imax give the start and end points of the element in the grid (used to calculate shift and scale factors to a normalised grid).

      newgrid gives the points within the element where output is required. result is filled with the interpolated values at those points.

      coord is the coordinate struct for the dimension along which interpolation is being done. spectral is the corresponding discretization_info.

      source
      diff --git a/dev/zz_ionization/index.html b/dev/zz_ionization/index.html index 953269366e..f3df62a142 100644 --- a/dev/zz_ionization/index.html +++ b/dev/zz_ionization/index.html @@ -1,2 +1,2 @@ -ionization · moment_kinetics
      +ionization · moment_kinetics
      diff --git a/dev/zz_krook_collisions/index.html b/dev/zz_krook_collisions/index.html index e61dee0f71..4e9740e785 100644 --- a/dev/zz_krook_collisions/index.html +++ b/dev/zz_krook_collisions/index.html @@ -1,2 +1,2 @@ -krook_collisions · moment_kinetics

      krook_collisions

      moment_kinetics.krook_collisions.get_collision_frequency_eeMethod
      get_collision_frequency_ee(collisions, n, vthe)

      Calculate the electron-electron collision frequency, depending on the settings/parameters in collisions, for the given density n and electron thermal speed vthe.

      n and vthe may be scalars or arrays, but should have shapes that can be broadcasted together.

      source
      moment_kinetics.krook_collisions.get_collision_frequency_eiMethod
      get_collision_frequency_ei(collisions, n, vthe)

      Calculate the electron-electron collision frequency, depending on the settings/parameters in collisions, for the given density n and electron thermal speed vthe.

      n and vthe may be scalars or arrays, but should have shapes that can be broadcasted together.

      source
      moment_kinetics.krook_collisions.get_collision_frequency_iiMethod
      get_collision_frequency_ii(collisions, n, vth)

      Calculate the ion-ion collision frequency, depending on the settings/parameters in collisions, for the given density n and thermal speed vth.

      n and vth may be scalars or arrays, but should have shapes that can be broadcasted together.

      source
      +krook_collisions · moment_kinetics

      krook_collisions

      moment_kinetics.krook_collisions.get_collision_frequency_eeMethod
      get_collision_frequency_ee(collisions, n, vthe)

      Calculate the electron-electron collision frequency, depending on the settings/parameters in collisions, for the given density n and electron thermal speed vthe.

      n and vthe may be scalars or arrays, but should have shapes that can be broadcasted together.

      source
      moment_kinetics.krook_collisions.get_collision_frequency_eiMethod
      get_collision_frequency_ei(collisions, n, vthe)

      Calculate the electron-electron collision frequency, depending on the settings/parameters in collisions, for the given density n and electron thermal speed vthe.

      n and vthe may be scalars or arrays, but should have shapes that can be broadcasted together.

      source
      moment_kinetics.krook_collisions.get_collision_frequency_iiMethod
      get_collision_frequency_ii(collisions, n, vth)

      Calculate the ion-ion collision frequency, depending on the settings/parameters in collisions, for the given density n and thermal speed vth.

      n and vth may be scalars or arrays, but should have shapes that can be broadcasted together.

      source
      diff --git a/dev/zz_lagrange_polynomials/index.html b/dev/zz_lagrange_polynomials/index.html index 5814a67fa9..7c0db87df9 100644 --- a/dev/zz_lagrange_polynomials/index.html +++ b/dev/zz_lagrange_polynomials/index.html @@ -1,2 +1,2 @@ -lagrange_polynomials · moment_kinetics

      lagrange_polynomials

      moment_kinetics.lagrange_polynomialsModule

      Lagrange polynomials can be useful for finite element methods on any set of basis points, as they give a representation of the interpolating function within an element whose coefficients are just the function values at the grid points.

      This module collects some functions related to the use of Lagrange polynomials, to avoid their being scattered (and possibly duplicated) in other modules.

      source
      moment_kinetics.lagrange_polynomials.lagrange_poly_optimisedMethod
      lagrange_poly_optimised(other_nodes, one_over_denominator, x)

      Optimised version of Lagrange polynomial calculation, making use of pre-calculated quantities.

      other_nodes is a vector of the grid points in this element where this Lagrange polynomial is zero (the other nodes than the one where it is 1).

      one_over_denominator is 1/prod(x0 - n for n ∈ other_nodes) where x0 is the grid point where this Lagrange polynomial is 1.

      x is the point to evaluate the Lagrange polynomial at.

      source
      +lagrange_polynomials · moment_kinetics

      lagrange_polynomials

      moment_kinetics.lagrange_polynomialsModule

      Lagrange polynomials can be useful for finite element methods on any set of basis points, as they give a representation of the interpolating function within an element whose coefficients are just the function values at the grid points.

      This module collects some functions related to the use of Lagrange polynomials, to avoid their being scattered (and possibly duplicated) in other modules.

      source
      moment_kinetics.lagrange_polynomials.lagrange_poly_optimisedMethod
      lagrange_poly_optimised(other_nodes, one_over_denominator, x)

      Optimised version of Lagrange polynomial calculation, making use of pre-calculated quantities.

      other_nodes is a vector of the grid points in this element where this Lagrange polynomial is zero (the other nodes than the one where it is 1).

      one_over_denominator is 1/prod(x0 - n for n ∈ other_nodes) where x0 is the grid point where this Lagrange polynomial is 1.

      x is the point to evaluate the Lagrange polynomial at.

      source
      diff --git a/dev/zz_load_data/index.html b/dev/zz_load_data/index.html index e56bc9ac63..cb1d8e5b92 100644 --- a/dev/zz_load_data/index.html +++ b/dev/zz_load_data/index.html @@ -1,9 +1,9 @@ -load_data · moment_kinetics

      load_data

      moment_kinetics.load_data.get_run_info_no_setupMethod
      get_run_info_no_setup(run_dir...; itime_min=1, itime_max=0, itime_skip=1, dfns=false,
      +load_data · moment_kinetics

      load_data

      moment_kinetics.load_data.get_run_info_no_setupMethod
      get_run_info_no_setup(run_dir...; itime_min=1, itime_max=0, itime_skip=1, dfns=false,
                             initial_electron=false)
       get_run_info_no_setup((run_dir, restart_index)...; itime_min=1, itime_max=0,
      -                      itime_skip=1, dfns=false, initial_electron=false)

      Get file handles and other info for a single run

      run_dir is either the directory to read output from (whose name should be the run_name), or a momentkinetics binary output file. If a file is passed, it is only used to infer the directory and `runname, so it is possible for example to pass a.moments.h5output file and alsodfns=trueand the.dfns.h5` file will be the one actually opened (as long as it exists).

      restart_index can be given by passing a Tuple, e.g. ("runs/example", 42) as the positional argument. It specifies which restart to read if there are multiple restarts. If no restart_index is given or if nothing is passed, read all restarts and concatenate them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index).

      Several runs can be loaded at the same time by passing multiple positional arguments. Each argument can be a String run_dir giving a directory to read output from or a Tuple (run_dir, restart_index) giving both a directory and a restart index (it is allowed to mix Strings and Tuples in a call).

      By default load data from moments files, pass dfns=true to load from distribution functions files, or initial_electron=true and dfns=true to load from initial electron state files.

      The itime_min, itime_max and itime_skip options can be used to select only a slice of time points when loading data. In makie_post_process these options are read from the input (if they are set) before get_run_info_no_setup() is called, so that the run_info returned can be passed to makie_post_processing.setup_makie_post_processing_input!(), to be used for defaults for the remaining options. If either itime_min or itime_max are ≤0, their values are used as offsets from the final time index of the run.

      source
      moment_kinetics.load_data.get_variableFunction
      get_variable(run_info::Tuple, variable_name; kwargs...)
      -get_variable(run_info, variable_name; kwargs...)

      Get an array (or Tuple of arrays, if run_info is a Tuple) of the data for variable_name from run_info.

      Some derived variables need to be calculated from the saved output, not just loaded from file (with postproc_load_variable). This function takes care of that calculation, and handles the case where run_info is a Tuple (which postproc_load_data does not handle).

      kwargs... are passed through to postproc_load_variable().

      source
      moment_kinetics.load_data.get_z_derivativeMethod
      get_z_derivative(run_info, variable_name; kwargs...)

      Get (i.e. load or calculate) variable_name from run_info and calculate its z-derivative. Returns the z-derivative

      kwargs... are passed through to get_variable().

      source
      moment_kinetics.load_data.load_coordinate_dataMethod
      load_coordinate_data(fid, name; printout=false, irank=nothing, nrank=nothing,
      -                     run_directory=nothing, ignore_MPI=true)

      Load data for the coordinate name from a file-handle fid.

      Returns (coord, spectral, chunk_size). coord is a coordinate object. spectral is the object used to implement the discretization in this coordinate. chunk_size is the size of chunks in this coordinate that was used when writing to the output file.

      If printout is set to true a message will be printed when this function is called.

      If irank and nrank are passed, then the coord and spectral objects returned will be set up for the parallelisation specified by irank and nrank, rather than the one implied by the output file.

      Unless ignore_MPI=false is passed, the returned coordinates will be created without shared memory scratch arrays (ignore_MPI=true will be passed through to define_coordinate).

      source
      moment_kinetics.load_data.load_distributed_electron_pdf_sliceMethod

      Read a slice of an electron distribution function

      run_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.

      The slice to take is specified by the keyword arguments.

      source
      moment_kinetics.load_data.load_distributed_ion_pdf_sliceMethod

      Read a slice of an ion distribution function

      run_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.

      The slice to take is specified by the keyword arguments.

      source
      moment_kinetics.load_data.load_distributed_neutral_pdf_sliceMethod

      Read a slice of a neutral distribution function

      run_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.

      The slice to take is specified by the keyword arguments.

      source
      moment_kinetics.load_data.postproc_load_variableMethod
      postproc_load_variable(run_info, variable_name; it=nothing, is=nothing,
      +                      itime_skip=1, dfns=false, initial_electron=false)

      Get file handles and other info for a single run

      run_dir is either the directory to read output from (whose name should be the run_name), or a momentkinetics binary output file. If a file is passed, it is only used to infer the directory and `runname, so it is possible for example to pass a.moments.h5output file and alsodfns=trueand the.dfns.h5` file will be the one actually opened (as long as it exists).

      restart_index can be given by passing a Tuple, e.g. ("runs/example", 42) as the positional argument. It specifies which restart to read if there are multiple restarts. If no restart_index is given or if nothing is passed, read all restarts and concatenate them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index).

      Several runs can be loaded at the same time by passing multiple positional arguments. Each argument can be a String run_dir giving a directory to read output from or a Tuple (run_dir, restart_index) giving both a directory and a restart index (it is allowed to mix Strings and Tuples in a call).

      By default load data from moments files, pass dfns=true to load from distribution functions files, or initial_electron=true and dfns=true to load from initial electron state files.

      The itime_min, itime_max and itime_skip options can be used to select only a slice of time points when loading data. In makie_post_process these options are read from the input (if they are set) before get_run_info_no_setup() is called, so that the run_info returned can be passed to makie_post_processing.setup_makie_post_processing_input!(), to be used for defaults for the remaining options. If either itime_min or itime_max are ≤0, their values are used as offsets from the final time index of the run.

      source
      moment_kinetics.load_data.get_variableFunction
      get_variable(run_info::Tuple, variable_name; kwargs...)
      +get_variable(run_info, variable_name; kwargs...)

      Get an array (or Tuple of arrays, if run_info is a Tuple) of the data for variable_name from run_info.

      Some derived variables need to be calculated from the saved output, not just loaded from file (with postproc_load_variable). This function takes care of that calculation, and handles the case where run_info is a Tuple (which postproc_load_data does not handle).

      kwargs... are passed through to postproc_load_variable().

      source
      moment_kinetics.load_data.get_z_derivativeMethod
      get_z_derivative(run_info, variable_name; kwargs...)

      Get (i.e. load or calculate) variable_name from run_info and calculate its z-derivative. Returns the z-derivative

      kwargs... are passed through to get_variable().

      source
      moment_kinetics.load_data.load_coordinate_dataMethod
      load_coordinate_data(fid, name; printout=false, irank=nothing, nrank=nothing,
      +                     run_directory=nothing, ignore_MPI=true)

      Load data for the coordinate name from a file-handle fid.

      Returns (coord, spectral, chunk_size). coord is a coordinate object. spectral is the object used to implement the discretization in this coordinate. chunk_size is the size of chunks in this coordinate that was used when writing to the output file.

      If printout is set to true a message will be printed when this function is called.

      If irank and nrank are passed, then the coord and spectral objects returned will be set up for the parallelisation specified by irank and nrank, rather than the one implied by the output file.

      Unless ignore_MPI=false is passed, the returned coordinates will be created without shared memory scratch arrays (ignore_MPI=true will be passed through to define_coordinate).

      source
      moment_kinetics.load_data.load_distributed_electron_pdf_sliceMethod

      Read a slice of an electron distribution function

      run_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.

      The slice to take is specified by the keyword arguments.

      source
      moment_kinetics.load_data.load_distributed_ion_pdf_sliceMethod

      Read a slice of an ion distribution function

      run_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.

      The slice to take is specified by the keyword arguments.

      source
      moment_kinetics.load_data.load_distributed_neutral_pdf_sliceMethod

      Read a slice of a neutral distribution function

      run_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.

      The slice to take is specified by the keyword arguments.

      source
      moment_kinetics.load_data.postproc_load_variableMethod
      postproc_load_variable(run_info, variable_name; it=nothing, is=nothing,
                              ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,
      -                       ivzeta=nothing, ivr=nothing, ivz=nothing)

      Load a variable

      run_info is the information about a run returned by makie_post_processing.get_run_info().

      variable_name is the name of the variable to load.

      The keyword arguments it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be set to an integer or a range (e.g. 3:8 or 3:2:8) to select subsets of the data. Only the data for the subset requested will be loaded from the output file (mostly - when loading fields or moments from runs which used parallel_io = false, the full array will be loaded and then sliced).

      source
      moment_kinetics.load_data.read_Dict_from_sectionMethod
      read_Dict_from_section(file_or_group, section_name; ignore_subsections=false)

      Read information from section_name in file_or_group, returning a Dict.

      By default, any subsections are included as nested Dicts. If ignore_subsections=true they are ignored.

      source
      moment_kinetics.load_data.read_distributed_zr_data!Method

      Read data which is a function of (z,r,t) or (z,r,species,t)

      run_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.

      source
      + ivzeta=nothing, ivr=nothing, ivz=nothing)

      Load a variable

      run_info is the information about a run returned by makie_post_processing.get_run_info().

      variable_name is the name of the variable to load.

      The keyword arguments it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be set to an integer or a range (e.g. 3:8 or 3:2:8) to select subsets of the data. Only the data for the subset requested will be loaded from the output file (mostly - when loading fields or moments from runs which used parallel_io = false, the full array will be loaded and then sliced).

      source
      moment_kinetics.load_data.read_Dict_from_sectionMethod
      read_Dict_from_section(file_or_group, section_name; ignore_subsections=false)

      Read information from section_name in file_or_group, returning a Dict.

      By default, any subsections are included as nested Dicts. If ignore_subsections=true they are ignored.

      source
      moment_kinetics.load_data.read_distributed_zr_data!Method

      Read data which is a function of (z,r,t) or (z,r,species,t)

      run_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.

      source
      diff --git a/dev/zz_looping/index.html b/dev/zz_looping/index.html index ee4f6b8e7b..3f743c9dce 100644 --- a/dev/zz_looping/index.html +++ b/dev/zz_looping/index.html @@ -1,2 +1,2 @@ -looping · moment_kinetics

      looping

      moment_kinetics.looping.LoopRangesType

      LoopRanges structs contain information on which points should be included on this process in loops over shared-memory arrays.

      Members

      paralleldims::Tuple{Vararg{Symbol}} Indicates which dimensions are (or might be) parallelized when using this LoopRanges. Provided for information for developers, to make it easier to tell (when using a Debugger, or printing debug informatino) which LoopRanges instance is active in looping.loopranges at any point in the code. rank0::Bool Is this process the one with rank 0 in the 'block' which work in parallel on shared memory arrays. <d>::UnitRange{mkint} Loop ranges for each dimension <d> in looping.alldimensions.

      source
      moment_kinetics.looping.begin_anyv_regionMethod

      Begin 'anyv' sub-region in which () velocity space dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_anyv_vpa_regionMethod

      Begin 'anyv' sub-region in which (:vpa,) velocity space dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_anyv_vperp_regionMethod

      Begin 'anyv' sub-region in which (:vperp,) velocity space dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_anyv_vperp_vpa_regionMethod

      Begin 'anyv' sub-region in which (:vperp, :vpa) velocity space dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_regionMethod

      Begin region in which (:r,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vpa_regionMethod

      Begin region in which (:r, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vperp_regionMethod

      Begin region in which (:r, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vperp_vpa_regionMethod

      Begin region in which (:r, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vr_regionMethod

      Begin region in which (:r, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vr_vz_regionMethod

      Begin region in which (:r, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vz_regionMethod

      Begin region in which (:r, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vzeta_regionMethod

      Begin region in which (:r, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vzeta_vr_regionMethod

      Begin region in which (:r, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vzeta_vr_vz_regionMethod

      Begin region in which (:r, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vzeta_vz_regionMethod

      Begin region in which (:r, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_regionMethod

      Begin region in which (:r, :z) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vpa_regionMethod

      Begin region in which (:r, :z, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vperp_regionMethod

      Begin region in which (:r, :z, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vperp_vpa_regionMethod

      Begin region in which (:r, :z, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vr_regionMethod

      Begin region in which (:r, :z, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vr_vz_regionMethod

      Begin region in which (:r, :z, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vz_regionMethod

      Begin region in which (:r, :z, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vzeta_regionMethod

      Begin region in which (:r, :z, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vzeta_vr_regionMethod

      Begin region in which (:r, :z, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vzeta_vr_vz_regionMethod

      Begin region in which (:r, :z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vzeta_vz_regionMethod

      Begin region in which (:r, :z, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_regionMethod

      Begin region in which (:s, :r) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_vpa_regionMethod

      Begin region in which (:s, :r, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_vperp_regionMethod

      Begin region in which (:s, :r, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_vperp_vpa_regionMethod

      Begin region in which (:s, :r, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_z_anyv_regionMethod

      Begin region in which (:s,:r,:z) dimensions and velocity dimensions are parallelized by being split between processes, and which velocity dimensions are parallelized can be switched within the outer loop over (:s,:r,:z). This parallelization scheme is intended for use in the collision operator.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_z_regionMethod

      Begin region in which (:s, :r, :z) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_z_vpa_regionMethod

      Begin region in which (:s, :r, :z, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_z_vperp_regionMethod

      Begin region in which (:s, :r, :z, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_z_vperp_vpa_regionMethod

      Begin region in which (:s, :r, :z, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_regionMethod

      Begin region in which (:s,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_vpa_regionMethod

      Begin region in which (:s, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_vperp_regionMethod

      Begin region in which (:s, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_vperp_vpa_regionMethod

      Begin region in which (:s, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_z_regionMethod

      Begin region in which (:s, :z) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_z_vpa_regionMethod

      Begin region in which (:s, :z, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_z_vperp_regionMethod

      Begin region in which (:s, :z, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_z_vperp_vpa_regionMethod

      Begin region in which (:s, :z, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_serial_regionMethod

      Begin region in which only rank-0 in each group of processes operating on a shared-memory block operates on shared-memory arrays.

      Returns immediately if loopranges[] is already set for a serial region. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_regionMethod

      Begin region in which (:sn, :r) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vr_regionMethod

      Begin region in which (:sn, :r, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vr_vz_regionMethod

      Begin region in which (:sn, :r, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vz_regionMethod

      Begin region in which (:sn, :r, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vzeta_regionMethod

      Begin region in which (:sn, :r, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vzeta_vr_regionMethod

      Begin region in which (:sn, :r, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vzeta_vr_vz_regionMethod

      Begin region in which (:sn, :r, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vzeta_vz_regionMethod

      Begin region in which (:sn, :r, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_regionMethod

      Begin region in which (:sn, :r, :z) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vr_regionMethod

      Begin region in which (:sn, :r, :z, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vr_vz_regionMethod

      Begin region in which (:sn, :r, :z, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vz_regionMethod

      Begin region in which (:sn, :r, :z, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vzeta_regionMethod

      Begin region in which (:sn, :r, :z, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vzeta_vr_regionMethod

      Begin region in which (:sn, :r, :z, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vzeta_vr_vz_regionMethod

      Begin region in which (:sn, :r, :z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vzeta_vz_regionMethod

      Begin region in which (:sn, :r, :z, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_regionMethod

      Begin region in which (:sn,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vr_regionMethod

      Begin region in which (:sn, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vr_vz_regionMethod

      Begin region in which (:sn, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vz_regionMethod

      Begin region in which (:sn, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vzeta_regionMethod

      Begin region in which (:sn, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vzeta_vr_regionMethod

      Begin region in which (:sn, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vzeta_vr_vz_regionMethod

      Begin region in which (:sn, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vzeta_vz_regionMethod

      Begin region in which (:sn, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_regionMethod

      Begin region in which (:sn, :z) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vr_regionMethod

      Begin region in which (:sn, :z, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vr_vz_regionMethod

      Begin region in which (:sn, :z, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vz_regionMethod

      Begin region in which (:sn, :z, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vzeta_regionMethod

      Begin region in which (:sn, :z, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vzeta_vr_regionMethod

      Begin region in which (:sn, :z, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vzeta_vr_vz_regionMethod

      Begin region in which (:sn, :z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vzeta_vz_regionMethod

      Begin region in which (:sn, :z, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vpa_regionMethod

      Begin region in which (:vpa,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vperp_regionMethod

      Begin region in which (:vperp,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vperp_vpa_regionMethod

      Begin region in which (:vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vr_regionMethod

      Begin region in which (:vr,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vr_vz_regionMethod

      Begin region in which (:vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vz_regionMethod

      Begin region in which (:vz,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vzeta_regionMethod

      Begin region in which (:vzeta,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vzeta_vr_regionMethod

      Begin region in which (:vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vzeta_vr_vz_regionMethod

      Begin region in which (:vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vzeta_vz_regionMethod

      Begin region in which (:vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_regionMethod

      Begin region in which (:z,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vpa_regionMethod

      Begin region in which (:z, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vperp_regionMethod

      Begin region in which (:z, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vperp_vpa_regionMethod

      Begin region in which (:z, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vr_regionMethod

      Begin region in which (:z, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vr_vz_regionMethod

      Begin region in which (:z, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vz_regionMethod

      Begin region in which (:z, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vzeta_regionMethod

      Begin region in which (:z, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vzeta_vr_regionMethod

      Begin region in which (:z, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vzeta_vr_vz_regionMethod

      Begin region in which (:z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vzeta_vz_regionMethod

      Begin region in which (:z, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.debug_setup_loop_ranges_split_one_combination!Method

      For debugging the shared-memory parallelism, create ranges where only the loops for a single combinations of variables (given by combination_to_split) are parallelised, and which dimensions are parallelised can be set with the dims_to_split... arguments.

      Arguments

      Keyword arguments dim=n are required for each dim in all_dimensions where n is an integer giving the size of the dimension.

      source
      moment_kinetics.looping.get_best_anyv_splitMethod

      Find the numbers of processes for each dimension that optimize load balance for 'anyv' type loops for a certain block_size.

      The 'anyv' parallelisation patterns are designed for use in the collision operator. They all share the same parallelisation in species and spatial dimensions so that the region type can be switched between 'anyv' types within a loop over species and spatial dimensions (@loopsr_z). It is only defined for ions, not for neutrals.

      Parts of the collision operator cannot conveniently be parallelised over velocity dimensions, so this function aims to assign as much parallelism as possible to the species and spatial dimensions.

      source
      moment_kinetics.looping.get_max_workMethod

      Calculate the maximum number of grid points on any process

      This is a measure of the maximum amount of work to do on a single process. Minimising this will make the parallelisation as efficient as possible.

      Arguments

      nprocslist : Vector{mkint} Number of processes for each dimension sizes : Vector{mk_int} Size of each dimension

      source
      moment_kinetics.looping.setup_loop_ranges!Method

      Create ranges for loops with different combinations of variables

      Arguments

      Keyword arguments dim=n are required for each dim in [:s, :r, :z, :vperp, :vpa, :sn, :vzeta, :vr, :vz] where n is an integer giving the size of the dimension.

      source
      +looping · moment_kinetics

      looping

      moment_kinetics.looping.LoopRangesType

      LoopRanges structs contain information on which points should be included on this process in loops over shared-memory arrays.

      Members

      paralleldims::Tuple{Vararg{Symbol}} Indicates which dimensions are (or might be) parallelized when using this LoopRanges. Provided for information for developers, to make it easier to tell (when using a Debugger, or printing debug informatino) which LoopRanges instance is active in looping.loopranges at any point in the code. rank0::Bool Is this process the one with rank 0 in the 'block' which work in parallel on shared memory arrays. <d>::UnitRange{mkint} Loop ranges for each dimension <d> in looping.alldimensions.

      source
      moment_kinetics.looping.begin_anyv_regionMethod

      Begin 'anyv' sub-region in which () velocity space dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_anyv_vpa_regionMethod

      Begin 'anyv' sub-region in which (:vpa,) velocity space dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_anyv_vperp_regionMethod

      Begin 'anyv' sub-region in which (:vperp,) velocity space dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_anyv_vperp_vpa_regionMethod

      Begin 'anyv' sub-region in which (:vperp, :vpa) velocity space dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the beginanyv*region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _anyv_subblock_synchronize() to synchronize the processes operating on an 'anyv' shared-memory sub-block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_regionMethod

      Begin region in which (:r,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vpa_regionMethod

      Begin region in which (:r, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vperp_regionMethod

      Begin region in which (:r, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vperp_vpa_regionMethod

      Begin region in which (:r, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vr_regionMethod

      Begin region in which (:r, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vr_vz_regionMethod

      Begin region in which (:r, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vz_regionMethod

      Begin region in which (:r, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vzeta_regionMethod

      Begin region in which (:r, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vzeta_vr_regionMethod

      Begin region in which (:r, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vzeta_vr_vz_regionMethod

      Begin region in which (:r, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_vzeta_vz_regionMethod

      Begin region in which (:r, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_regionMethod

      Begin region in which (:r, :z) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vpa_regionMethod

      Begin region in which (:r, :z, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vperp_regionMethod

      Begin region in which (:r, :z, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vperp_vpa_regionMethod

      Begin region in which (:r, :z, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vr_regionMethod

      Begin region in which (:r, :z, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vr_vz_regionMethod

      Begin region in which (:r, :z, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vz_regionMethod

      Begin region in which (:r, :z, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vzeta_regionMethod

      Begin region in which (:r, :z, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vzeta_vr_regionMethod

      Begin region in which (:r, :z, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vzeta_vr_vz_regionMethod

      Begin region in which (:r, :z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_r_z_vzeta_vz_regionMethod

      Begin region in which (:r, :z, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_regionMethod

      Begin region in which (:s, :r) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_vpa_regionMethod

      Begin region in which (:s, :r, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_vperp_regionMethod

      Begin region in which (:s, :r, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_vperp_vpa_regionMethod

      Begin region in which (:s, :r, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_z_anyv_regionMethod

      Begin region in which (:s,:r,:z) dimensions and velocity dimensions are parallelized by being split between processes, and which velocity dimensions are parallelized can be switched within the outer loop over (:s,:r,:z). This parallelization scheme is intended for use in the collision operator.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_z_regionMethod

      Begin region in which (:s, :r, :z) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_z_vpa_regionMethod

      Begin region in which (:s, :r, :z, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_z_vperp_regionMethod

      Begin region in which (:s, :r, :z, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_r_z_vperp_vpa_regionMethod

      Begin region in which (:s, :r, :z, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_regionMethod

      Begin region in which (:s,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_vpa_regionMethod

      Begin region in which (:s, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_vperp_regionMethod

      Begin region in which (:s, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_vperp_vpa_regionMethod

      Begin region in which (:s, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_z_regionMethod

      Begin region in which (:s, :z) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_z_vpa_regionMethod

      Begin region in which (:s, :z, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_z_vperp_regionMethod

      Begin region in which (:s, :z, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_s_z_vperp_vpa_regionMethod

      Begin region in which (:s, :z, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_serial_regionMethod

      Begin region in which only rank-0 in each group of processes operating on a shared-memory block operates on shared-memory arrays.

      Returns immediately if loopranges[] is already set for a serial region. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_regionMethod

      Begin region in which (:sn, :r) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vr_regionMethod

      Begin region in which (:sn, :r, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vr_vz_regionMethod

      Begin region in which (:sn, :r, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vz_regionMethod

      Begin region in which (:sn, :r, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vzeta_regionMethod

      Begin region in which (:sn, :r, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vzeta_vr_regionMethod

      Begin region in which (:sn, :r, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vzeta_vr_vz_regionMethod

      Begin region in which (:sn, :r, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_vzeta_vz_regionMethod

      Begin region in which (:sn, :r, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_regionMethod

      Begin region in which (:sn, :r, :z) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vr_regionMethod

      Begin region in which (:sn, :r, :z, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vr_vz_regionMethod

      Begin region in which (:sn, :r, :z, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vz_regionMethod

      Begin region in which (:sn, :r, :z, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vzeta_regionMethod

      Begin region in which (:sn, :r, :z, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vzeta_vr_regionMethod

      Begin region in which (:sn, :r, :z, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vzeta_vr_vz_regionMethod

      Begin region in which (:sn, :r, :z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_r_z_vzeta_vz_regionMethod

      Begin region in which (:sn, :r, :z, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_regionMethod

      Begin region in which (:sn,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vr_regionMethod

      Begin region in which (:sn, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vr_vz_regionMethod

      Begin region in which (:sn, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vz_regionMethod

      Begin region in which (:sn, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vzeta_regionMethod

      Begin region in which (:sn, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vzeta_vr_regionMethod

      Begin region in which (:sn, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vzeta_vr_vz_regionMethod

      Begin region in which (:sn, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_vzeta_vz_regionMethod

      Begin region in which (:sn, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_regionMethod

      Begin region in which (:sn, :z) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vr_regionMethod

      Begin region in which (:sn, :z, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vr_vz_regionMethod

      Begin region in which (:sn, :z, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vz_regionMethod

      Begin region in which (:sn, :z, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vzeta_regionMethod

      Begin region in which (:sn, :z, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vzeta_vr_regionMethod

      Begin region in which (:sn, :z, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vzeta_vr_vz_regionMethod

      Begin region in which (:sn, :z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_sn_z_vzeta_vz_regionMethod

      Begin region in which (:sn, :z, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vpa_regionMethod

      Begin region in which (:vpa,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vperp_regionMethod

      Begin region in which (:vperp,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vperp_vpa_regionMethod

      Begin region in which (:vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vr_regionMethod

      Begin region in which (:vr,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vr_vz_regionMethod

      Begin region in which (:vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vz_regionMethod

      Begin region in which (:vz,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vzeta_regionMethod

      Begin region in which (:vzeta,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vzeta_vr_regionMethod

      Begin region in which (:vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vzeta_vr_vz_regionMethod

      Begin region in which (:vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_vzeta_vz_regionMethod

      Begin region in which (:vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_regionMethod

      Begin region in which (:z,) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vpa_regionMethod

      Begin region in which (:z, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vperp_regionMethod

      Begin region in which (:z, :vperp) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vperp_vpa_regionMethod

      Begin region in which (:z, :vperp, :vpa) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vr_regionMethod

      Begin region in which (:z, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vr_vz_regionMethod

      Begin region in which (:z, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vz_regionMethod

      Begin region in which (:z, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vzeta_regionMethod

      Begin region in which (:z, :vzeta) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vzeta_vr_regionMethod

      Begin region in which (:z, :vzeta, :vr) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vzeta_vr_vz_regionMethod

      Begin region in which (:z, :vzeta, :vr, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.begin_z_vzeta_vz_regionMethod

      Begin region in which (:z, :vzeta, :vz) dimensions are parallelized by being split between processes.

      Returns immediately if loopranges[] is already set to the parallel dimensions being requested. This allows the begin*_region() calls to be placed where they make logical sense, with no cost if a call happens to be repeated (e.g. in different functions).

      Calls _block_synchronize() to synchronize the processes operating on a shared-memory block, unless no_synchronize=true is passed as an argument.

      source
      moment_kinetics.looping.debug_setup_loop_ranges_split_one_combination!Method

      For debugging the shared-memory parallelism, create ranges where only the loops for a single combinations of variables (given by combination_to_split) are parallelised, and which dimensions are parallelised can be set with the dims_to_split... arguments.

      Arguments

      Keyword arguments dim=n are required for each dim in all_dimensions where n is an integer giving the size of the dimension.

      source
      moment_kinetics.looping.get_best_anyv_splitMethod

      Find the numbers of processes for each dimension that optimize load balance for 'anyv' type loops for a certain block_size.

      The 'anyv' parallelisation patterns are designed for use in the collision operator. They all share the same parallelisation in species and spatial dimensions so that the region type can be switched between 'anyv' types within a loop over species and spatial dimensions (@loopsr_z). It is only defined for ions, not for neutrals.

      Parts of the collision operator cannot conveniently be parallelised over velocity dimensions, so this function aims to assign as much parallelism as possible to the species and spatial dimensions.

      source
      moment_kinetics.looping.get_max_workMethod

      Calculate the maximum number of grid points on any process

      This is a measure of the maximum amount of work to do on a single process. Minimising this will make the parallelisation as efficient as possible.

      Arguments

      nprocslist : Vector{mkint} Number of processes for each dimension sizes : Vector{mk_int} Size of each dimension

      source
      moment_kinetics.looping.setup_loop_ranges!Method

      Create ranges for loops with different combinations of variables

      Arguments

      Keyword arguments dim=n are required for each dim in [:s, :r, :z, :vperp, :vpa, :sn, :vzeta, :vr, :vz] where n is an integer giving the size of the dimension.

      source
      diff --git a/dev/zz_makie_post_processing/index.html b/dev/zz_makie_post_processing/index.html index 4986bfe97b..b31a56ac3f 100644 --- a/dev/zz_makie_post_processing/index.html +++ b/dev/zz_makie_post_processing/index.html @@ -1,19 +1,19 @@ -makie_post_processing · moment_kinetics

      makie_post_processing

      makie_post_processing.makie_post_processingModule

      Post processing functions using Makie.jl

      Options are read by default from a file post_processing_input.toml, if it exists.

      The plots can be generated from the command line by running

      julia --project run_makie_post_processing.jl dir1 [dir2 [dir3 ...]]
      source
      makie_post_processing.input_dictConstant

      Global dict containing settings for makiepostprocessing. Can be re-loaded at any time to change settings.

      Is an OrderedDict so the order of sections is nicer if input_dict is written out as a TOML file.

      source
      makie_post_processing.input_dict_dfnsConstant

      Global dict containing settings for makiepostprocessing for files with distribution function output. Can be re-loaded at any time to change settings.

      Is an OrderedDict so the order of sections is nicer if input_dict_dfns is written out as a TOML file.

      source
      makie_post_processing.Chodura_condition_plotsFunction
      Chodura_condition_plots(run_info::Tuple; plot_prefix)
      -Chodura_condition_plots(run_info; plot_prefix=nothing, axes=nothing)

      Plot the criterion from the Chodura condition at the sheath boundaries.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots from the different runs are overlayed on the same axis, and heatmap plots are displayed in a horizontal row.

      Settings are read from the [Chodura_condition] section of the input.

      When run_info is a Tuple, plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf. When run_info is not a Tuple, plot_prefix is optional - plots will be saved only if it is passed.

      When run_info is not a Tuple, a Vector of Axis objects can be passed to axes, and each plot will be added to one of axes.

      source
      makie_post_processing._MMS_pdf_plotsMethod
      _MMS_pdf_plots(run_info, input, variable_name, plot_prefix, field_label,
      -               field_sym_label, norm_label, plot_dims, animate_dims)

      Utility function for making plots to avoid duplicated code in compare_ion_pdf_symbolic_test and compare_neutral_pdf_symbolic_test.

      The information for the run to analyse is passed in run_info (as returned by get_run_info).

      input is a NamedTuple of settings to use.

      variable_name is the name of the variable being plotted.

      plot_prefix gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      field_label is the label for the computed variable that will be used in plots/animations, field_sym_label is the label for the manufactured solution, and norm_label is the label for the error.

      plot_dims are the dimensions of the variable, and animate_dims are the same but omitting :t.

      source
      makie_post_processing.animate_1dMethod
      animate_1d(xcoord, data; frame_index=nothing, ax=nothing, fig=nothing,
      +makie_post_processing · moment_kinetics

      makie_post_processing

      makie_post_processing.makie_post_processingModule

      Post processing functions using Makie.jl

      Options are read by default from a file post_processing_input.toml, if it exists.

      The plots can be generated from the command line by running

      julia --project run_makie_post_processing.jl dir1 [dir2 [dir3 ...]]
      source
      makie_post_processing.input_dictConstant

      Global dict containing settings for makiepostprocessing. Can be re-loaded at any time to change settings.

      Is an OrderedDict so the order of sections is nicer if input_dict is written out as a TOML file.

      source
      makie_post_processing.input_dict_dfnsConstant

      Global dict containing settings for makiepostprocessing for files with distribution function output. Can be re-loaded at any time to change settings.

      Is an OrderedDict so the order of sections is nicer if input_dict_dfns is written out as a TOML file.

      source
      makie_post_processing.Chodura_condition_plotsFunction
      Chodura_condition_plots(run_info::Tuple; plot_prefix)
      +Chodura_condition_plots(run_info; plot_prefix=nothing, axes=nothing)

      Plot the criterion from the Chodura condition at the sheath boundaries.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots from the different runs are overlayed on the same axis, and heatmap plots are displayed in a horizontal row.

      Settings are read from the [Chodura_condition] section of the input.

      When run_info is a Tuple, plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf. When run_info is not a Tuple, plot_prefix is optional - plots will be saved only if it is passed.

      When run_info is not a Tuple, a Vector of Axis objects can be passed to axes, and each plot will be added to one of axes.

      source
      makie_post_processing._MMS_pdf_plotsMethod
      _MMS_pdf_plots(run_info, input, variable_name, plot_prefix, field_label,
      +               field_sym_label, norm_label, plot_dims, animate_dims)

      Utility function for making plots to avoid duplicated code in compare_ion_pdf_symbolic_test and compare_neutral_pdf_symbolic_test.

      The information for the run to analyse is passed in run_info (as returned by get_run_info).

      input is a NamedTuple of settings to use.

      variable_name is the name of the variable being plotted.

      plot_prefix gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      field_label is the label for the computed variable that will be used in plots/animations, field_sym_label is the label for the manufactured solution, and norm_label is the label for the error.

      plot_dims are the dimensions of the variable, and animate_dims are the same but omitting :t.

      source
      makie_post_processing.animate_1dMethod
      animate_1d(xcoord, data; frame_index=nothing, ax=nothing, fig=nothing,
                  xlabel=nothing, ylabel=nothing, title=nothing, yscale=nothing,
                  transform=identity, outfile=nothing, ylims=nothing,
      -           axis_args=Dict{Symbol,Any}(), kwargs...)

      Make a 1d animation of data vs xcoord.

      xlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      If ax is passed, the animation will be added to that existing Axis, otherwise a new Figure and Axis will be created. If ax is passed, you should also pass an Observable{mk_int} to frame_index so that the data for this animation can be updated when frame_index is changed.

      If outfile is passed the animation will be saved to a file with that name. The suffix determines the file type. If ax is passed at the same time as outfile then the Figure containing ax must also be passed (to the fig argument) so that the animation can be saved.

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Other kwargs are passed to Makie's lines!() function.

      If ax is not passed, returns the Figure, otherwise returns the object returned by lines!().

      source
      makie_post_processing.animate_2dMethod
      animate_2d(xcoord, ycoord, data; frame_index=nothing, ax=nothing, fig=nothing,
      +           axis_args=Dict{Symbol,Any}(), kwargs...)

      Make a 1d animation of data vs xcoord.

      xlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      If ax is passed, the animation will be added to that existing Axis, otherwise a new Figure and Axis will be created. If ax is passed, you should also pass an Observable{mk_int} to frame_index so that the data for this animation can be updated when frame_index is changed.

      If outfile is passed the animation will be saved to a file with that name. The suffix determines the file type. If ax is passed at the same time as outfile then the Figure containing ax must also be passed (to the fig argument) so that the animation can be saved.

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Other kwargs are passed to Makie's lines!() function.

      If ax is not passed, returns the Figure, otherwise returns the object returned by lines!().

      source
      makie_post_processing.animate_2dMethod
      animate_2d(xcoord, ycoord, data; frame_index=nothing, ax=nothing, fig=nothing,
                  colorbar_place=nothing, xlabel=nothing, ylabel=nothing, title=nothing,
                  outfile=nothing, colormap="reverse_deep", colorscale=nothing,
      -           transform=identity, axis_args=Dict{Symbol,Any}(), kwargs...)

      Make a 2d animation of data vs xcoord and ycoord.

      xlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      If ax is passed, the animation will be added to that existing Axis, otherwise a new Figure and Axis will be created. If ax is passed, you should also pass an Observable{mk_int} to frame_index so that the data for this animation can be updated when frame_index is changed.

      If outfile is passed the animation will be saved to a file with that name. The suffix determines the file type. If ax is passed at the same time as outfile then the Figure containing ax must also be passed (to the fig argument) so that the animation can be saved.

      colormap is included explicitly because we do some special handling so that extra Makie functionality can be specified by a prefix to the colormap string, rather than the standard Makie mechanism of creating a struct that modifies the colormap. For example Reverse("deep") can be passed as "reverse_deep". This is useful so that these extra colormaps can be specified in an input file, but is not needed for interactive use.

      When xcoord and ycoord are both one-dimensional, uses Makie's heatmap!() function for the plot. If either or both of xcoord and ycoord are two-dimensional, instead uses irregular_heatmap!.

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Other kwargs are passed to Makie's heatmap!() function.

      If ax is not passed, returns the Figure, otherwise returns the object returned by heatmap!().

      source
      makie_post_processing.animate_f_unnorm_vs_vpaFunction
      animate_f_unnorm_vs_vpa(run_info; input=nothing, electron=false, neutral=false, is=1,
      -                        iz=nothing, fig=nothing, ax=nothing, frame_index=nothing,
      +           transform=identity, axis_args=Dict{Symbol,Any}(), kwargs...)

      Make a 2d animation of data vs xcoord and ycoord.

      xlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      If ax is passed, the animation will be added to that existing Axis, otherwise a new Figure and Axis will be created. If ax is passed, you should also pass an Observable{mk_int} to frame_index so that the data for this animation can be updated when frame_index is changed.

      If outfile is passed the animation will be saved to a file with that name. The suffix determines the file type. If ax is passed at the same time as outfile then the Figure containing ax must also be passed (to the fig argument) so that the animation can be saved.

      colormap is included explicitly because we do some special handling so that extra Makie functionality can be specified by a prefix to the colormap string, rather than the standard Makie mechanism of creating a struct that modifies the colormap. For example Reverse("deep") can be passed as "reverse_deep". This is useful so that these extra colormaps can be specified in an input file, but is not needed for interactive use.

      When xcoord and ycoord are both one-dimensional, uses Makie's heatmap!() function for the plot. If either or both of xcoord and ycoord are two-dimensional, instead uses irregular_heatmap!.

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Other kwargs are passed to Makie's heatmap!() function.

      If ax is not passed, returns the Figure, otherwise returns the object returned by heatmap!().

      source
      makie_post_processing.animate_f_unnorm_vs_vpaFunction
      animate_f_unnorm_vs_vpa(run_info; input=nothing, neutral=false, is=1, iz=nothing,
      +                        fig=nothing, ax=nothing, frame_index=nothing,
                               outfile=nothing, yscale=identity, transform=identity,
      -                        axis_args=Dict{Symbol,Any}(), kwargs...)

      Plot an unnormalized distribution function against $v_\parallel$ at a fixed z.

      This function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.

      The information for the runs to animate is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are overlayed on the same axis.

      By default animates the ion distribution function. If electron=true is passed, animates the electron distribution function instead. If neutral=true is passed, animates the neutral distribution function instead.

      is selects which species to analyse.

      it and iz specify the indices of the time- and z-points to choose. By default they are taken from input.

      If input is not passed, it is taken from input_dict_dfns["f"].

      The data needed will be loaded from file.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When run_info is not a Tuple, an Axis can be passed to ax to have the plot added to ax. When ax is passed, if outfile is passed to save the plot, then the Figure containing ax must be passed to fig.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Any extra kwargs are passed to lines!() (which is used to create the plot, as we have to handle time-varying coordinates so cannot use animate_1d).

      source
      makie_post_processing.animate_f_unnorm_vs_vpa_zFunction
      animate_f_unnorm_vs_vpa_z(run_info; input=nothing, electron=false, neutral=false,
      -                          is=1, fig=nothing, ax=nothing, frame_index=nothing,
      +                        axis_args=Dict{Symbol,Any}(), kwargs...)

      Plot an unnormalized distribution function against $v_\parallel$ at a fixed z.

      This function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.

      The information for the runs to animate is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are overlayed on the same axis.

      By default animates the ion distribution function. If neutrals=true is passed, animates the neutral distribution function instead.

      is selects which species to analyse.

      it and iz specify the indices of the time- and z-points to choose. By default they are taken from input.

      If input is not passed, it is taken from input_dict_dfns["f"].

      The data needed will be loaded from file.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When run_info is not a Tuple, an Axis can be passed to ax to have the plot added to ax. When ax is passed, if outfile is passed to save the plot, then the Figure containing ax must be passed to fig.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Any extra kwargs are passed to lines!() (which is used to create the plot, as we have to handle time-varying coordinates so cannot use animate_1d).

      source
      makie_post_processing.animate_f_unnorm_vs_vpa_zFunction
      animate_f_unnorm_vs_vpa_z(run_info; input=nothing, neutral=false, is=1,
      +                          fig=nothing, ax=nothing, frame_index=nothing,
                                 outfile=nothing, yscale=identity, transform=identity,
      -                          axis_args=Dict{Symbol,Any}(), kwargs...)

      Animate an unnormalized distribution function against $v_\parallel$ and z.

      This function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are displayed in a horizontal row.

      By default animates the ion distribution function. If electron=true is passed, animates the electron distribution function instead. If neutral=true is passed, animates the neutral distribution function instead.

      is selects which species to analyse.

      If input is not passed, it is taken from input_dict_dfns["f"].

      The data needed will be loaded from file.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When run_info is not a Tuple, an Axis can be passed to ax to have the animation created in ax. When ax is passed, if outfile is passed to save the animation, then the Figure containing ax must be passed to fig.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Any extra kwargs are passed to plot_2d (which is used to create the plot, as we have to handle time-varying coordinates so cannot use animate_2d).

      source
      makie_post_processing.animate_vs_rFunction
      animate_vs_r(run_info::Tuple, var_name; is=1, data=nothing,
      +                          axis_args=Dict{Symbol,Any}(), kwargs...)

      Animate an unnormalized distribution function against $v_\parallel$ and z.

      This function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are displayed in a horizontal row.

      By default animates the ion distribution function. If neutrals=true is passed, animates the neutral distribution function instead.

      is selects which species to analyse.

      If input is not passed, it is taken from input_dict_dfns["f"].

      The data needed will be loaded from file.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When run_info is not a Tuple, an Axis can be passed to ax to have the animation created in ax. When ax is passed, if outfile is passed to save the animation, then the Figure containing ax must be passed to fig.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Any extra kwargs are passed to plot_2d (which is used to create the plot, as we have to handle time-varying coordinates so cannot use animate_2d).

      source
      makie_post_processing.animate_vs_rFunction
      animate_vs_r(run_info::Tuple, var_name; is=1, data=nothing,
                    input=nothing, outfile=nothing, yscale=nothing,
                    transform=identity, ylims=nothing,
                    axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
      @@ -25,7 +25,7 @@
                    transform=identity, ylims=nothing, label=nothing,
                    axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
                    ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,
      -             ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vpaFunction
      animate_vs_vpa(run_info::Tuple, var_name; is=1, data=nothing,
      +             ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vpaFunction
      animate_vs_vpa(run_info::Tuple, var_name; is=1, data=nothing,
                      input=nothing, outfile=nothing, yscale=nothing,
                      transform=identity, ylims=nothing,
                      axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
      @@ -37,7 +37,7 @@
                      transform=identity, ylims=nothing, label=nothing,
                      axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
                      ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,
      -               ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vpa.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vpa_rFunction
      animate_vs_vpa_r(run_info::Tuple, var_name; is=1, data=nothing,
      +               ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vpa.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vpa_rFunction
      animate_vs_vpa_r(run_info::Tuple, var_name; is=1, data=nothing,
                        input=nothing, outfile=nothing, colorscale=identity,
                        transform=identity, axis_args=Dict{Symbol,Any}(),
                        it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -50,7 +50,7 @@
                        transform=identity, axis_args=Dict{Symbol,Any}(),
                        it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                        ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                 kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vpa.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vpa_vperpFunction
      animate_vs_vpa_vperp(run_info::Tuple, var_name; is=1, data=nothing,
      +                 kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vpa.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vpa_vperpFunction
      animate_vs_vpa_vperp(run_info::Tuple, var_name; is=1, data=nothing,
                            input=nothing, outfile=nothing, colorscale=identity,
                            transform=identity, axis_args=Dict{Symbol,Any}(),
                            it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -63,7 +63,7 @@
                            transform=identity, axis_args=Dict{Symbol,Any}(),
                            it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                            ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                     kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vperp and vpa.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vpa_zFunction
      animate_vs_vpa_z(run_info::Tuple, var_name; is=1, data=nothing,
      +                     kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vperp and vpa.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vpa_zFunction
      animate_vs_vpa_z(run_info::Tuple, var_name; is=1, data=nothing,
                        input=nothing, outfile=nothing, colorscale=identity,
                        transform=identity, axis_args=Dict{Symbol,Any}(),
                        it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -76,7 +76,7 @@
                        transform=identity, axis_args=Dict{Symbol,Any}(),
                        it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                        ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                 kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vpa.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vperpFunction
      animate_vs_vperp(run_info::Tuple, var_name; is=1, data=nothing,
      +                 kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vpa.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vperpFunction
      animate_vs_vperp(run_info::Tuple, var_name; is=1, data=nothing,
                        input=nothing, outfile=nothing, yscale=nothing,
                        transform=identity, ylims=nothing,
                        axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
      @@ -88,7 +88,7 @@
                        transform=identity, ylims=nothing, label=nothing,
                        axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
                        ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,
      -                 ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vperp.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vperp_rFunction
      animate_vs_vperp_r(run_info::Tuple, var_name; is=1, data=nothing,
      +                 ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vperp.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vperp_rFunction
      animate_vs_vperp_r(run_info::Tuple, var_name; is=1, data=nothing,
                          input=nothing, outfile=nothing, colorscale=identity,
                          transform=identity, axis_args=Dict{Symbol,Any}(),
                          it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -101,7 +101,7 @@
                          transform=identity, axis_args=Dict{Symbol,Any}(),
                          it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                          ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                   kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vperp.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vperp_zFunction
      animate_vs_vperp_z(run_info::Tuple, var_name; is=1, data=nothing,
      +                   kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vperp.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vperp_zFunction
      animate_vs_vperp_z(run_info::Tuple, var_name; is=1, data=nothing,
                          input=nothing, outfile=nothing, colorscale=identity,
                          transform=identity, axis_args=Dict{Symbol,Any}(),
                          it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -114,7 +114,7 @@
                          transform=identity, axis_args=Dict{Symbol,Any}(),
                          it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                          ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                   kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vperp.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vrFunction
      animate_vs_vr(run_info::Tuple, var_name; is=1, data=nothing,
      +                   kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vperp.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vrFunction
      animate_vs_vr(run_info::Tuple, var_name; is=1, data=nothing,
                     input=nothing, outfile=nothing, yscale=nothing,
                     transform=identity, ylims=nothing,
                     axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
      @@ -126,7 +126,7 @@
                     transform=identity, ylims=nothing, label=nothing,
                     axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
                     ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,
      -              ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vr.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vr_rFunction
      animate_vs_vr_r(run_info::Tuple, var_name; is=1, data=nothing,
      +              ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vr.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vr_rFunction
      animate_vs_vr_r(run_info::Tuple, var_name; is=1, data=nothing,
                       input=nothing, outfile=nothing, colorscale=identity,
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -139,7 +139,7 @@
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                       ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vr.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vr_vzetaFunction
      animate_vs_vr_vzeta(run_info::Tuple, var_name; is=1, data=nothing,
      +                kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vr.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vr_vzetaFunction
      animate_vs_vr_vzeta(run_info::Tuple, var_name; is=1, data=nothing,
                           input=nothing, outfile=nothing, colorscale=identity,
                           transform=identity, axis_args=Dict{Symbol,Any}(),
                           it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -152,7 +152,7 @@
                           transform=identity, axis_args=Dict{Symbol,Any}(),
                           it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                           ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                    kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vr.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vr_zFunction
      animate_vs_vr_z(run_info::Tuple, var_name; is=1, data=nothing,
      +                    kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vr.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vr_zFunction
      animate_vs_vr_z(run_info::Tuple, var_name; is=1, data=nothing,
                       input=nothing, outfile=nothing, colorscale=identity,
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -165,7 +165,7 @@
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                       ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vr.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vzFunction
      animate_vs_vz(run_info::Tuple, var_name; is=1, data=nothing,
      +                kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vr.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vzFunction
      animate_vs_vz(run_info::Tuple, var_name; is=1, data=nothing,
                     input=nothing, outfile=nothing, yscale=nothing,
                     transform=identity, ylims=nothing,
                     axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
      @@ -177,7 +177,7 @@
                     transform=identity, ylims=nothing, label=nothing,
                     axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
                     ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,
      -              ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vz.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vz_rFunction
      animate_vs_vz_r(run_info::Tuple, var_name; is=1, data=nothing,
      +              ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vz.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vz_rFunction
      animate_vs_vz_r(run_info::Tuple, var_name; is=1, data=nothing,
                       input=nothing, outfile=nothing, colorscale=identity,
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -190,7 +190,7 @@
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                       ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vz.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vz_vrFunction
      animate_vs_vz_vr(run_info::Tuple, var_name; is=1, data=nothing,
      +                kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vz.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vz_vrFunction
      animate_vs_vz_vr(run_info::Tuple, var_name; is=1, data=nothing,
                        input=nothing, outfile=nothing, colorscale=identity,
                        transform=identity, axis_args=Dict{Symbol,Any}(),
                        it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -203,7 +203,7 @@
                        transform=identity, axis_args=Dict{Symbol,Any}(),
                        it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                        ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                 kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vr and vz.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vz_vzetaFunction
      animate_vs_vz_vzeta(run_info::Tuple, var_name; is=1, data=nothing,
      +                 kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vr and vz.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vz_vzetaFunction
      animate_vs_vz_vzeta(run_info::Tuple, var_name; is=1, data=nothing,
                           input=nothing, outfile=nothing, colorscale=identity,
                           transform=identity, axis_args=Dict{Symbol,Any}(),
                           it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -216,7 +216,7 @@
                           transform=identity, axis_args=Dict{Symbol,Any}(),
                           it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                           ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                    kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vz.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vz_zFunction
      animate_vs_vz_z(run_info::Tuple, var_name; is=1, data=nothing,
      +                    kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vz.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vz_zFunction
      animate_vs_vz_z(run_info::Tuple, var_name; is=1, data=nothing,
                       input=nothing, outfile=nothing, colorscale=identity,
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -229,7 +229,7 @@
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                       ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vz.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vzetaFunction
      animate_vs_vzeta(run_info::Tuple, var_name; is=1, data=nothing,
      +                kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vz.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vzetaFunction
      animate_vs_vzeta(run_info::Tuple, var_name; is=1, data=nothing,
                        input=nothing, outfile=nothing, yscale=nothing,
                        transform=identity, ylims=nothing,
                        axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
      @@ -241,7 +241,7 @@
                        transform=identity, ylims=nothing, label=nothing,
                        axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
                        ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,
      -                 ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vzeta_rFunction
      animate_vs_vzeta_r(run_info::Tuple, var_name; is=1, data=nothing,
      +                 ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vzeta_rFunction
      animate_vs_vzeta_r(run_info::Tuple, var_name; is=1, data=nothing,
                          input=nothing, outfile=nothing, colorscale=identity,
                          transform=identity, axis_args=Dict{Symbol,Any}(),
                          it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -254,7 +254,7 @@
                          transform=identity, axis_args=Dict{Symbol,Any}(),
                          it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                          ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                   kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vzeta.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vzeta_zFunction
      animate_vs_vzeta_z(run_info::Tuple, var_name; is=1, data=nothing,
      +                   kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vzeta.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_vzeta_zFunction
      animate_vs_vzeta_z(run_info::Tuple, var_name; is=1, data=nothing,
                          input=nothing, outfile=nothing, colorscale=identity,
                          transform=identity, axis_args=Dict{Symbol,Any}(),
                          it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -267,7 +267,7 @@
                          transform=identity, axis_args=Dict{Symbol,Any}(),
                          it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                          ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -                   kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vzeta.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_zFunction
      animate_vs_z(run_info::Tuple, var_name; is=1, data=nothing,
      +                   kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vzeta.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_zFunction
      animate_vs_z(run_info::Tuple, var_name; is=1, data=nothing,
                    input=nothing, outfile=nothing, yscale=nothing,
                    transform=identity, ylims=nothing,
                    axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
      @@ -279,7 +279,7 @@
                    transform=identity, ylims=nothing, label=nothing,
                    axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing, iz=nothing,
                    ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing,
      -             ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_z_rFunction
      animate_vs_z_r(run_info::Tuple, var_name; is=1, data=nothing,
      +             ivz=nothing, kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs z.

      If a Tuple of run_info is passed, the animations from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      ylims can be passed a Tuple (ymin, ymax) to set the y-axis limits. By default the minimum and maximum of the data (over all time points) will be used.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      When a single run_info is passed, label can be passed to set a custom label for the line. By default the run_info.run_name is used.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.animate_vs_z_rFunction
      animate_vs_z_r(run_info::Tuple, var_name; is=1, data=nothing,
                      input=nothing, outfile=nothing, colorscale=identity,
                      transform=identity, axis_args=Dict{Symbol,Any}(),
                      it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -292,43 +292,43 @@
                      transform=identity, axis_args=Dict{Symbol,Any}(),
                      it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
                      ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing,
      -               kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and z.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.calculate_steady_state_residualFunction

      calculatesteadystateresidual(runinfo, variablename; is=1, data=nothing, plotprefix=nothing, figaxes=nothing, irun=1)

      Calculate and plot the 'residuals' for variable_name.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are displayed in a horizontal row.

      If the variable has a species dimension, is selects which species to analyse.

      By default the variable will be loaded from file. If the data has already been loaded, it can be passed to data instead. data should be a Tuple of the same length as run_info if run_info is a Tuple.

      If plot_prefix is passed, it gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf.

      fig_axes can be passed an OrderedDict of Tuples as returned by _get_steady_state_residual_fig_axes - each tuple contains the Figure fig and Axis or Tuple{Axis} ax to which to add the plot corresponding to its key. If run_info is a Tuple, ax for each entry must be a Tuple of the same length.

      source
      makie_post_processing.compare_ion_pdf_symbolic_testMethod
      compare_ion_pdf_symbolic_test(run_info, plot_prefix; io=nothing,
      -                                  input=nothing)

      Compare the computed and manufactured solutions for the ion distribution function.

      The information for the run to analyse is passed in run_info (as returned by get_run_info).

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      If io is passed then error norms will be written to that file.

      input is a NamedTuple of settings to use. If not given it will be read from the [manufactured_solns] section of [input_dict_dfns][@ref].

      Note: when calculating error norms, data is loaded only for 1 time point and for an r-z chunk that is the same size as computed by 1 block of the simulation at run time. This should prevent excessive memory requirements for this function.

      source
      makie_post_processing.compare_moment_symbolic_testMethod
      compare_moment_symbolic_test(run_info, plot_prefix, field_label, field_sym_label,
      -                             norm_label, variable_name; io=nothing)

      Compare the computed and manufactured solutions for a field or moment variable variable_name.

      The information for the run to analyse is passed in run_info (as returned by get_run_info).

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      field_label is the label that will be used for the name of the computed variable in plots, field_sym_label is the label for the manufactured solution, and norm_label is the label for the error (the difference between the computed and manufactured solutions).

      If io is passed then error norms will be written to that file.

      source
      makie_post_processing.compare_neutral_pdf_symbolic_testMethod
      compare_neutral_pdf_symbolic_test(run_info, plot_prefix; io=nothing,
      -                                  input=nothing)

      Compare the computed and manufactured solutions for the neutral distribution function.

      The information for the run to analyse is passed in run_info (as returned by get_run_info).

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      If io is passed then error norms will be written to that file.

      input is a NamedTuple of settings to use. If not given it will be read from the [manufactured_solns] section of [input_dict_dfns][@ref].

      Note: when calculating error norms, data is loaded only for 1 time point and for an r-z chunk that is the same size as computed by 1 block of the simulation at run time. This should prevent excessive memory requirements for this function.

      source
      makie_post_processing.constraints_plotsMethod
      constraints_plots(run_info; plot_prefix=plot_prefix)

      Plot and/or animate the coefficients used to correct the normalised distribution function(s) (aka shape functions) to obey the moment constraints.

      If there were no discretisation errors, we would have $A=1$, $B=0$, $C=0$. The plots/animations show $(A-1)$ so that all three coefficients can be shown nicely on the same axes.

      source
      makie_post_processing.curvilinear_grid_meshMethod
      curvilinear_grid_mesh(xs, ys, zs, colors)

      Tesselates the grid defined by xs and ys in order to form a mesh with per-face coloring given by colors.

      The grid defined by xs and ys must have dimensions (nx, ny) == size(colors) .+ 1, as is the case for heatmap/image.

      Code from: https://github.com/MakieOrg/Makie.jl/issues/742#issuecomment-1415809653

      source
      makie_post_processing.generate_example_input_fileFunction
      generate_example_input_file(filename::String=post_processing_input.toml;
      -                            overwrite::Bool=false)

      Create an example makie-post-processing input file.

      Every option is commented out, but filled with the default value.

      Pass filename to choose the name of the example file (defaults to the default input file name used by makie_post_process()).

      Pass overwrite=true to overwrite any existing file at filename.

      source
      makie_post_processing.get_1d_axFunction
      get_1d_ax(n=nothing; title=nothing, subtitles=nothing, yscale=nothing,
      -          get_legend_place=nothing, size=nothing, kwargs...)

      Create a new Figure fig and Axis ax intended for 1d plots.

      title gives an overall title to the Figure.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10.

      By default creates a single Axis, and returns (fig, ax). If a number of axes n is passed, then ax is a Vector{Axis} of length n (even if n is 1). The axes are created in a horizontal row, and the width of the figure is increased in proportion to n.

      get_legend_place can be set to one of (:left, :right, :above, :below) to create a GridPosition for a legend in the corresponding place relative to each Axis. If get_legend_place is set, (fig, ax, legend_place) is returned where legend_place is a GridPosition (if n=nothing) or a Tuple of n GridPositions.

      When n is passed, subtitles can be passed a Tuple of length n which will be used to set a subtitle for each Axis in ax.

      size is passed through to the Figure constructor. Its default value is (600, 400) if n is not passed, or (600*n, 400) if n is passed.

      Extra kwargs are passed to the Axis() constructor.

      source
      makie_post_processing.get_2d_axFunction
      get_2d_ax(n=nothing; title=nothing, subtitles=nothing, size=nothing, kwargs...)

      Create a new Figure fig and Axis ax intended for 2d plots.

      title gives an overall title to the Figure.

      By default creates a single Axis, and returns (fig, ax, colorbar_place), where colorbar_place is a location in the grid layout that can be passed to Colorbar() located immediately to the right of ax. If a number of axes n is passed, then ax is a Vector{Axis} and colorbar_place is a Vector{GridPosition} of length n (even if n is 1). The axes are created in a horizontal row, and the width of the figure is increased in proportion to n.

      When n is passed, subtitles can be passed a Tuple of length n which will be used to set a subtitle for each Axis in ax.

      size is passed through to the Figure constructor. Its default value is (600, 400) if n is not passed, or (600*n, 400) if n is passed.

      Extra kwargs are passed to the Axis() constructor.

      source
      makie_post_processing.get_dimension_slice_indicesMethod

      getdimensionsliceindices(keepdims...; input, it=nothing, is=nothing, ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing)

      Get indices for dimensions to slice

      The indices are taken from input, unless they are passed as keyword arguments

      The dimensions in keep_dims are not given a slice (those are the dimensions we want in the variable after slicing).

      source
      makie_post_processing.get_run_infoMethod
      get_run_info(run_dir...; itime_min=1, itime_max=0,
      +               kwargs...)

      Animate var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and z.

      If a Tuple of run_info is passed, the animations from each run are created in a horizontal row, with each sub-animation having the 'run name' as its subtitle.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be created in ax. When ax is passed, a colorbar will be created at colorbar_place if a GridPosition is passed to colorbar_place.

      outfile is required for animations unless ax is passed. The animation will be saved to a file named outfile. The suffix determines the file type. If both outfile and ax are passed, then the Figure containing ax must be passed to fig to allow the animation to be saved.

      When a single run_info is passed, the (sub-)title can be set with the title argument.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case returns nothing.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.calculate_steady_state_residualFunction

      calculatesteadystateresidual(runinfo, variablename; is=1, data=nothing, plotprefix=nothing, figaxes=nothing, irun=1)

      Calculate and plot the 'residuals' for variable_name.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are displayed in a horizontal row.

      If the variable has a species dimension, is selects which species to analyse.

      By default the variable will be loaded from file. If the data has already been loaded, it can be passed to data instead. data should be a Tuple of the same length as run_info if run_info is a Tuple.

      If plot_prefix is passed, it gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf.

      fig_axes can be passed an OrderedDict of Tuples as returned by _get_steady_state_residual_fig_axes - each tuple contains the Figure fig and Axis or Tuple{Axis} ax to which to add the plot corresponding to its key. If run_info is a Tuple, ax for each entry must be a Tuple of the same length.

      source
      makie_post_processing.compare_ion_pdf_symbolic_testMethod
      compare_ion_pdf_symbolic_test(run_info, plot_prefix; io=nothing,
      +                                  input=nothing)

      Compare the computed and manufactured solutions for the ion distribution function.

      The information for the run to analyse is passed in run_info (as returned by get_run_info).

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      If io is passed then error norms will be written to that file.

      input is a NamedTuple of settings to use. If not given it will be read from the [manufactured_solns] section of [input_dict_dfns][@ref].

      Note: when calculating error norms, data is loaded only for 1 time point and for an r-z chunk that is the same size as computed by 1 block of the simulation at run time. This should prevent excessive memory requirements for this function.

      source
      makie_post_processing.compare_moment_symbolic_testMethod
      compare_moment_symbolic_test(run_info, plot_prefix, field_label, field_sym_label,
      +                             norm_label, variable_name; io=nothing)

      Compare the computed and manufactured solutions for a field or moment variable variable_name.

      The information for the run to analyse is passed in run_info (as returned by get_run_info).

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      field_label is the label that will be used for the name of the computed variable in plots, field_sym_label is the label for the manufactured solution, and norm_label is the label for the error (the difference between the computed and manufactured solutions).

      If io is passed then error norms will be written to that file.

      source
      makie_post_processing.compare_neutral_pdf_symbolic_testMethod
      compare_neutral_pdf_symbolic_test(run_info, plot_prefix; io=nothing,
      +                                  input=nothing)

      Compare the computed and manufactured solutions for the neutral distribution function.

      The information for the run to analyse is passed in run_info (as returned by get_run_info).

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      If io is passed then error norms will be written to that file.

      input is a NamedTuple of settings to use. If not given it will be read from the [manufactured_solns] section of [input_dict_dfns][@ref].

      Note: when calculating error norms, data is loaded only for 1 time point and for an r-z chunk that is the same size as computed by 1 block of the simulation at run time. This should prevent excessive memory requirements for this function.

      source
      makie_post_processing.constraints_plotsMethod
      constraints_plots(run_info; plot_prefix=plot_prefix)

      Plot and/or animate the coefficients used to correct the normalised distribution function(s) (aka shape functions) to obey the moment constraints.

      If there were no discretisation errors, we would have $A=1$, $B=0$, $C=0$. The plots/animations show $(A-1)$ so that all three coefficients can be shown nicely on the same axes.

      source
      makie_post_processing.curvilinear_grid_meshMethod
      curvilinear_grid_mesh(xs, ys, zs, colors)

      Tesselates the grid defined by xs and ys in order to form a mesh with per-face coloring given by colors.

      The grid defined by xs and ys must have dimensions (nx, ny) == size(colors) .+ 1, as is the case for heatmap/image.

      Code from: https://github.com/MakieOrg/Makie.jl/issues/742#issuecomment-1415809653

      source
      makie_post_processing.generate_example_input_fileFunction
      generate_example_input_file(filename::String=post_processing_input.toml;
      +                            overwrite::Bool=false)

      Create an example makie-post-processing input file.

      Every option is commented out, but filled with the default value.

      Pass filename to choose the name of the example file (defaults to the default input file name used by makie_post_process()).

      Pass overwrite=true to overwrite any existing file at filename.

      source
      makie_post_processing.get_1d_axFunction
      get_1d_ax(n=nothing; title=nothing, subtitles=nothing, yscale=nothing,
      +          get_legend_place=nothing, size=nothing, kwargs...)

      Create a new Figure fig and Axis ax intended for 1d plots.

      title gives an overall title to the Figure.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10.

      By default creates a single Axis, and returns (fig, ax). If a number of axes n is passed, then ax is a Vector{Axis} of length n (even if n is 1). The axes are created in a horizontal row, and the width of the figure is increased in proportion to n.

      get_legend_place can be set to one of (:left, :right, :above, :below) to create a GridPosition for a legend in the corresponding place relative to each Axis. If get_legend_place is set, (fig, ax, legend_place) is returned where legend_place is a GridPosition (if n=nothing) or a Tuple of n GridPositions.

      When n is passed, subtitles can be passed a Tuple of length n which will be used to set a subtitle for each Axis in ax.

      size is passed through to the Figure constructor. Its default value is (600, 400) if n is not passed, or (600*n, 400) if n is passed.

      Extra kwargs are passed to the Axis() constructor.

      source
      makie_post_processing.get_2d_axFunction
      get_2d_ax(n=nothing; title=nothing, subtitles=nothing, size=nothing, kwargs...)

      Create a new Figure fig and Axis ax intended for 2d plots.

      title gives an overall title to the Figure.

      By default creates a single Axis, and returns (fig, ax, colorbar_place), where colorbar_place is a location in the grid layout that can be passed to Colorbar() located immediately to the right of ax. If a number of axes n is passed, then ax is a Vector{Axis} and colorbar_place is a Vector{GridPosition} of length n (even if n is 1). The axes are created in a horizontal row, and the width of the figure is increased in proportion to n.

      When n is passed, subtitles can be passed a Tuple of length n which will be used to set a subtitle for each Axis in ax.

      size is passed through to the Figure constructor. Its default value is (600, 400) if n is not passed, or (600*n, 400) if n is passed.

      Extra kwargs are passed to the Axis() constructor.

      source
      makie_post_processing.get_dimension_slice_indicesMethod

      getdimensionsliceindices(keepdims...; input, it=nothing, is=nothing, ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing, ivr=nothing, ivz=nothing)

      Get indices for dimensions to slice

      The indices are taken from input, unless they are passed as keyword arguments

      The dimensions in keep_dims are not given a slice (those are the dimensions we want in the variable after slicing).

      source
      makie_post_processing.get_run_infoMethod
      get_run_info(run_dir...; itime_min=1, itime_max=0,
                    itime_skip=1, dfns=false, initial_electron=false, do_setup=true,
                    setup_input_file=nothing)
       get_run_info((run_dir, restart_index)...; itime_min=1, itime_max=0,
                    itime_skip=1, dfns=false, initial_electron=false, do_setup=true,
      -             setup_input_file=nothing)

      Get file handles and other info for a single run

      run_dir is either the directory to read output from (whose name should be the run_name), or a momentkinetics binary output file. If a file is passed, it is only used to infer the directory and `runname, so it is possible for example to pass a.moments.h5output file and alsodfns=trueand the.dfns.h5` file will be the one actually opened (as long as it exists).

      restart_index can be given by passing a Tuple, e.g. ("runs/example", 42) as the positional argument. It specifies which restart to read if there are multiple restarts. If no restart_index is given or if nothing is passed, read all restarts and concatenate them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index).

      Several runs can be loaded at the same time by passing multiple positional arguments. Each argument can be a String run_dir giving a directory to read output from or a Tuple (run_dir, restart_index) giving both a directory and a restart index (it is allowed to mix Strings and Tuples in a call).

      By default load data from moments files, pass dfns=true to load from distribution functions files, or initial_electron=true and dfns=true to load from initial electron state files.

      The itime_min, itime_max and itime_skip options can be used to select only a slice of time points when loading data. In makie_post_process these options are read from the input (if they are set) before get_run_info() is called, so that the run_info returned can be passed to setup_makie_post_processing_input!, to be used for defaults for the remaining options. If either itime_min or itime_max are ≤0, their values are used as offsets from the final time index of the run.

      setup_makie_post_processing_input!() is called at the end of get_run_info(), for convenience when working interactively. Use moment_kinetics.load_data.get_run_info_no_setup if you do not want this. A post-processing input file can be passed to setup_input_file that will be passed to setup_makie_post_processing_input!() if you do not want to use the default input file.

      source
      makie_post_processing.get_variable_symbolMethod
      get_variable_symbol(variable_name)

      Get a symbol corresponding to a variable_name

      For example get_variable_symbol("phi") returns "ϕ".

      If the symbol has not been defined, just return variable_name.

      source
      makie_post_processing.grid_points_to_facesFunction
      grid_points_to_faces(coord::AbstractVector)
      +             setup_input_file=nothing)

      Get file handles and other info for a single run

      run_dir is either the directory to read output from (whose name should be the run_name), or a momentkinetics binary output file. If a file is passed, it is only used to infer the directory and `runname, so it is possible for example to pass a.moments.h5output file and alsodfns=trueand the.dfns.h5` file will be the one actually opened (as long as it exists).

      restart_index can be given by passing a Tuple, e.g. ("runs/example", 42) as the positional argument. It specifies which restart to read if there are multiple restarts. If no restart_index is given or if nothing is passed, read all restarts and concatenate them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index).

      Several runs can be loaded at the same time by passing multiple positional arguments. Each argument can be a String run_dir giving a directory to read output from or a Tuple (run_dir, restart_index) giving both a directory and a restart index (it is allowed to mix Strings and Tuples in a call).

      By default load data from moments files, pass dfns=true to load from distribution functions files, or initial_electron=true and dfns=true to load from initial electron state files.

      The itime_min, itime_max and itime_skip options can be used to select only a slice of time points when loading data. In makie_post_process these options are read from the input (if they are set) before get_run_info() is called, so that the run_info returned can be passed to setup_makie_post_processing_input!, to be used for defaults for the remaining options. If either itime_min or itime_max are ≤0, their values are used as offsets from the final time index of the run.

      setup_makie_post_processing_input!() is called at the end of get_run_info(), for convenience when working interactively. Use moment_kinetics.load_data.get_run_info_no_setup if you do not want this. A post-processing input file can be passed to setup_input_file that will be passed to setup_makie_post_processing_input!() if you do not want to use the default input file.

      source
      makie_post_processing.get_variable_symbolMethod
      get_variable_symbol(variable_name)

      Get a symbol corresponding to a variable_name

      For example get_variable_symbol("phi") returns "ϕ".

      If the symbol has not been defined, just return variable_name.

      source
      makie_post_processing.grid_points_to_facesFunction
      grid_points_to_faces(coord::AbstractVector)
       grid_points_to_faces(coord::Observable{T} where T <: AbstractVector)
       grid_points_to_faces(coord::AbstractMatrix)
      -grid_points_to_faces(coord::Observable{T} where T <: AbstractMatrix)

      Turn grid points in coord into 'cell faces'.

      Returns faces, which has a length one greater than coord. The first and last values of faces are the first and last values of coord. The intermediate values are the mid points between grid points.

      source
      makie_post_processing.instability2D_plotsFunction
      instability2D_plots(run_info::Tuple, variable_name; plot_prefix, zind=nothing)
      +grid_points_to_faces(coord::Observable{T} where T <: AbstractMatrix)

      Turn grid points in coord into 'cell faces'.

      Returns faces, which has a length one greater than coord. The first and last values of faces are the first and last values of coord. The intermediate values are the mid points between grid points.

      source
      makie_post_processing.instability2D_plotsFunction
      instability2D_plots(run_info::Tuple, variable_name; plot_prefix, zind=nothing)
       instability2D_plots(run_info, variable_name; plot_prefix, zind=nothing,
      -                    axes_and_observables=nothing)

      Make plots of variable_name for analysis of 2D instability.

      The information for the runs to analyse and plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, make plots comparing the runs, shown in a horizontal row..

      Settings are read from the [instability2D] section of the input.

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      When run_info is not a Tuple, axes_and_observables can be passed to add plots and animations to existing figures, although this is not very convenient - see the use of this argument when called from the run_info::Tuple method.

      If zind is not passed, it is calculated as the z-index where the mode seems to have the maximum growth rate for this variable. Returns zind.

      source
      makie_post_processing.irregular_heatmap!Method
      irregular_heatmap!(ax, xs, ys, zs; kwargs...)

      Plot a heatmap onto the Axis ax where xs and ys are allowed to define irregularly spaced, 2d grids. zs gives the value in each cell of the grid.

      The grid defined by xs and ys must have dimensions (nx, ny) == size(zs) .+ 1, as is the case for heatmap/image.

      xs be an array of size (nx,ny) or a vector of size (nx).

      ys be an array of size (nx,ny) or a vector of size (ny).

      kwargs are passed to Makie's mesh() function.

      Code adapted from: https://github.com/MakieOrg/Makie.jl/issues/742#issuecomment-1415809653

      source
      makie_post_processing.irregular_heatmapMethod
      irregular_heatmap(xs, ys, zs; kwargs...)

      Plot a heatmap where xs and ys are allowed to define irregularly spaced, 2d grids. zs gives the value in each cell of the grid.

      The grid defined by xs and ys must have dimensions (nx, ny) == size(zs) .+ 1, as is the case for heatmap/image.

      xs be an array of size (nx,ny) or a vector of size (nx).

      ys be an array of size (nx,ny) or a vector of size (ny).

      kwargs are passed to Makie's mesh() function.

      Code adapted from: https://github.com/MakieOrg/Makie.jl/issues/742#issuecomment-1415809653

      source
      makie_post_processing.makie_post_processMethod
      makie_post_process(run_dir...;
      +                    axes_and_observables=nothing)

      Make plots of variable_name for analysis of 2D instability.

      The information for the runs to analyse and plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, make plots comparing the runs, shown in a horizontal row..

      Settings are read from the [instability2D] section of the input.

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      When run_info is not a Tuple, axes_and_observables can be passed to add plots and animations to existing figures, although this is not very convenient - see the use of this argument when called from the run_info::Tuple method.

      If zind is not passed, it is calculated as the z-index where the mode seems to have the maximum growth rate for this variable. Returns zind.

      source
      makie_post_processing.irregular_heatmap!Method
      irregular_heatmap!(ax, xs, ys, zs; kwargs...)

      Plot a heatmap onto the Axis ax where xs and ys are allowed to define irregularly spaced, 2d grids. zs gives the value in each cell of the grid.

      The grid defined by xs and ys must have dimensions (nx, ny) == size(zs) .+ 1, as is the case for heatmap/image.

      xs be an array of size (nx,ny) or a vector of size (nx).

      ys be an array of size (nx,ny) or a vector of size (ny).

      kwargs are passed to Makie's mesh() function.

      Code adapted from: https://github.com/MakieOrg/Makie.jl/issues/742#issuecomment-1415809653

      source
      makie_post_processing.irregular_heatmapMethod
      irregular_heatmap(xs, ys, zs; kwargs...)

      Plot a heatmap where xs and ys are allowed to define irregularly spaced, 2d grids. zs gives the value in each cell of the grid.

      The grid defined by xs and ys must have dimensions (nx, ny) == size(zs) .+ 1, as is the case for heatmap/image.

      xs be an array of size (nx,ny) or a vector of size (nx).

      ys be an array of size (nx,ny) or a vector of size (ny).

      kwargs are passed to Makie's mesh() function.

      Code adapted from: https://github.com/MakieOrg/Makie.jl/issues/742#issuecomment-1415809653

      source
      makie_post_processing.makie_post_processMethod
      makie_post_process(run_dir...;
                          input_file::String=default_input_file_name,
                          restart_index::Union{Nothing,mk_int,Tuple}=nothing,
      -                   plot_prefix::Union{Nothing,AbstractString}=nothing)

      Run post processing with input read from a TOML file

      run_dir... is the path to the directory to plot from. If more than one run_dir is given, plots comparing the runs in run_dir... are made. A momentkinetics binary output file can also be passed as `rundir, in which case the filename is only used to infer the directory andrun_name, so it is possible for example to pass a.moments.h5output file and still make distribution function plots (as long as the corresponding.dfns.h5` file exists).

      restart_index specifies which restart to read if there are multiple restarts. The default (nothing) reads all restarts and concatenates them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index). A tuple with the same length as run_dir can also be passed to give a different restart_index for each run.

      plot_prefix can be specified to give the prefix (directory and first part of file name) to use when saving plots/animations. By default the run directory and run name are used if there is only one run, and "comparisonplots/compare" is used if there are multiple runs.

      If input_file does not exist, prints warning and uses default options.

      source
      makie_post_processing.makie_post_processMethod
      makie_post_process(run_dir::Union{String,Tuple},
      +                   plot_prefix::Union{Nothing,AbstractString}=nothing)

      Run post processing with input read from a TOML file

      run_dir... is the path to the directory to plot from. If more than one run_dir is given, plots comparing the runs in run_dir... are made. A momentkinetics binary output file can also be passed as `rundir, in which case the filename is only used to infer the directory andrun_name, so it is possible for example to pass a.moments.h5output file and still make distribution function plots (as long as the corresponding.dfns.h5` file exists).

      restart_index specifies which restart to read if there are multiple restarts. The default (nothing) reads all restarts and concatenates them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index). A tuple with the same length as run_dir can also be passed to give a different restart_index for each run.

      plot_prefix can be specified to give the prefix (directory and first part of file name) to use when saving plots/animations. By default the run directory and run name are used if there is only one run, and "comparisonplots/compare" is used if there are multiple runs.

      If input_file does not exist, prints warning and uses default options.

      source
      makie_post_processing.makie_post_processMethod
      makie_post_process(run_dir::Union{String,Tuple},
                          new_input_dict::Dict{String,Any};
                          restart_index::Union{Nothing,mk_int,Tuple}=nothing,
      -                   plot_prefix::Union{Nothing,AbstractString}=nothing)

      Run post prossing, with (non-default) input given in a Dict

      run_dir... is the path to the directory to plot from. If more than one run_dir is given, plots comparing the runs in run_dir... are made. A momentkinetics binary output file can also be passed as `rundir, in which case the filename is only used to infer the directory andrun_name, so it is possible for example to pass a.moments.h5output file and still make distribution function plots (as long as the corresponding.dfns.h5` file exists).

      input_dict is a dictionary containing settings for the post-processing.

      restart_index specifies which restart to read if there are multiple restarts. The default (nothing) reads all restarts and concatenates them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index). A tuple with the same length as run_dir can also be passed to give a different restart_index for each run.

      plot_prefix can be specified to give the prefix (directory and first part of file name) to use when saving plots/animations. By default the run directory and run name are used if there is only one run, and "comparisonplots/compare" is used if there are multiple runs.

      source
      makie_post_processing.manufactured_solutions_analysisFunction
      manufactured_solutions_analysis(run_info; plot_prefix)
      -manufactured_solutions_analysis(run_info::Tuple; plot_prefix)

      Compare computed and manufactured solutions for field and moment variables for a 'method of manufactured solutions' (MMS) test.

      The information for the run to analyse is passed in run_info (as returned by get_run_info).

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      Settings are read from the [manufactured_solns] section of the input.

      While a Tuple of run_info can be passed for compatibility with makie_post_process(), at present comparison of multiple runs is not supported - passing a Tuple of length greater than one will result in an error.

      source
      makie_post_processing.manufactured_solutions_analysis_dfnsFunction
      manufactured_solutions_analysis_dfns(run_info; plot_prefix)
      -manufactured_solutions_analysis_dfns(run_info::Tuple; plot_prefix)

      Compare computed and manufactured solutions for distribution function variables for a 'method of manufactured solutions' (MMS) test.

      The information for the run to analyse is passed in run_info (as returned by get_run_info).

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      Settings are read from the [manufactured_solns] section of the input.

      While a Tuple of run_info can be passed for compatibility with makie_post_process(), at present comparison of multiple runs is not supported - passing a Tuple of length greater than one will result in an error.

      source
      makie_post_processing.manufactured_solutions_get_field_and_field_symMethod
       manufactured_solutions_get_field_and_field_sym(run_info, variable_name;
      +                   plot_prefix::Union{Nothing,AbstractString}=nothing)

      Run post prossing, with (non-default) input given in a Dict

      run_dir... is the path to the directory to plot from. If more than one run_dir is given, plots comparing the runs in run_dir... are made. A momentkinetics binary output file can also be passed as `rundir, in which case the filename is only used to infer the directory andrun_name, so it is possible for example to pass a.moments.h5output file and still make distribution function plots (as long as the corresponding.dfns.h5` file exists).

      input_dict is a dictionary containing settings for the post-processing.

      restart_index specifies which restart to read if there are multiple restarts. The default (nothing) reads all restarts and concatenates them. An integer value reads the restart with that index - -1 indicates the latest restart (which does not have an index). A tuple with the same length as run_dir can also be passed to give a different restart_index for each run.

      plot_prefix can be specified to give the prefix (directory and first part of file name) to use when saving plots/animations. By default the run directory and run name are used if there is only one run, and "comparisonplots/compare" is used if there are multiple runs.

      source
      makie_post_processing.manufactured_solutions_analysisFunction
      manufactured_solutions_analysis(run_info; plot_prefix)
      +manufactured_solutions_analysis(run_info::Tuple; plot_prefix)

      Compare computed and manufactured solutions for field and moment variables for a 'method of manufactured solutions' (MMS) test.

      The information for the run to analyse is passed in run_info (as returned by get_run_info).

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      Settings are read from the [manufactured_solns] section of the input.

      While a Tuple of run_info can be passed for compatibility with makie_post_process(), at present comparison of multiple runs is not supported - passing a Tuple of length greater than one will result in an error.

      source
      makie_post_processing.manufactured_solutions_analysis_dfnsFunction
      manufactured_solutions_analysis_dfns(run_info; plot_prefix)
      +manufactured_solutions_analysis_dfns(run_info::Tuple; plot_prefix)

      Compare computed and manufactured solutions for distribution function variables for a 'method of manufactured solutions' (MMS) test.

      The information for the run to analyse is passed in run_info (as returned by get_run_info).

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      Settings are read from the [manufactured_solns] section of the input.

      While a Tuple of run_info can be passed for compatibility with makie_post_process(), at present comparison of multiple runs is not supported - passing a Tuple of length greater than one will result in an error.

      source
      makie_post_processing.manufactured_solutions_get_field_and_field_symMethod
       manufactured_solutions_get_field_and_field_sym(run_info, variable_name;
            it=nothing, ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -     ivr=nothing, ivz=nothing)

      Get the data variable for variable_name from the output, and calculate the manufactured solution variable_sym.

      The information for the runs to analyse and plot is passed in run_info (as returned by get_run_info).

      it, ir, iz, ivperp, ivpa, ivzeta, ivr, ivz can be used to select a subset of the grid by passing an integer or range for any dimension.

      Returns variable, variable_sym.

      source
      makie_post_processing.parse_colormapMethod
      parse_colormap(colormap)

      Parse a colormap option

      Allows us to have a string option which can be set in the input file and still use Reverse, etc. conveniently.

      source
      makie_post_processing.plot_1dMethod
      plot_1d(xcoord, data; ax=nothing, xlabel=nothing, ylabel=nothing, title=nothing,
      +     ivr=nothing, ivz=nothing)

      Get the data variable for variable_name from the output, and calculate the manufactured solution variable_sym.

      The information for the runs to analyse and plot is passed in run_info (as returned by get_run_info).

      it, ir, iz, ivperp, ivpa, ivzeta, ivr, ivz can be used to select a subset of the grid by passing an integer or range for any dimension.

      Returns variable, variable_sym.

      source
      makie_post_processing.parse_colormapMethod
      parse_colormap(colormap)

      Parse a colormap option

      Allows us to have a string option which can be set in the input file and still use Reverse, etc. conveniently.

      source
      makie_post_processing.plot_1dMethod
      plot_1d(xcoord, data; ax=nothing, xlabel=nothing, ylabel=nothing, title=nothing,
               yscale=nothing, transform=identity, axis_args=Dict{Symbol,Any}(),
      -        kwargs...)

      Make a 1d plot of data vs xcoord.

      xlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      If ax is passed, the plot will be added to that existing Axis, otherwise a new Figure and Axis will be created.

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Other kwargs are passed to Makie's lines!() function.

      If ax is not passed, returns the Figure, otherwise returns the object returned by lines!().

      source
      makie_post_processing.plot_2dMethod
      plot_2d(xcoord, ycoord, data; ax=nothing, colorbar_place=nothing, xlabel=nothing,
      +        kwargs...)

      Make a 1d plot of data vs xcoord.

      xlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      If ax is passed, the plot will be added to that existing Axis, otherwise a new Figure and Axis will be created.

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Other kwargs are passed to Makie's lines!() function.

      If ax is not passed, returns the Figure, otherwise returns the object returned by lines!().

      source
      makie_post_processing.plot_2dMethod
      plot_2d(xcoord, ycoord, data; ax=nothing, colorbar_place=nothing, xlabel=nothing,
               ylabel=nothing, title=nothing, colormap="reverse_deep",
               colorscale=nothing, transform=identity, axis_args=Dict{Symbol,Any}(),
      -        kwargs...)

      Make a 2d plot of data vs xcoord and ycoord.

      xlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      If ax is passed, the plot will be added to that existing Axis, otherwise a new Figure and Axis will be created.

      colormap is included explicitly because we do some special handling so that extra Makie functionality can be specified by a prefix to the colormap string, rather than the standard Makie mechanism of creating a struct that modifies the colormap. For example Reverse("deep") can be passed as "reverse_deep". This is useful so that these extra colormaps can be specified in an input file, but is not needed for interactive use.

      When xcoord and ycoord are both one-dimensional, uses Makie's heatmap!() function for the plot. If either or both of xcoord and ycoord are two-dimensional, instead uses irregular_heatmap!.

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Other kwargs are passed to Makie's heatmap!() function.

      If ax is not passed, returns the Figure, otherwise returns the object returned by heatmap!().

      source
      makie_post_processing.plot_charged_pdf_2D_at_wallMethod
      plot_charged_pdf_2D_at_wall(run_info; plot_prefix, electron=false)

      Make plots/animations of the ion distribution function at wall boundaries.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots/animations from the different runs are overlayed on the same axis, and heatmap plots/animations are displayed in a horizontal row.

      Settings are read from the [wall_pdf] section of the input.

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf. When run_info is not a Tuple, plot_prefix is optional - plots/animations will be saved only if it is passed.

      If electron=true is passed, plot electron distribution function instead of ion distribution function.

      source
      makie_post_processing.plot_f_unnorm_vs_vpaFunction
      plot_f_unnorm_vs_vpa(run_info; input=nothing, electron=false, neutral=false,
      -                     it=nothing, is=1, iz=nothing, fig=nothing, ax=nothing,
      -                     outfile=nothing, yscale=identity, transform=identity,
      -                     axis_args=Dict{Symbol,Any}(), kwargs...)

      Plot an unnormalized distribution function against $v_\parallel$ at a fixed z.

      This function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are overlayed on the same axis.

      By default plots the ion distribution function. If electron=true is passed, plots the electron distribution function instead. If neutral=true is passed, plots the neutral distribution function instead.

      is selects which species to analyse.

      it and iz specify the indices of the time- and z-points to choose. By default they are taken from input.

      If input is not passed, it is taken from input_dict_dfns["f"].

      The data needed will be loaded from file.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      When run_info is not a Tuple, an Axis can be passed to ax to have the plot added to ax. When ax is passed, if outfile is passed to save the plot, then the Figure containing ax must be passed to fig.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Any extra kwargs are passed to plot_1d.

      source
      makie_post_processing.plot_f_unnorm_vs_vpa_zFunction
      plot_f_unnorm_vs_vpa_z(run_info; input=nothing, electron=false, neutral=false,
      -                       it=nothing, is=1, fig=nothing, ax=nothing, outfile=nothing,
      -                       yscale=identity, transform=identity, rasterize=true,
      -                       subtitles=nothing, axis_args=Dict{Symbol,Any}(), kwargs...)

      Plot unnormalized distribution function against $v_\parallel$ and z.

      This function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are displayed in a horizontal row.

      By default plots the ion distribution function. If electron=true is passed, plots the electron distribution function instead. If neutral=true is passed, plots the neutral distribution function instead.

      is selects which species to analyse.

      it specifies the time-index to choose. By default it is taken from input.

      If input is not passed, it is taken from input_dict_dfns["f"].

      The data needed will be loaded from file.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      When run_info is not a Tuple, an Axis can be passed to ax to have the plot created in ax. When ax is passed, if outfile is passed to save the plot, then the Figure containing ax must be passed to fig.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      rasterize is passed through to Makie's mesh!() function. The default is to rasterize plots as vectorized plots from mesh!() have a very large file size. Pass false to keep plots vectorized. Pass a number to increase the resolution of the rasterized plot by that factor.

      When run_info is a Tuple, subtitles can be passed a Tuple (with the same length as run_info) to set the subtitle for each subplot.

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Any extra kwargs are passed to plot_2d.

      source
      makie_post_processing.plot_neutral_pdf_2D_at_wallMethod
      plot_neutral_pdf_2D_at_wall(run_info; plot_prefix)

      Make plots/animations of the neutral particle distribution function at wall boundaries.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots/animations from the different runs are overlayed on the same axis, and heatmap plots/animations are displayed in a horizontal row.

      Settings are read from the [wall_pdf_neutral] section of the input.

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf. When run_info is not a Tuple, plot_prefix is optional - plots/animations will be saved only if it is passed.

      source
      makie_post_processing.plot_vs_rFunction
      plot_vs_r(run_info::Tuple, var_name; is=1, data=nothing,
      +        kwargs...)

      Make a 2d plot of data vs xcoord and ycoord.

      xlabel, ylabel and title can be passed to set axis labels and title for the (sub-)plot.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      If ax is passed, the plot will be added to that existing Axis, otherwise a new Figure and Axis will be created.

      colormap is included explicitly because we do some special handling so that extra Makie functionality can be specified by a prefix to the colormap string, rather than the standard Makie mechanism of creating a struct that modifies the colormap. For example Reverse("deep") can be passed as "reverse_deep". This is useful so that these extra colormaps can be specified in an input file, but is not needed for interactive use.

      When xcoord and ycoord are both one-dimensional, uses Makie's heatmap!() function for the plot. If either or both of xcoord and ycoord are two-dimensional, instead uses irregular_heatmap!.

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Other kwargs are passed to Makie's heatmap!() function.

      If ax is not passed, returns the Figure, otherwise returns the object returned by heatmap!().

      source
      makie_post_processing.plot_charged_pdf_2D_at_wallMethod
      plot_charged_pdf_2D_at_wall(run_info; plot_prefix, electron=false)

      Make plots/animations of the ion distribution function at wall boundaries.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots/animations from the different runs are overlayed on the same axis, and heatmap plots/animations are displayed in a horizontal row.

      Settings are read from the [wall_pdf] section of the input.

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf. When run_info is not a Tuple, plot_prefix is optional - plots/animations will be saved only if it is passed.

      If electron=true is passed, plot electron distribution function instead of ion distribution function.

      source
      makie_post_processing.plot_f_unnorm_vs_vpaFunction
      plot_f_unnorm_vs_vpa(run_info; input=nothing, neutral=false, it=nothing, is=1,
      +                     iz=nothing, fig=nothing, ax=nothing, outfile=nothing,
      +                     yscale=identity, transform=identity,
      +                     axis_args=Dict{Symbol,Any}(), kwargs...)

      Plot an unnormalized distribution function against $v_\parallel$ at a fixed z.

      This function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are overlayed on the same axis.

      By default plots the ion distribution function. If neutrals=true is passed, plots the neutral distribution function instead.

      is selects which species to analyse.

      it and iz specify the indices of the time- and z-points to choose. By default they are taken from input.

      If input is not passed, it is taken from input_dict_dfns["f"].

      The data needed will be loaded from file.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      When run_info is not a Tuple, an Axis can be passed to ax to have the plot added to ax. When ax is passed, if outfile is passed to save the plot, then the Figure containing ax must be passed to fig.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Any extra kwargs are passed to plot_1d.

      source
      makie_post_processing.plot_f_unnorm_vs_vpa_zFunction
      plot_f_unnorm_vs_vpa_z(run_info; input=nothing, neutral=false, it=nothing, is=1,
      +                       fig=nothing, ax=nothing, outfile=nothing, yscale=identity,
      +                       transform=identity, rasterize=true, subtitles=nothing,
      +                       axis_args=Dict{Symbol,Any}(), kwargs...)

      Plot unnormalized distribution function against $v_\parallel$ and z.

      This function is only needed for moment-kinetic runs. These are currently only supported for the 1D1V case.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where plots from the different runs are displayed in a horizontal row.

      By default plots the ion distribution function. If neutrals=true is passed, plots the neutral distribution function instead.

      is selects which species to analyse.

      it specifies the time-index to choose. By default it is taken from input.

      If input is not passed, it is taken from input_dict_dfns["f"].

      The data needed will be loaded from file.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      When run_info is not a Tuple, an Axis can be passed to ax to have the plot created in ax. When ax is passed, if outfile is passed to save the plot, then the Figure containing ax must be passed to fig.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      rasterize is passed through to Makie's mesh!() function. The default is to rasterize plots as vectorized plots from mesh!() have a very large file size. Pass false to keep plots vectorized. Pass a number to increase the resolution of the rasterized plot by that factor.

      When run_info is a Tuple, subtitles can be passed a Tuple (with the same length as run_info) to set the subtitle for each subplot.

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Any extra kwargs are passed to plot_2d.

      source
      makie_post_processing.plot_neutral_pdf_2D_at_wallMethod
      plot_neutral_pdf_2D_at_wall(run_info; plot_prefix)

      Make plots/animations of the neutral particle distribution function at wall boundaries.

      The information for the runs to plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots/animations from the different runs are overlayed on the same axis, and heatmap plots/animations are displayed in a horizontal row.

      Settings are read from the [wall_pdf_neutral] section of the input.

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf. When run_info is not a Tuple, plot_prefix is optional - plots/animations will be saved only if it is passed.

      source
      makie_post_processing.plot_vs_rFunction
      plot_vs_r(run_info::Tuple, var_name; is=1, data=nothing,
                 input=nothing, outfile=nothing, yscale=nothing,
       transform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,
                 ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,
      @@ -338,7 +338,7 @@
                 outfile=nothing, yscale=nothing, transform=identity,
                 axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                 iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -          ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs r.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_r_tFunction
      plot_vs_r_t(run_info::Tuple, var_name; is=1, data=nothing,
      +          ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs r.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_r_tFunction
      plot_vs_r_t(run_info::Tuple, var_name; is=1, data=nothing,
                   input=nothing, outfile=nothing, colorscale=identity,
                   transform=identity, axis_args=Dict{Symbol,Any}(),
                   it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -350,7 +350,7 @@
                   outfile=nothing, colorscale=identity, transform=identity,
                   axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                   iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -            ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and r.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_tFunction
      plot_vs_t(run_info::Tuple, var_name; is=1, data=nothing,
      +            ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and r.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_tFunction
      plot_vs_t(run_info::Tuple, var_name; is=1, data=nothing,
                 input=nothing, outfile=nothing, yscale=nothing,
       transform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,
                 ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,
      @@ -360,7 +360,7 @@
                 outfile=nothing, yscale=nothing, transform=identity,
                 axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                 iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -          ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs t.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vpaFunction
      plot_vs_vpa(run_info::Tuple, var_name; is=1, data=nothing,
      +          ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs t.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vpaFunction
      plot_vs_vpa(run_info::Tuple, var_name; is=1, data=nothing,
                   input=nothing, outfile=nothing, yscale=nothing,
       transform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,
                   ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,
      @@ -370,7 +370,7 @@
                   outfile=nothing, yscale=nothing, transform=identity,
                   axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                   iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -            ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vpa.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vpa_rFunction
      plot_vs_vpa_r(run_info::Tuple, var_name; is=1, data=nothing,
      +            ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vpa.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vpa_rFunction
      plot_vs_vpa_r(run_info::Tuple, var_name; is=1, data=nothing,
                     input=nothing, outfile=nothing, colorscale=identity,
                     transform=identity, axis_args=Dict{Symbol,Any}(),
                     it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -382,7 +382,7 @@
                     outfile=nothing, colorscale=identity, transform=identity,
                     axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                     iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -              ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vpa.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vpa_tFunction
      plot_vs_vpa_t(run_info::Tuple, var_name; is=1, data=nothing,
      +              ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vpa.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vpa_tFunction
      plot_vs_vpa_t(run_info::Tuple, var_name; is=1, data=nothing,
                     input=nothing, outfile=nothing, colorscale=identity,
                     transform=identity, axis_args=Dict{Symbol,Any}(),
                     it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -394,7 +394,7 @@
                     outfile=nothing, colorscale=identity, transform=identity,
                     axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                     iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -              ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vpa.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vpa_vperpFunction
      plot_vs_vpa_vperp(run_info::Tuple, var_name; is=1, data=nothing,
      +              ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vpa.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vpa_vperpFunction
      plot_vs_vpa_vperp(run_info::Tuple, var_name; is=1, data=nothing,
                         input=nothing, outfile=nothing, colorscale=identity,
                         transform=identity, axis_args=Dict{Symbol,Any}(),
                         it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -406,7 +406,7 @@
                         outfile=nothing, colorscale=identity, transform=identity,
                         axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                         iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -                  ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vperp and vpa.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vpa_zFunction
      plot_vs_vpa_z(run_info::Tuple, var_name; is=1, data=nothing,
      +                  ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vperp and vpa.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vpa_zFunction
      plot_vs_vpa_z(run_info::Tuple, var_name; is=1, data=nothing,
                     input=nothing, outfile=nothing, colorscale=identity,
                     transform=identity, axis_args=Dict{Symbol,Any}(),
                     it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -418,7 +418,7 @@
                     outfile=nothing, colorscale=identity, transform=identity,
                     axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                     iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -              ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vpa.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vperpFunction
      plot_vs_vperp(run_info::Tuple, var_name; is=1, data=nothing,
      +              ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vpa.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vperpFunction
      plot_vs_vperp(run_info::Tuple, var_name; is=1, data=nothing,
                     input=nothing, outfile=nothing, yscale=nothing,
       transform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,
                     ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,
      @@ -428,7 +428,7 @@
                     outfile=nothing, yscale=nothing, transform=identity,
                     axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                     iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -              ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vperp.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vperp_rFunction
      plot_vs_vperp_r(run_info::Tuple, var_name; is=1, data=nothing,
      +              ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vperp.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vperp_rFunction
      plot_vs_vperp_r(run_info::Tuple, var_name; is=1, data=nothing,
                       input=nothing, outfile=nothing, colorscale=identity,
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -440,7 +440,7 @@
                       outfile=nothing, colorscale=identity, transform=identity,
                       axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                       iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -                ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vperp.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vperp_tFunction
      plot_vs_vperp_t(run_info::Tuple, var_name; is=1, data=nothing,
      +                ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vperp.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vperp_tFunction
      plot_vs_vperp_t(run_info::Tuple, var_name; is=1, data=nothing,
                       input=nothing, outfile=nothing, colorscale=identity,
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -452,7 +452,7 @@
                       outfile=nothing, colorscale=identity, transform=identity,
                       axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                       iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -                ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vperp.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vperp_zFunction
      plot_vs_vperp_z(run_info::Tuple, var_name; is=1, data=nothing,
      +                ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vperp.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vperp_zFunction
      plot_vs_vperp_z(run_info::Tuple, var_name; is=1, data=nothing,
                       input=nothing, outfile=nothing, colorscale=identity,
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -464,7 +464,7 @@
                       outfile=nothing, colorscale=identity, transform=identity,
                       axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                       iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -                ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vperp.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vrFunction
      plot_vs_vr(run_info::Tuple, var_name; is=1, data=nothing,
      +                ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vperp.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vrFunction
      plot_vs_vr(run_info::Tuple, var_name; is=1, data=nothing,
                  input=nothing, outfile=nothing, yscale=nothing,
       transform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,
                  ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,
      @@ -474,7 +474,7 @@
                  outfile=nothing, yscale=nothing, transform=identity,
                  axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                  iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -           ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vr.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vr_rFunction
      plot_vs_vr_r(run_info::Tuple, var_name; is=1, data=nothing,
      +           ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vr.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vr_rFunction
      plot_vs_vr_r(run_info::Tuple, var_name; is=1, data=nothing,
                    input=nothing, outfile=nothing, colorscale=identity,
                    transform=identity, axis_args=Dict{Symbol,Any}(),
                    it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -486,7 +486,7 @@
                    outfile=nothing, colorscale=identity, transform=identity,
                    axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                    iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -             ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vr.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vr_tFunction
      plot_vs_vr_t(run_info::Tuple, var_name; is=1, data=nothing,
      +             ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vr.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vr_tFunction
      plot_vs_vr_t(run_info::Tuple, var_name; is=1, data=nothing,
                    input=nothing, outfile=nothing, colorscale=identity,
                    transform=identity, axis_args=Dict{Symbol,Any}(),
                    it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -498,7 +498,7 @@
                    outfile=nothing, colorscale=identity, transform=identity,
                    axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                    iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -             ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vr.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vr_vzetaFunction
      plot_vs_vr_vzeta(run_info::Tuple, var_name; is=1, data=nothing,
      +             ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vr.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vr_vzetaFunction
      plot_vs_vr_vzeta(run_info::Tuple, var_name; is=1, data=nothing,
                        input=nothing, outfile=nothing, colorscale=identity,
                        transform=identity, axis_args=Dict{Symbol,Any}(),
                        it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -510,7 +510,7 @@
                        outfile=nothing, colorscale=identity, transform=identity,
                        axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                        iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -                 ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vr.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vr_zFunction
      plot_vs_vr_z(run_info::Tuple, var_name; is=1, data=nothing,
      +                 ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vr.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vr_zFunction
      plot_vs_vr_z(run_info::Tuple, var_name; is=1, data=nothing,
                    input=nothing, outfile=nothing, colorscale=identity,
                    transform=identity, axis_args=Dict{Symbol,Any}(),
                    it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -522,7 +522,7 @@
                    outfile=nothing, colorscale=identity, transform=identity,
                    axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                    iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -             ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vr.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vzFunction
      plot_vs_vz(run_info::Tuple, var_name; is=1, data=nothing,
      +             ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vr.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vzFunction
      plot_vs_vz(run_info::Tuple, var_name; is=1, data=nothing,
                  input=nothing, outfile=nothing, yscale=nothing,
       transform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,
                  ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,
      @@ -532,7 +532,7 @@
                  outfile=nothing, yscale=nothing, transform=identity,
                  axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                  iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -           ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vz.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vz_rFunction
      plot_vs_vz_r(run_info::Tuple, var_name; is=1, data=nothing,
      +           ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vz.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vz_rFunction
      plot_vs_vz_r(run_info::Tuple, var_name; is=1, data=nothing,
                    input=nothing, outfile=nothing, colorscale=identity,
                    transform=identity, axis_args=Dict{Symbol,Any}(),
                    it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -544,7 +544,7 @@
                    outfile=nothing, colorscale=identity, transform=identity,
                    axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                    iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -             ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vz.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vz_tFunction
      plot_vs_vz_t(run_info::Tuple, var_name; is=1, data=nothing,
      +             ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vz.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vz_tFunction
      plot_vs_vz_t(run_info::Tuple, var_name; is=1, data=nothing,
                    input=nothing, outfile=nothing, colorscale=identity,
                    transform=identity, axis_args=Dict{Symbol,Any}(),
                    it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -556,7 +556,7 @@
                    outfile=nothing, colorscale=identity, transform=identity,
                    axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                    iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -             ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vz.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vz_vrFunction
      plot_vs_vz_vr(run_info::Tuple, var_name; is=1, data=nothing,
      +             ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vz.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vz_vrFunction
      plot_vs_vz_vr(run_info::Tuple, var_name; is=1, data=nothing,
                     input=nothing, outfile=nothing, colorscale=identity,
                     transform=identity, axis_args=Dict{Symbol,Any}(),
                     it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -568,7 +568,7 @@
                     outfile=nothing, colorscale=identity, transform=identity,
                     axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                     iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -              ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vr and vz.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vz_vzetaFunction
      plot_vs_vz_vzeta(run_info::Tuple, var_name; is=1, data=nothing,
      +              ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vr and vz.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vz_vzetaFunction
      plot_vs_vz_vzeta(run_info::Tuple, var_name; is=1, data=nothing,
                        input=nothing, outfile=nothing, colorscale=identity,
                        transform=identity, axis_args=Dict{Symbol,Any}(),
                        it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -580,7 +580,7 @@
                        outfile=nothing, colorscale=identity, transform=identity,
                        axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                        iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -                 ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vz.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vz_zFunction
      plot_vs_vz_z(run_info::Tuple, var_name; is=1, data=nothing,
      +                 ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs vzeta and vz.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vz_zFunction
      plot_vs_vz_z(run_info::Tuple, var_name; is=1, data=nothing,
                    input=nothing, outfile=nothing, colorscale=identity,
                    transform=identity, axis_args=Dict{Symbol,Any}(),
                    it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -592,7 +592,7 @@
                    outfile=nothing, colorscale=identity, transform=identity,
                    axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                    iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -             ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vz.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vzetaFunction
      plot_vs_vzeta(run_info::Tuple, var_name; is=1, data=nothing,
      +             ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vz.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vzetaFunction
      plot_vs_vzeta(run_info::Tuple, var_name; is=1, data=nothing,
                     input=nothing, outfile=nothing, yscale=nothing,
       transform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,
                     ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,
      @@ -602,7 +602,7 @@
                     outfile=nothing, yscale=nothing, transform=identity,
                     axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                     iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -              ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vzeta.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vzeta_rFunction
      plot_vs_vzeta_r(run_info::Tuple, var_name; is=1, data=nothing,
      +              ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs vzeta.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vzeta_rFunction
      plot_vs_vzeta_r(run_info::Tuple, var_name; is=1, data=nothing,
                       input=nothing, outfile=nothing, colorscale=identity,
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -614,7 +614,7 @@
                       outfile=nothing, colorscale=identity, transform=identity,
                       axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                       iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -                ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vzeta.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vzeta_tFunction
      plot_vs_vzeta_t(run_info::Tuple, var_name; is=1, data=nothing,
      +                ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and vzeta.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vzeta_tFunction
      plot_vs_vzeta_t(run_info::Tuple, var_name; is=1, data=nothing,
                       input=nothing, outfile=nothing, colorscale=identity,
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -626,7 +626,7 @@
                       outfile=nothing, colorscale=identity, transform=identity,
                       axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                       iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -                ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vzeta.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vzeta_zFunction
      plot_vs_vzeta_z(run_info::Tuple, var_name; is=1, data=nothing,
      +                ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and vzeta.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_vzeta_zFunction
      plot_vs_vzeta_z(run_info::Tuple, var_name; is=1, data=nothing,
                       input=nothing, outfile=nothing, colorscale=identity,
                       transform=identity, axis_args=Dict{Symbol,Any}(),
                       it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -638,7 +638,7 @@
                       outfile=nothing, colorscale=identity, transform=identity,
                       axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                       iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -                ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vzeta.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_zFunction
      plot_vs_z(run_info::Tuple, var_name; is=1, data=nothing,
      +                ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs z and vzeta.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_zFunction
      plot_vs_z(run_info::Tuple, var_name; is=1, data=nothing,
                 input=nothing, outfile=nothing, yscale=nothing,
       transform=identity, axis_args=Dict{Symbol,Any}(), it=nothing,
                 ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,
      @@ -648,7 +648,7 @@
                 outfile=nothing, yscale=nothing, transform=identity,
                 axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                 iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -          ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs z.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_z_rFunction
      plot_vs_z_r(run_info::Tuple, var_name; is=1, data=nothing,
      +          ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info) vs z.

      If a Tuple of run_info is passed, the plots from each run are overlayed on the same axis, and a legend is added.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      yscale can be used to set the scaling function for the y-axis. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_1d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's lines!() function.

      When a single run_info is passed, label can be used to set the label for the line created by this plot, which would be used if it is added to a Legend.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's lines!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_z_rFunction
      plot_vs_z_r(run_info::Tuple, var_name; is=1, data=nothing,
                   input=nothing, outfile=nothing, colorscale=identity,
                   transform=identity, axis_args=Dict{Symbol,Any}(),
                   it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -660,7 +660,7 @@
                   outfile=nothing, colorscale=identity, transform=identity,
                   axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                   iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -            ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and z.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_z_tFunction
      plot_vs_z_t(run_info::Tuple, var_name; is=1, data=nothing,
      +            ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs r and z.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plot_vs_z_tFunction
      plot_vs_z_t(run_info::Tuple, var_name; is=1, data=nothing,
                   input=nothing, outfile=nothing, colorscale=identity,
                   transform=identity, axis_args=Dict{Symbol,Any}(),
                   it=nothing, ir=nothing, iz=nothing, ivperp=nothing,
      @@ -672,15 +672,15 @@
                   outfile=nothing, colorscale=identity, transform=identity,
                   axis_args=Dict{Symbol,Any}(), it=nothing, ir=nothing,
                   iz=nothing, ivperp=nothing, ivpa=nothing, ivzeta=nothing,
      -            ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and z.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plots_for_dfn_variableMethod
      plots_for_dfn_variable(run_info, variable_name; plot_prefix, has_rdim=true,
      -                       has_zdim=true, is_1V=false)

      Make plots for the distribution function variable variable_name.

      Which plots to make are determined by the settings in the section of the input whose heading is the variable name.

      run_info is the information returned by get_run_info(). The dfns=true keyword argument must have been passed to get_run_info() so that output files containing the distribution functions are being read.

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      has_rdim, has_zdim and/or is_1V can be passed to allow the function to skip some plots that do not make sense for 0D/1D or 1V simulations (regardless of the settings).

      source
      makie_post_processing.plots_for_variableMethod
      plots_for_variable(run_info, variable_name; plot_prefix, has_rdim=true,
      +            ivr=nothing, ivz=nothing, kwargs...)

      Plot var_name from the run(s) represented by run_info (as returned by get_run_info)vs t and z.

      If a Tuple of run_info is passed, the plots from each run are displayed in a horizontal row, and the subtitle for each subplot is the 'run name'.

      it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, and ivz can be used to select different indices (for non-plotted dimensions) or range (for the plotted dimension) to use.

      If outfile is given, the plot will be saved to a file with that name. The suffix determines the file type.

      colorscale can be used to set the scaling function for the colors. Options are identity, log, log2, log10, sqrt, Makie.logit, Makie.pseudolog10 and Makie.Symlog10. transform is a function that is applied element-by-element to the data before it is plotted. For example when using a log scale on data that may contain some negative values it might be useful to pass transform=abs (to plot the absolute value) or transform=positive_or_nan (to ignore any negative or zero values).

      axis_args are passed as keyword arguments to get_2d_ax(), and from there to the Axis constructor.

      Extra kwargs are passed to Makie's heatmap!() function.

      When a single run_info is passed, title can be used to set the title for the (sub-)plot.

      When a single run_info is passed, an Axis can be passed to ax. If it is, the plot will be added to ax. A colorbar will be created in colorbar_place if it is given a GridPosition.

      By default the data for the variable is loaded from the output represented by run_info. The data can optionally be passed to data if you have already loaded it.

      Returns the Figure, unless ax was passed in which case the object returned by Makie's heatmap!() function is returned.

      By default relevant settings are read from the var_name section of input_dict_dfns (if output that has distribution functions is being read) or input_dict (otherwise). The settings can also be passed as an AbstractDict or NamedTuple via the input argument. Sometimes needed, for example if var_name is not present in input_dict (in which case you would have had to create the array to be plotted and pass it to data).

      source
      makie_post_processing.plots_for_dfn_variableMethod
      plots_for_dfn_variable(run_info, variable_name; plot_prefix, has_rdim=true,
      +                       has_zdim=true, is_1V=false)

      Make plots for the distribution function variable variable_name.

      Which plots to make are determined by the settings in the section of the input whose heading is the variable name.

      run_info is the information returned by get_run_info(). The dfns=true keyword argument must have been passed to get_run_info() so that output files containing the distribution functions are being read.

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      has_rdim, has_zdim and/or is_1V can be passed to allow the function to skip some plots that do not make sense for 0D/1D or 1V simulations (regardless of the settings).

      source
      makie_post_processing.plots_for_variableMethod
      plots_for_variable(run_info, variable_name; plot_prefix, has_rdim=true,
                          has_zdim=true, is_1V=false,
      -                   steady_state_residual_fig_axes=nothing)

      Make plots for the EM field or moment variable variable_name.

      Which plots to make are determined by the settings in the section of the input whose heading is the variable name.

      run_info is the information returned by get_run_info.

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      has_rdim, has_zdim and/or is_1V can be passed to allow the function to skip some plots that do not make sense for 0D/1D or 1V simulations (regardless of the settings).

      steady_state_residual_fig_axes contains the figure, axes and legend places for steady state residual plots.

      source
      makie_post_processing.positive_or_nanMethod
      positive_or_nan(x; epsilon=0)

      If the argument x is zero or negative, replace it with NaN, otherwise return x.

      epsilon can be passed if the number should be forced to be above some value (typically we would assume epsilon is small and positive, but nothing about this function forces it to be).

      source
      makie_post_processing.put_legend_aboveMethod

      putlegendabove(fig, ax; kwargs...)

      Add a legend corresponding to the plot in ax to fig on the left of a new row at the top of the figure layout.

      Additional kwargs are passed to the Legend() constructor.

      source
      makie_post_processing.put_legend_belowMethod

      putlegendbelow(fig, ax; kwargs...)

      Add a legend corresponding to the plot in ax to fig on the left of a new row at the bottom of the figure layout.

      Additional kwargs are passed to the Legend() constructor.

      source
      makie_post_processing.put_legend_leftMethod

      putlegendleft(fig, ax; kwargs...)

      Add a legend corresponding to the plot in ax to fig on the bottom of a new column at the left of the figure layout.

      Additional kwargs are passed to the Legend() constructor.

      source
      makie_post_processing.put_legend_rightMethod

      putlegendright(fig, ax; kwargs...)

      Add a legend corresponding to the plot in ax to fig on the bottom of a new column at the right of the figure layout.

      Additional kwargs are passed to the Legend() constructor.

      source
      makie_post_processing.save_animationMethod
      save_animation(fig, frame_index, nt, outfile)

      Animate fig and save the result in outfile.

      frame_index is the Observable{mk_int} that updates the data used to make fig to a new time point. nt is the total number of time points to create.

      The suffix of outfile determines the file type.

      source
      makie_post_processing.select_sliceFunction
      select_slice(variable::AbstractArray, dims::Symbol...; input=nothing, it=nothing,
      +                   steady_state_residual_fig_axes=nothing)

      Make plots for the EM field or moment variable variable_name.

      Which plots to make are determined by the settings in the section of the input whose heading is the variable name.

      run_info is the information returned by get_run_info.

      plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf for plots and plot_prefix<some_identifying_string>.gif, etc. for animations.

      has_rdim, has_zdim and/or is_1V can be passed to allow the function to skip some plots that do not make sense for 0D/1D or 1V simulations (regardless of the settings).

      steady_state_residual_fig_axes contains the figure, axes and legend places for steady state residual plots.

      source
      makie_post_processing.positive_or_nanMethod
      positive_or_nan(x; epsilon=0)

      If the argument x is zero or negative, replace it with NaN, otherwise return x.

      epsilon can be passed if the number should be forced to be above some value (typically we would assume epsilon is small and positive, but nothing about this function forces it to be).

      source
      makie_post_processing.put_legend_aboveMethod

      putlegendabove(fig, ax; kwargs...)

      Add a legend corresponding to the plot in ax to fig on the left of a new row at the top of the figure layout.

      Additional kwargs are passed to the Legend() constructor.

      source
      makie_post_processing.put_legend_belowMethod

      putlegendbelow(fig, ax; kwargs...)

      Add a legend corresponding to the plot in ax to fig on the left of a new row at the bottom of the figure layout.

      Additional kwargs are passed to the Legend() constructor.

      source
      makie_post_processing.put_legend_leftMethod

      putlegendleft(fig, ax; kwargs...)

      Add a legend corresponding to the plot in ax to fig on the bottom of a new column at the left of the figure layout.

      Additional kwargs are passed to the Legend() constructor.

      source
      makie_post_processing.put_legend_rightMethod

      putlegendright(fig, ax; kwargs...)

      Add a legend corresponding to the plot in ax to fig on the bottom of a new column at the right of the figure layout.

      Additional kwargs are passed to the Legend() constructor.

      source
      makie_post_processing.save_animationMethod
      save_animation(fig, frame_index, nt, outfile)

      Animate fig and save the result in outfile.

      frame_index is the Observable{mk_int} that updates the data used to make fig to a new time point. nt is the total number of time points to create.

      The suffix of outfile determines the file type.

      source
      makie_post_processing.select_sliceFunction
      select_slice(variable::AbstractArray, dims::Symbol...; input=nothing, it=nothing,
                    is=1, ir=nothing, iz=nothing, ivperp=nothing, ivpa=nothing,
      -             ivzeta=nothing, ivr=nothing, ivz=nothing)

      Returns a slice of variable that includes only the dimensions given in dims..., e.g.

      select_slice(variable, :t, :r)

      to get a two dimensional slice with t- and r-dimensions.

      Any other dimensions present in variable have a single point selected. By default this point is set by the options in input (which must be a NamedTuple) (or the final point for time or the size of the dimension divided by 3 if input is not given). These defaults can be overridden using the keyword arguments it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, ivz. Ranges can also be passed to these keyword arguments for the 'kept dimensions' in dims to select a subset of those dimensions.

      This function only recognises what the dimensions of variable are by the number of dimensions in the array. It assumes that either the variable has already been sliced to the correct dimensions (if ndims(variable) == length(dims) it just returns variable) or that variable has the full number of dimensions it could have (i.e. 'field' variables have 3 dimensions, 'moment' variables 4, 'ion distribution function' variables 6 and 'neutral distribution function' variables 7).

      source
      makie_post_processing.setup_makie_post_processing_input!Function
      setup_makie_post_processing_input!(input_file::Union{AbstractString,Nothing}=nothing;
      +             ivzeta=nothing, ivr=nothing, ivz=nothing)

      Returns a slice of variable that includes only the dimensions given in dims..., e.g.

      select_slice(variable, :t, :r)

      to get a two dimensional slice with t- and r-dimensions.

      Any other dimensions present in variable have a single point selected. By default this point is set by the options in input (which must be a NamedTuple) (or the final point for time or the size of the dimension divided by 3 if input is not given). These defaults can be overridden using the keyword arguments it, is, ir, iz, ivperp, ivpa, ivzeta, ivr, ivz. Ranges can also be passed to these keyword arguments for the 'kept dimensions' in dims to select a subset of those dimensions.

      This function only recognises what the dimensions of variable are by the number of dimensions in the array. It assumes that either the variable has already been sliced to the correct dimensions (if ndims(variable) == length(dims) it just returns variable) or that variable has the full number of dimensions it could have (i.e. 'field' variables have 3 dimensions, 'moment' variables 4, 'ion distribution function' variables 6 and 'neutral distribution function' variables 7).

      source
      makie_post_processing.setup_makie_post_processing_input!Function
      setup_makie_post_processing_input!(input_file::Union{AbstractString,Nothing}=nothing;
                                          run_info_moments=nothing, run_info_dfns=nothing,
                                          allow_missing_input_file=false)
       setup_makie_post_processing_input!(new_input_dict::AbstractDict{String,Any};
                                          run_info_moments=nothing,
      -                                   run_info_dfns=nothing)

      Pass input_file to read the input from an input file other than post_processing_input.toml. You can also pass a Dict{String,Any} of options.

      Set up input, storing in the global input_dict and input_dict_dfns to be used in the various plotting and analysis functions.

      The run_info that you are using (as returned by get_run_info) should be passed to run_info_moments (if it contains only the moments), or run_info_dfns (if it also contains the distributions functions), or both (if you have loaded both sets of output). This allows default values to be set based on the grid sizes and number of time points read from the output files. Note that setup_makie_post_processing_input!() is called by default at the end of get_run_info(), for conveinence in interactive use.

      By default an error is raised if input_file does not exist. To continue anyway, using default options, pass allow_missing_input_file=true.

      source
      makie_post_processing.sound_wave_plotsFunction
      sound_wave_plots(run_info::Tuple; plot_prefix)
      -sound_wave_plots(run_info; outfile=nothing, ax=nothing, phi=nothing)

      Calculate decay rate and frequency for the damped 'sound wave' in a 1D1V simulation in a periodic box. Plot the mode amplitude vs. time along with the fitted decay rate.

      The information for the runs to analyse and plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots from the different runs are overlayed on the same axis.

      Settings are read from the [sound_wave] section of the input.

      When run_info is a Tuple, plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf. When run_info is not a Tuple, outfile can be passed, to save the plot to outfile.

      When run_info is not a Tuple, ax can be passed to add the plot to an existing Axis.

      When run_info is not a Tuple, the array containing data for phi can be passed to phi - by default this data is loaded from the output file.

      source
      makie_post_processing.timestep_diagnosticsMethod
      timestep_diagnostics(run_info, run_info_dfns; plot_prefix=nothing, it=nothing)

      Plot a time-trace of some adaptive-timestep diagnostics: steps per output, timestep failures per output, how many times per output each variable caused a timestep failure, and which factor limited the length of successful timesteps (CFL, accuracy, max_timestep).

      If plot_prefix is passed, it gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix_timestep_diagnostics.pdf.

      it can be used to select a subset of the time points by passing a range.

      source
      + run_info_dfns=nothing)

      Pass input_file to read the input from an input file other than post_processing_input.toml. You can also pass a Dict{String,Any} of options.

      Set up input, storing in the global input_dict and input_dict_dfns to be used in the various plotting and analysis functions.

      The run_info that you are using (as returned by get_run_info) should be passed to run_info_moments (if it contains only the moments), or run_info_dfns (if it also contains the distributions functions), or both (if you have loaded both sets of output). This allows default values to be set based on the grid sizes and number of time points read from the output files. Note that setup_makie_post_processing_input!() is called by default at the end of get_run_info(), for conveinence in interactive use.

      By default an error is raised if input_file does not exist. To continue anyway, using default options, pass allow_missing_input_file=true.

      source
      makie_post_processing.sound_wave_plotsFunction
      sound_wave_plots(run_info::Tuple; plot_prefix)
      +sound_wave_plots(run_info; outfile=nothing, ax=nothing, phi=nothing)

      Calculate decay rate and frequency for the damped 'sound wave' in a 1D1V simulation in a periodic box. Plot the mode amplitude vs. time along with the fitted decay rate.

      The information for the runs to analyse and plot is passed in run_info (as returned by get_run_info). If run_info is a Tuple, comparison plots are made where line plots from the different runs are overlayed on the same axis.

      Settings are read from the [sound_wave] section of the input.

      When run_info is a Tuple, plot_prefix is required and gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix<some_identifying_string>.pdf. When run_info is not a Tuple, outfile can be passed, to save the plot to outfile.

      When run_info is not a Tuple, ax can be passed to add the plot to an existing Axis.

      When run_info is not a Tuple, the array containing data for phi can be passed to phi - by default this data is loaded from the output file.

      source
      makie_post_processing.timestep_diagnosticsMethod
      timestep_diagnostics(run_info, run_info_dfns; plot_prefix=nothing, it=nothing)

      Plot a time-trace of some adaptive-timestep diagnostics: steps per output, timestep failures per output, how many times per output each variable caused a timestep failure, and which factor limited the length of successful timesteps (CFL, accuracy, max_timestep).

      If plot_prefix is passed, it gives the path and prefix for plots to be saved to. They will be saved with the format plot_prefix_timestep_diagnostics.pdf.

      it can be used to select a subset of the time points by passing a range.

      source
      diff --git a/dev/zz_manufactured_solns/index.html b/dev/zz_manufactured_solns/index.html index fbe77389fc..be37eec757 100644 --- a/dev/zz_manufactured_solns/index.html +++ b/dev/zz_manufactured_solns/index.html @@ -1,2 +1,2 @@ -manufactured_solns · moment_kinetics
      +manufactured_solns · moment_kinetics
      diff --git a/dev/zz_maxwell_diffusion/index.html b/dev/zz_maxwell_diffusion/index.html index f2b72969e8..10b617a41c 100644 --- a/dev/zz_maxwell_diffusion/index.html +++ b/dev/zz_maxwell_diffusion/index.html @@ -1,2 +1,2 @@ -maxwell_diffusion · moment_kinetics

      maxwell_diffusion

      +maxwell_diffusion · moment_kinetics

      maxwell_diffusion

      diff --git a/dev/zz_moment_constraints/index.html b/dev/zz_moment_constraints/index.html index 67454007aa..c543c7b8d2 100644 --- a/dev/zz_moment_constraints/index.html +++ b/dev/zz_moment_constraints/index.html @@ -1,6 +1,2 @@ -moment_constraints · moment_kinetics

      moment_constraints

      moment_kinetics.moment_constraintsModule

      Functions for enforcing integral constraints on the normalised distribution function. Ensures consistency of evolution split into moments and normalised distribution function.

      source
      moment_kinetics.moment_constraints.electron_implicit_constraint_forcing!Method
      electron_implicit_constraint_forcing!(f_out, f_in, constraint_forcing_rate, vpa,
      -                                      dt, ir)

      Add terms to the electron kinetic equation that force the moment constraints to be approximately satisfied. Needed to avoid large errors when taking large, implicit timesteps that do not guarantee accurate time evolution.

      source
      moment_kinetics.moment_constraints.hard_force_moment_constraints!Method
      hard_force_moment_constraints!(f, moments, vpa)

      Force the moment constraints needed for the system being evolved to be applied to f. Not guaranteed to be a small correction, if f does not approximately obey the constraints to start with, but can be useful at initialisation to ensure a consistent initial state, and when applying boundary conditions.

      Note this function assumes the input is given at a single spatial position.

      source
      moment_kinetics.moment_constraints.hard_force_moment_constraints_neutral!Method
      hard_force_moment_constraints_neutral!(f, moments, vz)

      Force the moment constraints needed for the system being evolved to be applied to f. Not guaranteed to be a small correction, if f does not approximately obey the constraints to start with, but can be useful at initialisation to ensure a consistent initial state, and when applying boundary conditions.

      Notes:

      • this function assumes the input is given at a single spatial position.
      • currently only works with '1V' runs, where vz is the only velocity-space dimension
      source
      moment_kinetics.moment_constraints.moment_constraints_on_residual!Method
      moment_constraints_on_residual!(residual, f, moments, vpa)

      A 'residual' (used in implicit timestepping) is an update to the distribution function $f_\mathrm{new} = f_\mathrm{old} + \mathtt{residual}$. $f_\mathrm{new}$ should obey the moment constraints (Constraints on normalized distribution function), and $f_\mathrm{old}$ already obeys the constraints, which means that the first 3 moments of residual should be zero. We impose this constraint by adding corrections proportional to f.

      \[r = \hat{r} + (A + B w_{\|} + C w_{\|}^2) f\]

      Note this function assumes the input is given at a single spatial position.

      source
      +moment_constraints · moment_kinetics

      moment_constraints

      moment_kinetics.moment_constraintsModule

      Functions for enforcing integral constraints on the normalised distribution function. Ensures consistency of evolution split into moments and normalised distribution function.

      source
      moment_kinetics.moment_constraints.hard_force_moment_constraints!Method
      hard_force_moment_constraints!(f, moments, vpa)

      Force the moment constraints needed for the system being evolved to be applied to f. Not guaranteed to be a small correction, if f does not approximately obey the constraints to start with, but can be useful at initialisation to ensure a consistent initial state, and when applying boundary conditions.

      Note this function assumes the input is given at a single spatial position.

      source
      moment_kinetics.moment_constraints.hard_force_moment_constraints_neutral!Method
      hard_force_moment_constraints_neutral!(f, moments, vz)

      Force the moment constraints needed for the system being evolved to be applied to f. Not guaranteed to be a small correction, if f does not approximately obey the constraints to start with, but can be useful at initialisation to ensure a consistent initial state, and when applying boundary conditions.

      Notes:

      • this function assumes the input is given at a single spatial position.
      • currently only works with '1V' runs, where vz is the only velocity-space dimension
      source
      moment_kinetics.moment_constraints.moment_constraints_on_residual!Method
      moment_constraints_on_residual!(residual, f, moments, vpa)

      A 'residual' (used in implicit timestepping) is an update to the distribution function $f_\mathrm{new} = f_\mathrm{old} + \mathtt{residual}$. $f_\mathrm{new}$ should obey the moment constraints (Constraints on normalized distribution function), and $f_\mathrm{old}$ already obeys the constraints, which means that the first 3 moments of residual should be zero. We impose this constraint by adding corrections proportional to f.

      \[r = \hat{r} + (A + B w_{\|} + C w_{\|}^2) f\]

      Note this function assumes the input is given at a single spatial position.

      source
      diff --git a/dev/zz_moment_kinetics/index.html b/dev/zz_moment_kinetics/index.html index 6075f7c18a..a7910b75e2 100644 --- a/dev/zz_moment_kinetics/index.html +++ b/dev/zz_moment_kinetics/index.html @@ -1,2 +1,2 @@ -moment_kinetics · moment_kinetics

      moment_kinetics

      moment_kinetics.check_so_newer_than_codeFunction
      check_so_newer_than_code(so_filename=nothing)

      Utility function that checks if so_filename is newer than the source code in moment_kinetics/src. If it is, prints an error message and returns false; otherwise returns true.

      If so_filename is nothing, use the name of the system image of the current julia session for so_filename.

      If so_filename is "makie_postproc.so", also checks against the source code in makie_post_processing/makie_post_processing/src/.

      If so_filename is "plots_postproc.so", also checks against the source code in plots_post_processing/plots_post_processing/src/.

      source
      moment_kinetics.setup_moment_kineticsMethod

      Perform all the initialization steps for a run.

      If backup_filename is nothing, set up for a regular run; if a filename is passed, reload data from time index given by restart_time_index for a restart.

      debug_loop_type and debug_loop_parallel_dims are used to force specific set ups for parallel loop ranges, and are only used by the tests in debug_test/.

      source
      +moment_kinetics · moment_kinetics

      moment_kinetics

      moment_kinetics.check_so_newer_than_codeFunction
      check_so_newer_than_code(so_filename=nothing)

      Utility function that checks if so_filename is newer than the source code in moment_kinetics/src. If it is, prints an error message and returns false; otherwise returns true.

      If so_filename is nothing, use the name of the system image of the current julia session for so_filename.

      If so_filename is "makie_postproc.so", also checks against the source code in makie_post_processing/makie_post_processing/src/.

      If so_filename is "plots_postproc.so", also checks against the source code in plots_post_processing/plots_post_processing/src/.

      source
      moment_kinetics.setup_moment_kineticsMethod

      Perform all the initialization steps for a run.

      If backup_filename is nothing, set up for a regular run; if a filename is passed, reload data from time index given by restart_time_index for a restart.

      debug_loop_type and debug_loop_parallel_dims are used to force specific set ups for parallel loop ranges, and are only used by the tests in debug_test/.

      source
      diff --git a/dev/zz_moment_kinetics_input/index.html b/dev/zz_moment_kinetics_input/index.html index 1906c90f28..8f14101f71 100644 --- a/dev/zz_moment_kinetics_input/index.html +++ b/dev/zz_moment_kinetics_input/index.html @@ -1,2 +1,2 @@ -moment_kinetics_input · moment_kinetics

      moment_kinetics_input

      moment_kinetics.moment_kinetics_input.mk_inputFunction

      Process user-supplied inputs

      save_inputs_to_txt should be true when actually running a simulation, but defaults to false for other situations (e.g. when post-processing).

      ignore_MPI should be false when actually running a simulation, but defaults to true for other situations (e.g. when post-processing).

      source
      +moment_kinetics_input · moment_kinetics

      moment_kinetics_input

      moment_kinetics.moment_kinetics_input.mk_inputFunction

      Process user-supplied inputs

      save_inputs_to_txt should be true when actually running a simulation, but defaults to false for other situations (e.g. when post-processing).

      ignore_MPI should be false when actually running a simulation, but defaults to true for other situations (e.g. when post-processing).

      source
      diff --git a/dev/zz_moment_kinetics_structs/index.html b/dev/zz_moment_kinetics_structs/index.html index d3a740c0bf..b11ec56406 100644 --- a/dev/zz_moment_kinetics_structs/index.html +++ b/dev/zz_moment_kinetics_structs/index.html @@ -1,2 +1,2 @@ -moment_kinetics_structs · moment_kinetics

      moment_kinetics_structs

      +moment_kinetics_structs · moment_kinetics

      moment_kinetics_structs

      diff --git a/dev/zz_neutral_r_advection/index.html b/dev/zz_neutral_r_advection/index.html index e2d3b56560..e93d1a41e2 100644 --- a/dev/zz_neutral_r_advection/index.html +++ b/dev/zz_neutral_r_advection/index.html @@ -1,2 +1,2 @@ -neutral_r_advection · moment_kinetics
      +neutral_r_advection · moment_kinetics
      diff --git a/dev/zz_neutral_vz_advection/index.html b/dev/zz_neutral_vz_advection/index.html index 649ad598ff..e38b8711c0 100644 --- a/dev/zz_neutral_vz_advection/index.html +++ b/dev/zz_neutral_vz_advection/index.html @@ -1,2 +1,2 @@ -neutral_vz_advection · moment_kinetics

      neutral_vz_advection

      +neutral_vz_advection · moment_kinetics

      neutral_vz_advection

      diff --git a/dev/zz_neutral_z_advection/index.html b/dev/zz_neutral_z_advection/index.html index 14c01c99b9..8b4cffea3b 100644 --- a/dev/zz_neutral_z_advection/index.html +++ b/dev/zz_neutral_z_advection/index.html @@ -1,2 +1,2 @@ -neutral_z_advection · moment_kinetics
      +neutral_z_advection · moment_kinetics
      diff --git a/dev/zz_nonlinear_solvers/index.html b/dev/zz_nonlinear_solvers/index.html index 65d0f53c83..dbd342f78f 100644 --- a/dev/zz_nonlinear_solvers/index.html +++ b/dev/zz_nonlinear_solvers/index.html @@ -1,3 +1,3 @@ -nonlinear_solvers · moment_kinetics

      nonlinear_solvers

      moment_kinetics.nonlinear_solversModule

      Nonlinear solvers, using Jacobian-free Newton-Krylov methods.

      These solvers use an outer Newton iteration. Each step of the Newton iteration requires a linear solve of the Jacobian. An 'inexact Jacobian' method is used, and the GMRES method (GMRES is a type of Krylov solver) is used to (approximately) solve the (approximate) linear system.

      parallelisation

      This module uses shared- and distributed-memory parallelism, so the functions in it should not be called inside any kind of parallelised loop. This restriction should be lifted somehow in future...

      parallel_map() is used to apply elementwise functions to arbitrary numbers of arguments using shared-memory parallelism. We do this rather than writing the loops out explicitly so that newton_solve!() and linear_solve!() can work for arrays with any combination of dimensions.

      Useful references: [1] V.A. Mousseau and D.A. Knoll, "Fully Implicit Kinetic Solution of Collisional Plasmas", Journal of Computational Physics 136, 308–323 (1997), https://doi.org/10.1006/jcph.1997.5736. [2] V.A. Mousseau, "Fully Implicit Kinetic Modelling of Collisional Plasmas", PhD thesis, Idaho National Engineering Laboratory (1996), https://inis.iaea.org/collection/NCLCollectionStore/Public/27/067/27067141.pdf. [3] https://en.wikipedia.org/wiki/Generalizedminimalresidualmethod [4] https://www.rikvoorhaar.com/blog/gmres [5] E. Carson , J. Liesen, Z. Strakoš, "Towards understanding CG and GMRES through examples", Linear Algebra and its Applications 692, 241–291 (2024), https://doi.org/10.1016/j.laa.2024.04.003. [6] Q. Zou, "GMRES algorithms over 35 years", Applied Mathematics and Computation 445, 127869 (2023), https://doi.org/10.1016/j.amc.2023.127869

      source
      moment_kinetics.nonlinear_solvers.gather_nonlinear_solver_counters!Method
      gather_nonlinear_solver_counters!(nl_solver_params)

      Where necessary, gather the iteration counters for the nonlinear solvers.

      Where each solve runs in parallel using all processes, this is unnecessary as the count on each process already represents the global count. Where each solve uses only a subset of processes, the counters from different solves need to be added together to get the global total.

      source
      moment_kinetics.nonlinear_solvers.linear_solve!Method

      Apply the GMRES algorithm to solve the 'linear problem' J.δx^n = R(x^n), which is needed at each step of the outer Newton iteration (in newton_solve!()).

      Uses Givens rotations to reduce the upper Hessenberg matrix to an upper triangular form, which allows conveniently finding the residual at each step, and computing the final solution, without calculating a least-squares minimisation at each step. See 'algorithm 2 MGS-GMRES' in Zou (2023) [https://doi.org/10.1016/j.amc.2023.127869].

      source
      moment_kinetics.nonlinear_solvers.newton_solve!Method
      newton_solve!(x, rhs_func!, residual, delta_x, rhs_delta, w, nl_solver_params;
      -              left_preconditioner=nothing, right_preconditioner=nothing, coords)

      x is the initial guess at the solution, and is overwritten by the result of the Newton solve.

      rhs_func!(residual, x) is the function we are trying to find a solution of. It calculates

      \[\mathtt{residual} = F(\mathtt{x})\]

      where we are trying to solve $F(x)=0$.

      residual, delta_x, rhs_delta and w are buffer arrays, with the same size as x, used internally.

      left_preconditioner or right_preconditioner apply preconditioning. They should be passed a function that solves $P.x = b$ where $P$ is the preconditioner matrix, $b$ is given by the values passed to the function as the argument, and the result $x$ is returned by overwriting the argument.

      coords is a NamedTuple containing the coordinate structs corresponding to each dimension in x.

      Tolerances

      Note that the meaning of the relative tolerance rtol and absolute tolerance atol is very different for the outer Newton iteration and the inner GMRES iteration.

      For the outer Newton iteration the residual $R(x^n)$ measures the departure of the system from the solution (at each grid point). Its size can be compared to the size of the solution x, so it makes sense to define an `error norm' for $R(x^n)$ as

      \[E(x^n) = \left\lVert \frac{R(x^n)}{\mathtt{rtol} x^n \mathtt{atol}} \right\rVert_2\]

      where $\left\lVert \cdot \right\rVert$ is the 'L2 norm' (square-root of sum of squares). We can further try to define a grid-size independent error norm by dividing out the number of grid points to get a root-mean-square (RMS) error rather than an L2 norm.

      \[E_{\mathrm{RMS}}(x^n) = \sqrt{ \frac{1}{N} \sum_i \frac{R(x^n)_i}{\mathtt{rtol} x^n_i \mathtt{atol}} }\]

      where $N$ is the total number of grid points.

      In contrast, GMRES is constructed to minimise the L2 norm of $r_k = b - A\cdot x_k$ where GMRES is solving the linear system $A\cdot x = b$, $x_k$ is the approximation to the solution $x$ at the $k$'th iteration and $r_k$ is the residual at the $k$'th iteration. There is no flexibility to measure error relative to $x$ in any sense. For GMRES, a `relative tolerance' is relative to the residual of the right-hand-side $b$, which is the first iterate $x_0$ (when no initial guess is given). [Where a non-zero initial guess is given it might be better to use a different stopping criterion, see Carson et al. section 3.8.]. The stopping criterion for the GMRES iteration is therefore

      \left\lVert r_k \right\rVert < \max(\mathtt{linear\_rtol} \left\lVert r_0 \right\rVert, \mathtt{linear\_atol}) = \max(\mathtt{linear\_rtol} \left\lVert b \right\rVert, \mathtt{linear\_atol})

      As the GMRES solve is only used to get the right direction' for the next Newton step, it is not necessary to have a very tightlinear_rtol` for the GMRES solve.

      source
      moment_kinetics.nonlinear_solvers.setup_nonlinear_solveFunction

      coords is a NamedTuple of coordinates corresponding to the dimensions of the variable that will be solved. The entries in coords should be ordered the same as the memory layout of the variable to be solved (i.e. fastest-varying first).

      The nonlinear solver will be called inside a loop over outer_coords, so we might need for example a preconditioner object for each point in that outer loop.

      source
      +nonlinear_solvers · moment_kinetics

      nonlinear_solvers

      moment_kinetics.nonlinear_solversModule

      Nonlinear solvers, using Jacobian-free Newton-Krylov methods.

      These solvers use an outer Newton iteration. Each step of the Newton iteration requires a linear solve of the Jacobian. An 'inexact Jacobian' method is used, and the GMRES method (GMRES is a type of Krylov solver) is used to (approximately) solve the (approximate) linear system.

      parallelisation

      This module uses shared- and distributed-memory parallelism, so the functions in it should not be called inside any kind of parallelised loop. This restriction should be lifted somehow in future...

      parallel_map() is used to apply elementwise functions to arbitrary numbers of arguments using shared-memory parallelism. We do this rather than writing the loops out explicitly so that newton_solve!() and linear_solve!() can work for arrays with any combination of dimensions.

      Useful references: [1] V.A. Mousseau and D.A. Knoll, "Fully Implicit Kinetic Solution of Collisional Plasmas", Journal of Computational Physics 136, 308–323 (1997), https://doi.org/10.1006/jcph.1997.5736. [2] V.A. Mousseau, "Fully Implicit Kinetic Modelling of Collisional Plasmas", PhD thesis, Idaho National Engineering Laboratory (1996), https://inis.iaea.org/collection/NCLCollectionStore/Public/27/067/27067141.pdf. [3] https://en.wikipedia.org/wiki/Generalizedminimalresidualmethod [4] https://www.rikvoorhaar.com/blog/gmres [5] E. Carson , J. Liesen, Z. Strakoš, "Towards understanding CG and GMRES through examples", Linear Algebra and its Applications 692, 241–291 (2024), https://doi.org/10.1016/j.laa.2024.04.003.

      source
      moment_kinetics.nonlinear_solvers.gather_nonlinear_solver_counters!Method
      gather_nonlinear_solver_counters!(nl_solver_params)

      Where necessary, gather the iteration counters for the nonlinear solvers.

      Where each solve runs in parallel using all processes, this is unnecessary as the count on each process already represents the global count. Where each solve uses only a subset of processes, the counters from different solves need to be added together to get the global total.

      source
      moment_kinetics.nonlinear_solvers.newton_solve!Method
      newton_solve!(x, rhs_func!, residual, delta_x, rhs_delta, w, nl_solver_params;
      +              left_preconditioner=nothing, right_preconditioner=nothing, coords)

      x is the initial guess at the solution, and is overwritten by the result of the Newton solve.

      rhs_func!(residual, x) is the function we are trying to find a solution of. It calculates

      \[\mathtt{residual} = F(\mathtt{x})\]

      where we are trying to solve $F(x)=0$.

      residual, delta_x, rhs_delta and w are buffer arrays, with the same size as x, used internally.

      left_preconditioner or right_preconditioner apply preconditioning. They should be passed a function that solves $P.x = b$ where $P$ is the preconditioner matrix, $b$ is given by the values passed to the function as the argument, and the result $x$ is returned by overwriting the argument.

      coords is a NamedTuple containing the coordinate structs corresponding to each dimension in x.

      Tolerances

      Note that the meaning of the relative tolerance rtol and absolute tolerance atol is very different for the outer Newton iteration and the inner GMRES iteration.

      For the outer Newton iteration the residual $R(x^n)$ measures the departure of the system from the solution (at each grid point). Its size can be compared to the size of the solution x, so it makes sense to define an `error norm' for $R(x^n)$ as

      \[E(x^n) = \left\lVert \frac{R(x^n)}{\mathtt{rtol} x^n \mathtt{atol}} \right\rVert_2\]

      where $\left\lVert \cdot \right\rVert$ is the 'L2 norm' (square-root of sum of squares). We can further try to define a grid-size independent error norm by dividing out the number of grid points to get a root-mean-square (RMS) error rather than an L2 norm.

      \[E_{\mathrm{RMS}}(x^n) = \sqrt{ \frac{1}{N} \sum_i \frac{R(x^n)_i}{\mathtt{rtol} x^n_i \mathtt{atol}} }\]

      where $N$ is the total number of grid points.

      In contrast, GMRES is constructed to minimise the L2 norm of $r_k = b - A\cdot x_k$ where GMRES is solving the linear system $A\cdot x = b$, $x_k$ is the approximation to the solution $x$ at the $k$'th iteration and $r_k$ is the residual at the $k$'th iteration. There is no flexibility to measure error relative to $x$ in any sense. For GMRES, a `relative tolerance' is relative to the residual of the right-hand-side $b$, which is the first iterate $x_0$ (when no initial guess is given). [Where a non-zero initial guess is given it might be better to use a different stopping criterion, see Carson et al. section 3.8.]. The stopping criterion for the GMRES iteration is therefore

      \left\lVert r_k \right\rVert < \max(\mathtt{linear\_rtol} \left\lVert r_0 \right\rVert, \mathtt{linear\_atol}) = \max(\mathtt{linear\_rtol} \left\lVert b \right\rVert, \mathtt{linear\_atol})

      As the GMRES solve is only used to get the right direction' for the next Newton step, it is not necessary to have a very tightlinear_rtol` for the GMRES solve.

      source
      moment_kinetics.nonlinear_solvers.setup_nonlinear_solveFunction

      coords is a NamedTuple of coordinates corresponding to the dimensions of the variable that will be solved. The entries in coords should be ordered the same as the memory layout of the variable to be solved (i.e. fastest-varying first).

      The nonlinear solver will be called inside a loop over outer_coords, so we might need for example a preconditioner object for each point in that outer loop.

      source
      diff --git a/dev/zz_numerical_dissipation/index.html b/dev/zz_numerical_dissipation/index.html index a4c24670eb..37fd385d6e 100644 --- a/dev/zz_numerical_dissipation/index.html +++ b/dev/zz_numerical_dissipation/index.html @@ -1,11 +1,11 @@ -numerical_dissipation · moment_kinetics

      numerical_dissipation

      moment_kinetics.numerical_dissipation.force_minimum_pdf_value!Method
      force_minimum_pdf_value!(f, minval)

      Set a minimum value for the pdf-sized array f. Any points less than the minimum are set to the minimum. By default, no minimum is applied. The minimum value can be set by

      [ion_numerical_dissipation]
      -force_minimum_pdf_value = 0.0
      source
      moment_kinetics.numerical_dissipation.r_dissipation!Method

      Add diffusion in the r direction to suppress oscillations

      Disabled by default.

      The diffusion coefficient is set in the input TOML file by the parameter

      [ion_numerical_dissipation]
      +numerical_dissipation · moment_kinetics

      numerical_dissipation

      moment_kinetics.numerical_dissipation.force_minimum_pdf_value!Method
      force_minimum_pdf_value!(f, minval)

      Set a minimum value for the pdf-sized array f. Any points less than the minimum are set to the minimum. By default, no minimum is applied. The minimum value can be set by

      [ion_numerical_dissipation]
      +force_minimum_pdf_value = 0.0
      source
      moment_kinetics.numerical_dissipation.r_dissipation!Method

      Add diffusion in the r direction to suppress oscillations

      Disabled by default.

      The diffusion coefficient is set in the input TOML file by the parameter

      [ion_numerical_dissipation]
       r_dissipation_coefficient = 0.1
      -

      Note that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries

      source
      moment_kinetics.numerical_dissipation.r_dissipation_neutral!Method

      Add diffusion in the r direction to suppress oscillations for neutrals

      Disabled by default.

      The diffusion coefficient is set in the input TOML file by the parameter

      [neutral_numerical_dissipation]
      +

      Note that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries

      source
      moment_kinetics.numerical_dissipation.r_dissipation_neutral!Method

      Add diffusion in the r direction to suppress oscillations for neutrals

      Disabled by default.

      The diffusion coefficient is set in the input TOML file by the parameter

      [neutral_numerical_dissipation]
       r_dissipation_coefficient = 0.1
      -

      Note that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries

      source
      moment_kinetics.numerical_dissipation.setup_numerical_dissipationMethod

      Define the dissipation parameters for each species, which means there need to be three sections in each input file that specify the parameters required of each species, as follows:

      [ion_numerical_dissipation]
      +

      Note that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries

      source
      moment_kinetics.numerical_dissipation.setup_numerical_dissipationMethod

      Define the dissipation parameters for each species, which means there need to be three sections in each input file that specify the parameters required of each species, as follows:

      [ion_numerical_dissipation]
       vpa_dissipation_coefficient
       ...
       
      @@ -15,11 +15,11 @@
       
       [neutral_numerical_dissipation]
       vz_dissipation_coefficient
      -...

      There will still be the -1.0 default parameters.

      source
      moment_kinetics.numerical_dissipation.vpa_boundary_buffer_decay!Method

      Suppress the distribution function by damping towards a Maxwellian in the last element before the vpa boundaries, to avoid numerical instabilities there.

      Disabled by default.

      The damping rate is set in the input TOML file by the parameter

      [ion_numerical_dissipation]
      -vpa_boundary_buffer_damping_rate = 0.1
      source
      moment_kinetics.numerical_dissipation.vpa_boundary_buffer_diffusion!Method

      Suppress the distribution function by applying diffusion in the last element before the vpa boundaries, to avoid numerical instabilities there.

      Disabled by default.

      The maximum diffusion rate in the buffer is set in the input TOML file by the parameter

      [ion_numerical_dissipation]
      -vpa_boundary_buffer_diffusion_coefficient = 0.1
      source
      moment_kinetics.numerical_dissipation.z_dissipation!Method

      Add diffusion in the z direction to suppress oscillations

      Disabled by default.

      The diffusion coefficient is set in the input TOML file by the parameter

      [ion_numerical_dissipation]
      -z_dissipation_coefficient = 0.1

      Note that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries

      source
      moment_kinetics.numerical_dissipation.z_dissipation_neutral!Method

      Add diffusion in the z direction to suppress oscillations for neutrals

      Disabled by default.

      The diffusion coefficient is set in the input TOML file by the parameter

      [neutral_numerical_dissipation]
      -z_dissipation_coefficient = 0.1

      Note that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries

      source
      +...

      There will still be the -1.0 default parameters.

      source
      moment_kinetics.numerical_dissipation.vpa_boundary_buffer_decay!Method

      Suppress the distribution function by damping towards a Maxwellian in the last element before the vpa boundaries, to avoid numerical instabilities there.

      Disabled by default.

      The damping rate is set in the input TOML file by the parameter

      [ion_numerical_dissipation]
      +vpa_boundary_buffer_damping_rate = 0.1
      source
      moment_kinetics.numerical_dissipation.vpa_boundary_buffer_diffusion!Method

      Suppress the distribution function by applying diffusion in the last element before the vpa boundaries, to avoid numerical instabilities there.

      Disabled by default.

      The maximum diffusion rate in the buffer is set in the input TOML file by the parameter

      [ion_numerical_dissipation]
      +vpa_boundary_buffer_diffusion_coefficient = 0.1
      source
      moment_kinetics.numerical_dissipation.z_dissipation!Method

      Add diffusion in the z direction to suppress oscillations

      Disabled by default.

      The diffusion coefficient is set in the input TOML file by the parameter

      [ion_numerical_dissipation]
      +z_dissipation_coefficient = 0.1

      Note that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries

      source
      moment_kinetics.numerical_dissipation.z_dissipation_neutral!Method

      Add diffusion in the z direction to suppress oscillations for neutrals

      Disabled by default.

      The diffusion coefficient is set in the input TOML file by the parameter

      [neutral_numerical_dissipation]
      +z_dissipation_coefficient = 0.1

      Note that the current distributed-memory compatible implementation does not impose a penalisation term on internal or external element boundaries

      source
      diff --git a/dev/zz_plot_MMS_sequence/index.html b/dev/zz_plot_MMS_sequence/index.html index 7caee8d376..5f0a20ebea 100644 --- a/dev/zz_plot_MMS_sequence/index.html +++ b/dev/zz_plot_MMS_sequence/index.html @@ -1,2 +1,2 @@ -plot_MMS_sequence · moment_kinetics
      +plot_MMS_sequence · moment_kinetics
      diff --git a/dev/zz_plot_sequence/index.html b/dev/zz_plot_sequence/index.html index 0c1b1d0b9e..6a66dd1ec1 100644 --- a/dev/zz_plot_sequence/index.html +++ b/dev/zz_plot_sequence/index.html @@ -1,2 +1,2 @@ -plot_sequence · moment_kinetics
      +plot_sequence · moment_kinetics
      diff --git a/dev/zz_plots_post_processing/index.html b/dev/zz_plots_post_processing/index.html index 2ffd91de51..c2d7985e53 100644 --- a/dev/zz_plots_post_processing/index.html +++ b/dev/zz_plots_post_processing/index.html @@ -1,2 +1,2 @@ -plots_post_processing · moment_kinetics

      plots_post_processing

      plots_post_processing.analyze_and_plot_dataMethod
      analyze_and_plot_data(prefix...; run_index=nothing)

      Make some plots for the simulation at prefix. If more than one argument is passed to prefix, plot all the simulations together.

      The strings passed to prefix should be either a directory (which contains run output) or the prefix of output files, like <directory>/<prefix> where the output files are <directory>/<prefix>.moments.h5 and <directory>/<prefix>.dfns.h5.

      If a single value is passed for prefix the plots/movies are created in the same directory as the run, and given names based on the name of the run. If multiple values are passed, the plots/movies are given names beginning with compare_ and are created in the comparison_plots/ subdirectory.

      By default plots output from all restarts in a directory. To select a single run, pass the run_index argument - the value corresponds to the _<i> suffix given to output files when restarting. run_index can be an integer (which is applied to all directories in prefix...), or a tuple of integers (which should have the same length as the number of directories passed to prefix...). Use run_index=-1 to get the most recent run (which does not have a _<i> suffix). Note that run_index is only used when a directory (rather than the prefix of a specific output file) is passed to prefix...

      source
      plots_post_processing.get_tuple_of_return_valuesMethod
      get_tuple_of_return_values(func, arg_tuples...)

      Suppose func(args...) returns a tuple of return values, then get_tuple_of_return_values(func, arg_tuples...) returns a tuple (with an entry for each return value of func) of tuples (one for each argument in each of arg_tuples...) of return values.

      source
      plots_post_processing.plot_unnormalised_f2dMethod

      Make a 2d plot of an unnormalised f on unnormalised coordinates, as returned from getunnormalisedf_coords()

      Note this function requires using the PyPlot backend to support 2d coordinates being passed to heatmap().

      source
      plots_post_processing.read_distributed_zwallr_data!Method

      Read data which is a function of (r,t) or (r,species,t) and associated to one of the wall boundaries

      run_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.

      source
      +plots_post_processing · moment_kinetics

      plots_post_processing

      plots_post_processing.analyze_and_plot_dataMethod
      analyze_and_plot_data(prefix...; run_index=nothing)

      Make some plots for the simulation at prefix. If more than one argument is passed to prefix, plot all the simulations together.

      The strings passed to prefix should be either a directory (which contains run output) or the prefix of output files, like <directory>/<prefix> where the output files are <directory>/<prefix>.moments.h5 and <directory>/<prefix>.dfns.h5.

      If a single value is passed for prefix the plots/movies are created in the same directory as the run, and given names based on the name of the run. If multiple values are passed, the plots/movies are given names beginning with compare_ and are created in the comparison_plots/ subdirectory.

      By default plots output from all restarts in a directory. To select a single run, pass the run_index argument - the value corresponds to the _<i> suffix given to output files when restarting. run_index can be an integer (which is applied to all directories in prefix...), or a tuple of integers (which should have the same length as the number of directories passed to prefix...). Use run_index=-1 to get the most recent run (which does not have a _<i> suffix). Note that run_index is only used when a directory (rather than the prefix of a specific output file) is passed to prefix...

      source
      plots_post_processing.get_tuple_of_return_valuesMethod
      get_tuple_of_return_values(func, arg_tuples...)

      Suppose func(args...) returns a tuple of return values, then get_tuple_of_return_values(func, arg_tuples...) returns a tuple (with an entry for each return value of func) of tuples (one for each argument in each of arg_tuples...) of return values.

      source
      plots_post_processing.plot_unnormalised_f2dMethod

      Make a 2d plot of an unnormalised f on unnormalised coordinates, as returned from getunnormalisedf_coords()

      Note this function requires using the PyPlot backend to support 2d coordinates being passed to heatmap().

      source
      plots_post_processing.read_distributed_zwallr_data!Method

      Read data which is a function of (r,t) or (r,species,t) and associated to one of the wall boundaries

      run_names is a tuple. If it has more than one entry, this means that there are multiple restarts (which are sequential in time), so concatenate the data from each entry together.

      source
      diff --git a/dev/zz_quadrature/index.html b/dev/zz_quadrature/index.html index cd12ec504f..a4ba25920e 100644 --- a/dev/zz_quadrature/index.html +++ b/dev/zz_quadrature/index.html @@ -1,2 +1,2 @@ -quadrature · moment_kinetics
      +quadrature · moment_kinetics
      diff --git a/dev/zz_r_advection/index.html b/dev/zz_r_advection/index.html index 72d6319108..9f2cfd31c6 100644 --- a/dev/zz_r_advection/index.html +++ b/dev/zz_r_advection/index.html @@ -1,2 +1,2 @@ -r_advection · moment_kinetics
      +r_advection · moment_kinetics
      diff --git a/dev/zz_reference_parameters/index.html b/dev/zz_reference_parameters/index.html index ed0197e0d1..bcfd6184b1 100644 --- a/dev/zz_reference_parameters/index.html +++ b/dev/zz_reference_parameters/index.html @@ -1,2 +1,2 @@ -reference_parameters · moment_kinetics

      reference_parameters

      moment_kinetics.reference_parametersModule

      Reference parameters

      Reference parameters are not needed or used by the main part of the code, but define the physical units of the simulation, and are needed for a few specific steps during setup (e.g. calculation of normalised collision frequency).

      source
      +reference_parameters · moment_kinetics

      reference_parameters

      moment_kinetics.reference_parametersModule

      Reference parameters

      Reference parameters are not needed or used by the main part of the code, but define the physical units of the simulation, and are needed for a few specific steps during setup (e.g. calculation of normalised collision frequency).

      source
      diff --git a/dev/zz_runge_kutta/index.html b/dev/zz_runge_kutta/index.html index 369c79a618..7e4bf48a64 100644 --- a/dev/zz_runge_kutta/index.html +++ b/dev/zz_runge_kutta/index.html @@ -1,7 +1,6 @@ -runge_kutta · moment_kinetics

      runge_kutta

      moment_kinetics.runge_kutta.adaptive_timestep_update_t_params!Method
      adaptive_timestep_update_t_params!(t_params, CFL_limits, error_norms,
      -                                   total_points, error_norm_method, success,
      -                                   nl_max_its_fraction, composition;
      -                                   electron=false, local_max_dt::mk_float=Inf)

      Use the calculated CFL_limits and error_norms to update the timestep in t_params.

      source
      moment_kinetics.runge_kutta.local_error_normFunction
      local_error_norm(error, f, rtol, atol)
      +runge_kutta · moment_kinetics

      runge_kutta

      moment_kinetics.runge_kutta.local_error_normFunction
      local_error_norm(error, f, rtol, atol)
       local_error_norm(error, f, rtol, atol, neutral=false; method="Linf",
      -                 skip_r_inner=false, skip_z_lower=false, error_sum_zero=0.0)

      Maximum error norm in the range owned by this MPI process, given by

      \[\max(\frac{|\mathtt{error}|}{\mathtt{rtol}*|\mathtt{f}| + \mathtt{atol})\]

      3 dimensional arrays (which represent moments) are treated as ion moments unless neutral=true is passed.

      method can be "Linf" (to take the maximum error) or "L2" to take the root-mean-square (RMS) error.

      skip_r_inner and skip_z_lower can be set to true to skip the contribution from the inner/lower boundaries, to avoid double-counting those points when using distributed-memory MPI.

      error_sum_zero should always have value 0.0, but is included so that different types can be used for L2sum. For testing, if we want consistency of results when using different numbers of processes (when the number of processes changes the order of operations in the sum is changed, which changes the rounding errors) then we have to use higher precision (i.e. use the Float128 type from the Quadmath package). The type of a 0.0 value can be set according to the high_precision_error_sum option in the [timestepping] section, and stored in a template-typed value in the t_params object - when that value is passed in as the argument to error_sum_zero, that type will be used for L2sum, and the type will be known at compile time, allowing this function to be efficient.

      source
      moment_kinetics.runge_kutta.rk_loworder_solution!Method

      Calculate a lower-order approximation for the variable named var_symbol, which can be used to calculate an error estimate for adaptive timestepping methods.

      The lower-order approximation is stored in var_symbol in scratch[2] (as this entry should not be needed again after the lower-order approximation is calculated).

      source
      moment_kinetics.runge_kutta.rk_update_variable!Method

      Update the variable named var_symbol in scratch to the current Runge-Kutta stage istage. The current value in scratch[istage+1] is the result of the forward-Euler update, which needs to be corrected using values from previous stages with the Runge-Kutta coefficients. scratch_implicit contains the results of backward-Euler updates, which are needed for IMEX timestepping schemes.

      source
      moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!Method

      given the number of Runge Kutta stages that are requested, returns the needed Runge Kutta coefficients; e.g., if f is the function to be updated, then f^{n+1}[stage+1] = rkcoef[1,stage]*f^{n} + rkcoef[2,stage]f^{n+1}[stage] + rk_coef[3,stage](f^{n}+dt*G[f^{n+1}[stage]]

      source
      + skip_r_inner=false, skip_z_lower=false, error_sum_zero=0.0)

      Maximum error norm in the range owned by this MPI process, given by

      \[\max(\frac{|\mathtt{error}|}{\mathtt{rtol}*|\mathtt{f}| + \mathtt{atol})\]

      3 dimensional arrays (which represent moments) are treated as ion moments unless neutral=true is passed.

      method can be "Linf" (to take the maximum error) or "L2" to take the root-mean-square (RMS) error.

      skip_r_inner and skip_z_lower can be set to true to skip the contribution from the inner/lower boundaries, to avoid double-counting those points when using distributed-memory MPI.

      error_sum_zero should always have value 0.0, but is included so that different types can be used for L2sum. For testing, if we want consistency of results when using different numbers of processes (when the number of processes changes the order of operations in the sum is changed, which changes the rounding errors) then we have to use higher precision (i.e. use the Float128 type from the Quadmath package). The type of a 0.0 value can be set according to the high_precision_error_sum option in the [timestepping] section, and stored in a template-typed value in the t_params object - when that value is passed in as the argument to error_sum_zero, that type will be used for L2sum, and the type will be known at compile time, allowing this function to be efficient.

      source
      moment_kinetics.runge_kutta.rk_loworder_solution!Method

      Calculate a lower-order approximation for the variable named var_symbol, which can be used to calculate an error estimate for adaptive timestepping methods.

      The lower-order approximation is stored in var_symbol in scratch[2] (as this entry should not be needed again after the lower-order approximation is calculated).

      source
      moment_kinetics.runge_kutta.rk_update_variable!Method

      Update the variable named var_symbol in scratch to the current Runge-Kutta stage istage. The current value in scratch[istage+1] is the result of the forward-Euler update, which needs to be corrected using values from previous stages with the Runge-Kutta coefficients. scratch_implicit contains the results of backward-Euler updates, which are needed for IMEX timestepping schemes.

      source
      moment_kinetics.runge_kutta.setup_runge_kutta_coefficients!Method

      given the number of Runge Kutta stages that are requested, returns the needed Runge Kutta coefficients; e.g., if f is the function to be updated, then f^{n+1}[stage+1] = rkcoef[1,stage]*f^{n} + rkcoef[2,stage]f^{n+1}[stage] + rk_coef[3,stage](f^{n}+dt*G[f^{n+1}[stage]]

      source
      diff --git a/dev/zz_source_terms/index.html b/dev/zz_source_terms/index.html index b19ee6c5c8..1e2193ea04 100644 --- a/dev/zz_source_terms/index.html +++ b/dev/zz_source_terms/index.html @@ -1,2 +1,2 @@ -source_terms · moment_kinetics

      source_terms

      +source_terms · moment_kinetics

      source_terms

      diff --git a/dev/zz_species_input/index.html b/dev/zz_species_input/index.html index 9b178283b9..6dbdff11f6 100644 --- a/dev/zz_species_input/index.html +++ b/dev/zz_species_input/index.html @@ -1,2 +1,2 @@ -species_input · moment_kinetics
      +species_input · moment_kinetics
      diff --git a/dev/zz_time_advance/index.html b/dev/zz_time_advance/index.html index d039234c9f..bb53b407d5 100644 --- a/dev/zz_time_advance/index.html +++ b/dev/zz_time_advance/index.html @@ -1,13 +1,13 @@ -time_advance · moment_kinetics

      time_advance

      moment_kinetics.time_advance.adaptive_timestep_update!Method
      adaptive_timestep_update!(scratch, scratch_implicit, scratch_electron,
      -                          t_params, pdf, moments, fields, boundary_distributions,
      +time_advance · moment_kinetics

      time_advance

      moment_kinetics.time_advance.adaptive_timestep_update!Method
      adaptive_timestep_update!(scratch, scratch_implicit, scratch_electron,
      +                          t_params, moments, fields,
                                 composition, collisions, geometry,
                                 external_source_settings, spectral_objects,
      -                          advect_objects, gyroavs, num_diss_params,
      -                          nl_solver_params, advance, scratch_dummy, r, z, vperp,
      -                          vpa, vzeta, vr, vz, success, nl_max_its_fraction)

      Check the error estimate for the embedded RK method and adjust the timestep if appropriate.

      source
      moment_kinetics.time_advance.euler_time_advance!Method

      eulertimeadvance! advances the vector equation dfvec/dt = G[f] that includes the kinetic equation + any evolved moment equations using the forward Euler method: fvecout = fvecin + dt*fvecin, with fvecin an input and fvec_out the output

      source
      moment_kinetics.time_advance.implicit_ion_advance!Method
      implicit_ion_advance!(fvec_out, fvec_in, pdf, fields, moments, advect_objects,
      +                          advect_objects, gyroavs, num_diss_params, advance,
      +                          scratch_dummy, r, z, vperp, vpa, vzeta, vr, vz,
      +                          success, nl_max_its_fraction)

      Check the error estimate for the embedded RK method and adjust the timestep if appropriate.

      source
      moment_kinetics.time_advance.euler_time_advance!Method

      eulertimeadvance! advances the vector equation dfvec/dt = G[f] that includes the kinetic equation + any evolved moment equations using the forward Euler method: fvecout = fvecin + dt*fvecin, with fvecin an input and fvec_out the output

      source
      moment_kinetics.time_advance.implicit_ion_advance!Method
      implicit_ion_advance!(fvec_out, fvec_in, pdf, fields, moments, advect_objects,
                             vz, vr, vzeta, vpa, vperp, gyrophase, z, r, t, dt,
                             spectral_objects, composition, collisions, geometry,
                             scratch_dummy, manufactured_source_list,
                             external_source_settings, num_diss_params,
      -                      nl_solver_params, advance, fp_arrays, istage)

      Do a backward-Euler timestep for all terms in the ion kinetic equation.

      source
      moment_kinetics.time_advance.normalize_pdf!Method

      if evolving the density via continuity equation, redefine the normalised f → f/n if evolving the parallel pressure via energy equation, redefine f -> f * vth / n 'scratch' should be a (nz,nspecies) array

      source
      moment_kinetics.time_advance.setup_advance_flagsMethod

      create the 'advance_info' struct to be used in later Euler advance to indicate which parts of the equations are to be advanced concurrently. if no splitting of operators, all terms advanced concurrently; else, will advance one term at a time.

      source
      moment_kinetics.time_advance.time_advance!Method

      solve ∂f/∂t + v(z,t)⋅∂f/∂z + dvpa/dt ⋅ ∂f/∂vpa= 0 define approximate characteristic velocity v₀(z)=vⁿ(z) and take time derivative along this characteristic df/dt + δv⋅∂f/∂z = 0, with δv(z,t)=v(z,t)-v₀(z) for prudent choice of v₀, expect δv≪v so that explicit time integrator can be used without severe CFL condition

      source
      + nl_solver_params, advance, fp_arrays, istage)

      Do a backward-Euler timestep for all terms in the ion kinetic equation.

      source
      moment_kinetics.time_advance.normalize_pdf!Method

      if evolving the density via continuity equation, redefine the normalised f → f/n if evolving the parallel pressure via energy equation, redefine f -> f * vth / n 'scratch' should be a (nz,nspecies) array

      source
      moment_kinetics.time_advance.setup_advance_flagsMethod

      create the 'advance_info' struct to be used in later Euler advance to indicate which parts of the equations are to be advanced concurrently. if no splitting of operators, all terms advanced concurrently; else, will advance one term at a time.

      source
      moment_kinetics.time_advance.time_advance!Method

      solve ∂f/∂t + v(z,t)⋅∂f/∂z + dvpa/dt ⋅ ∂f/∂vpa= 0 define approximate characteristic velocity v₀(z)=vⁿ(z) and take time derivative along this characteristic df/dt + δv⋅∂f/∂z = 0, with δv(z,t)=v(z,t)-v₀(z) for prudent choice of v₀, expect δv≪v so that explicit time integrator can be used without severe CFL condition

      source
      diff --git a/dev/zz_type_definitions/index.html b/dev/zz_type_definitions/index.html index 72683a8f82..18f5d41d38 100644 --- a/dev/zz_type_definitions/index.html +++ b/dev/zz_type_definitions/index.html @@ -1,2 +1,2 @@ -type_definitions · moment_kinetics
      +type_definitions · moment_kinetics
      diff --git a/dev/zz_utils/index.html b/dev/zz_utils/index.html index 702f4ced6a..44fad39711 100644 --- a/dev/zz_utils/index.html +++ b/dev/zz_utils/index.html @@ -1,3 +1,3 @@ -utils · moment_kinetics

      utils

      moment_kinetics.utils.get_CFLFunction
      get_CFL!(CFL, speed, coord)

      Calculate the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection. Note that moment_kinetics is set up so that dimension in which advection happens is the first dimension of speed - coord is the coordinate corresponding to this dimension.

      The result is written in CFL. This function is only intended to be used in post-processing.

      source
      moment_kinetics.utils.get_default_restart_filenameMethod
      get_default_restart_filename(io_input, prefix; error_if_no_file_found=true)

      Get the default name for the file to restart from, using the input from io_input.

      prefix gives the type of file to open, e.g. "moments", "dfns", or "initial_electron".

      If no matching file is found, raise an error unless error_if_no_file_found=false is passed, in which case no error is raised and instead the function returns nothing.

      source
      moment_kinetics.utils.get_minimum_CFL_neutral_vzMethod
      get_minimum_CFL_neutral_vz(speed, vz)

      Calculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection of neutrals in the vz direction.

      Reduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.

      source
      moment_kinetics.utils.get_minimum_CFL_neutral_zMethod
      get_minimum_CFL_neutral_z(speed, z)

      Calculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection of neutrals in the z direction.

      Reduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.

      source
      moment_kinetics.utils.get_minimum_CFL_vpaMethod
      get_minimum_CFL_vpa(speed, vpa)

      Calculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection in the vpa direction.

      Reduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.

      source
      moment_kinetics.utils.get_minimum_CFL_zMethod
      get_minimum_CFL_z(speed, z)

      Calculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection in the z direction.

      Reduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.

      source
      moment_kinetics.utils.get_unnormalized_parametersFunction
      get_unnormalized_parameters(input::Dict)
      -get_unnormalized_parameters(input_filename::String)

      Get many parameters for the simulation setup given by input or in the file input_filename, in SI units and eV, returned as an OrderedDict.

      source
      moment_kinetics.utils.merge_dict_with_kwargs!Method

      Dict merge function for named keyword arguments for case when input Dict is a mixed Dict of Dicts and non-Dict float/int/string entries, and the keyword arguments are also a mix of Dicts and non-Dicts

      source
      +utils · moment_kinetics

      utils

      moment_kinetics.utils.get_CFLFunction
      get_CFL!(CFL, speed, coord)

      Calculate the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection. Note that moment_kinetics is set up so that dimension in which advection happens is the first dimension of speed - coord is the coordinate corresponding to this dimension.

      The result is written in CFL. This function is only intended to be used in post-processing.

      source
      moment_kinetics.utils.get_default_restart_filenameMethod
      get_default_restart_filename(io_input, prefix; error_if_no_file_found=true)

      Get the default name for the file to restart from, using the input from io_input.

      prefix gives the type of file to open, e.g. "moments", "dfns", or "initial_electron".

      If no matching file is found, raise an error unless error_if_no_file_found=false is passed, in which case no error is raised and instead the function returns nothing.

      source
      moment_kinetics.utils.get_minimum_CFL_neutral_vzMethod
      get_minimum_CFL_neutral_vz(speed, vz)

      Calculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection of neutrals in the vz direction.

      Reduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.

      source
      moment_kinetics.utils.get_minimum_CFL_neutral_zMethod
      get_minimum_CFL_neutral_z(speed, z)

      Calculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection of neutrals in the z direction.

      Reduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.

      source
      moment_kinetics.utils.get_minimum_CFL_vpaMethod
      get_minimum_CFL_vpa(speed, vpa)

      Calculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection in the vpa direction.

      Reduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.

      source
      moment_kinetics.utils.get_minimum_CFL_zMethod
      get_minimum_CFL_z(speed, z)

      Calculate the minimum (over a shared-memory block) of the CFL factor 'speed/(grid spacing)' (with no prefactor) corresponding to advection speed speed for advection in the z direction.

      Reduces the result over the shared-memory block (handling distributed parallelism is left to the calling site). The result is only to be used on rank-0 of the shared-memory block.

      source
      moment_kinetics.utils.get_unnormalized_parametersFunction
      get_unnormalized_parameters(input::Dict)
      +get_unnormalized_parameters(input_filename::String)

      Get many parameters for the simulation setup given by input or in the file input_filename, in SI units and eV, returned as an OrderedDict.

      source
      moment_kinetics.utils.merge_dict_with_kwargs!Method

      Dict merge function for named keyword arguments for case when input Dict is a mixed Dict of Dicts and non-Dict float/int/string entries, and the keyword arguments are also a mix of Dicts and non-Dicts

      source
      diff --git a/dev/zz_velocity_grid_transforms/index.html b/dev/zz_velocity_grid_transforms/index.html index e7c860333d..c2abfb45fe 100644 --- a/dev/zz_velocity_grid_transforms/index.html +++ b/dev/zz_velocity_grid_transforms/index.html @@ -1,2 +1,2 @@ -velocity_grid_transforms · moment_kinetics
      +velocity_grid_transforms · moment_kinetics
      diff --git a/dev/zz_velocity_moments/index.html b/dev/zz_velocity_moments/index.html index e11bb56cfd..890a6f1bc0 100644 --- a/dev/zz_velocity_moments/index.html +++ b/dev/zz_velocity_moments/index.html @@ -1,2 +1,2 @@ -velocity_moments · moment_kinetics

      velocity_moments

      moment_kinetics.velocity_moments.integrate_over_negative_vpaMethod

      computes the integral over vpa <= 0 of the integrand, using the input vpa_wgts this could be made more efficient for the case that dz/dt = vpa is time-independent, but it has been left general for the cases where, e.g., dz/dt = wpa*vth + upar varies in time

      source
      moment_kinetics.velocity_moments.integrate_over_positive_vpaMethod

      computes the integral over vpa >= 0 of the integrand, using the input vpa_wgts this could be made more efficient for the case that dz/dt = vpa is time-independent, but it has been left general for the cases where, e.g., dz/dt = wpa*vth + upar varies in time

      source
      moment_kinetics.velocity_moments.update_chodura_integral_species!Method

      compute the integral needed for the generalised Chodura condition

      IChodura = (Z^2 vBohm^2 / cref^2) * int ( f bz^2 / vz^2 + dfdr*rhostar/vz ) vBohm = sqrt(Z Te/mi) with Z = 1 and mref = mi cref = sqrt(2Ti/mi) and normalise to the local ion density, appropriate to assessing the Chodura condition

      IChodura <= (Te/e)d ne / dphi |(sheath entrance) = ni

      to a single species plasma with Z = 1

      source
      moment_kinetics.velocity_moments.update_moments!Method

      calculate the updated density (dens) and parallel pressure (ppar) for all species this function is only used once after initialisation the function used to update moments at run time is updatederivedmoments! in time_advance.jl

      source
      +velocity_moments · moment_kinetics

      velocity_moments

      moment_kinetics.velocity_moments.integrate_over_negative_vpaMethod

      computes the integral over vpa <= 0 of the integrand, using the input vpa_wgts this could be made more efficient for the case that dz/dt = vpa is time-independent, but it has been left general for the cases where, e.g., dz/dt = wpa*vth + upar varies in time

      source
      moment_kinetics.velocity_moments.integrate_over_positive_vpaMethod

      computes the integral over vpa >= 0 of the integrand, using the input vpa_wgts this could be made more efficient for the case that dz/dt = vpa is time-independent, but it has been left general for the cases where, e.g., dz/dt = wpa*vth + upar varies in time

      source
      moment_kinetics.velocity_moments.update_chodura_integral_species!Method

      compute the integral needed for the generalised Chodura condition

      IChodura = (Z^2 vBohm^2 / cref^2) * int ( f bz^2 / vz^2 + dfdr*rhostar/vz ) vBohm = sqrt(Z Te/mi) with Z = 1 and mref = mi cref = sqrt(2Ti/mi) and normalise to the local ion density, appropriate to assessing the Chodura condition

      IChodura <= (Te/e)d ne / dphi |(sheath entrance) = ni

      to a single species plasma with Z = 1

      source
      moment_kinetics.velocity_moments.update_moments!Method

      calculate the updated density (dens) and parallel pressure (ppar) for all species this function is only used once after initialisation the function used to update moments at run time is updatederivedmoments! in time_advance.jl

      source
      diff --git a/dev/zz_vpa_advection/index.html b/dev/zz_vpa_advection/index.html index eb34085514..ced58945ef 100644 --- a/dev/zz_vpa_advection/index.html +++ b/dev/zz_vpa_advection/index.html @@ -1,2 +1,2 @@ -vpa_advection · moment_kinetics

      vpa_advection

      moment_kinetics.vpa_advection.update_speed_n_u_p_evolution!Method

      update the advection speed in the parallel velocity coordinate for the case where density, flow and pressure are evolved independently from the pdf; in this case, the parallel velocity coordinate is the normalized peculiar velocity wpahat = (vpa - upar)/vth

      source
      +vpa_advection · moment_kinetics

      vpa_advection

      moment_kinetics.vpa_advection.update_speed_n_u_p_evolution!Method

      update the advection speed in the parallel velocity coordinate for the case where density, flow and pressure are evolved independently from the pdf; in this case, the parallel velocity coordinate is the normalized peculiar velocity wpahat = (vpa - upar)/vth

      source
      diff --git a/dev/zz_z_advection/index.html b/dev/zz_z_advection/index.html index 53c71b554c..fbfa77df17 100644 --- a/dev/zz_z_advection/index.html +++ b/dev/zz_z_advection/index.html @@ -1,2 +1,2 @@ -z_advection · moment_kinetics
      +z_advection · moment_kinetics