diff --git a/previews/PR302/chebyshev/index.html b/previews/PR302/chebyshev/index.html index 2a2c10ebf..24ef40208 100644 --- a/previews/PR302/chebyshev/index.html +++ b/previews/PR302/chebyshev/index.html @@ -102,4 +102,4 @@ v_{j} = \sum_{n=0}^{2N}\frac{J_{n}}{2N+1}\exp\left[-i \frac{2\pi n j}{2N+1}\right]. \end{equation}\]

Finally, we can compare equations (8) and (15) and deduce that

\[\begin{equation} w_{j} = q_{j}v_{j} {\rm~for~} 0 \leq j \leq N. -\end{equation}\]

+\end{equation}\]

diff --git a/previews/PR302/constraints_on_normalized_distribution_function/index.html b/previews/PR302/constraints_on_normalized_distribution_function/index.html index 6f38af065..0475682a8 100644 --- a/previews/PR302/constraints_on_normalized_distribution_function/index.html +++ b/previews/PR302/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/previews/PR302/debugging-hints/index.html b/previews/PR302/debugging-hints/index.html index a0012ba90..f8ba9ffa8 100644 --- a/previews/PR302/debugging-hints/index.html +++ b/previews/PR302/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/previews/PR302/developing/index.html b/previews/PR302/developing/index.html index 44572a77e..42c121fe3 100644 --- a/previews/PR302/developing/index.html +++ b/previews/PR302/developing/index.html @@ -27,4 +27,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.

Parallel I/O

The code provides an option to use parallel I/O, which allows all output to be written to a single output file even when using distributed-MPI parallelism - this is the default option when the linked HDF5 library is compiled with parallel-I/O support.

There are a few things to be aware of to ensure parallel I/O works correctly:

If the collective operations are not done perfectly consistently, the errors can be extremely non-obvious. The inconsistent operations may appear to execute correctly, for example because the same number of variables are created, and the metadata may only actually be written from the rank-0 process, but the inconsistency may cause errors later. [JTO, 3/11/2024: my best guess as to the reason for this is that it puts HDF5's 'metadata cache' in inconsistent states on different ranks, and this means that at some later time the ranks will cycle some metadata out of the cache in different orders, and then some ranks will be able to get the metadata from the cache, while others have to read it from the file. The reading from the file requires some collective MPI call, which is only called from some ranks and not others, causing the code to hang.]

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.

Parallel I/O

The code provides an option to use parallel I/O, which allows all output to be written to a single output file even when using distributed-MPI parallelism - this is the default option when the linked HDF5 library is compiled with parallel-I/O support.

There are a few things to be aware of to ensure parallel I/O works correctly:

If the collective operations are not done perfectly consistently, the errors can be extremely non-obvious. The inconsistent operations may appear to execute correctly, for example because the same number of variables are created, and the metadata may only actually be written from the rank-0 process, but the inconsistency may cause errors later. [JTO, 3/11/2024: my best guess as to the reason for this is that it puts HDF5's 'metadata cache' in inconsistent states on different ranks, and this means that at some later time the ranks will cycle some metadata out of the cache in different orders, and then some ranks will be able to get the metadata from the cache, while others have to read it from the file. The reading from the file requires some collective MPI call, which is only called from some ranks and not others, causing the code to hang.]

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/previews/PR302/external_sources_notes/index.html b/previews/PR302/external_sources_notes/index.html index 96b191da3..6a8dd4de3 100644 --- a/previews/PR302/external_sources_notes/index.html +++ b/previews/PR302/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/previews/PR302/fokker_planck_notes/index.html b/previews/PR302/fokker_planck_notes/index.html index 5287c8dfe..8477ce982 100644 --- a/previews/PR302/fokker_planck_notes/index.html +++ b/previews/PR302/fokker_planck_notes/index.html @@ -4,4 +4,4 @@ # nuii sets the normalised input C[F,F] Fokker-Planck collision frequency # for frequency_option = "manual" nuii = 1.0 -frequency_option = "manual"

Set use_fokker_planck=false to turn off Fokker-Planck collisions without commenting out the namelist. The default option for frequency_option = "reference_parameters", where nuii is set by the reference parameter inputs. Further specialised input parameters can be seen in the source at setup_fkpl_collisions_input() in moment_kinetics/src/fokker_planck.jl.

+frequency_option = "manual"

Set use_fokker_planck=false to turn off Fokker-Planck collisions without commenting out the namelist. The default option for frequency_option = "reference_parameters", where nuii is set by the reference parameter inputs. Further specialised input parameters can be seen in the source at setup_fkpl_collisions_input() in moment_kinetics/src/fokker_planck.jl.

diff --git a/previews/PR302/geometry/index.html b/previews/PR302/geometry/index.html index fdc953488..f55d96e36 100644 --- a/previews/PR302/geometry/index.html +++ b/previews/PR302/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/previews/PR302/getting_started/index.html b/previews/PR302/getting_started/index.html index a49d2685b..91272212c 100644 --- a/previews/PR302/getting_started/index.html +++ b/previews/PR302/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/previews/PR302/index.html b/previews/PR302/index.html index 43dae41b7..5ddb5cdd2 100644 --- a/previews/PR302/index.html +++ b/previews/PR302/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/previews/PR302/input_options/index.html b/previews/PR302/input_options/index.html index f7ec18e6a..65f3f0a20 100644 --- a/previews/PR302/input_options/index.html +++ b/previews/PR302/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/previews/PR302/machine_setup_notes/index.html b/previews/PR302/machine_setup_notes/index.html index 2b1cdf911..69364714e 100644 --- a/previews/PR302/machine_setup_notes/index.html +++ b/previews/PR302/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/previews/PR302/manual_setup/index.html b/previews/PR302/manual_setup/index.html index 200b965ad..800d378a3 100644 --- a/previews/PR302/manual_setup/index.html +++ b/previews/PR302/manual_setup/index.html @@ -55,4 +55,4 @@ # check install with tests echo "MPI test with precompiled moment_kinetics.so" -.julia/bin/mpiexecjl --project=./ -n 2 julia --project -O3 -Jmoment_kinetics.so -e 'include("moment_kinetics/test/runtests.jl")' +.julia/bin/mpiexecjl --project=./ -n 2 julia --project -O3 -Jmoment_kinetics.so -e 'include("moment_kinetics/test/runtests.jl")' diff --git a/previews/PR302/manufactured_solution_test_examples/index.html b/previews/PR302/manufactured_solution_test_examples/index.html index bfcaec08a..24a3a6497 100644 --- a/previews/PR302/manufactured_solution_test_examples/index.html +++ b/previews/PR302/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/previews/PR302/moment_kinetic_equations/index.html b/previews/PR302/moment_kinetic_equations/index.html index 8c5006388..5a46abf84 100644 --- a/previews/PR302/moment_kinetic_equations/index.html +++ b/previews/PR302/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/previews/PR302/parameter_scans/index.html b/previews/PR302/parameter_scans/index.html index ecb9f5d9f..fe399e83b 100644 --- a/previews/PR302/parameter_scans/index.html +++ b/previews/PR302/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/previews/PR302/post_processing_notes/index.html b/previews/PR302/post_processing_notes/index.html index f2c6425f8..02785caa2 100644 --- a/previews/PR302/post_processing_notes/index.html +++ b/previews/PR302/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.

Example input file

You can generate an example input file, with all the options shown (with their default values) but commented out, by running makie_post_processing.generate_example_input_file().

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/previews/PR302/search/index.html b/previews/PR302/search/index.html index 9aa615c84..02de08ffd 100644 --- a/previews/PR302/search/index.html +++ b/previews/PR302/search/index.html @@ -1,2 +1,2 @@ -Search · moment_kinetics

Loading search...

    +Search · moment_kinetics

    Loading search...

      diff --git a/previews/PR302/shared_memory_debugging/index.html b/previews/PR302/shared_memory_debugging/index.html index 7702512b7..53c4bbf14 100644 --- a/previews/PR302/shared_memory_debugging/index.html +++ b/previews/PR302/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/previews/PR302/timestepping/index.html b/previews/PR302/timestepping/index.html index b28350dc3..112f3b493 100644 --- a/previews/PR302/timestepping/index.html +++ b/previews/PR302/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/previews/PR302/wall_boundary_conditions/index.html b/previews/PR302/wall_boundary_conditions/index.html index eee4dfd3d..1f3c97e6f 100644 --- a/previews/PR302/wall_boundary_conditions/index.html +++ b/previews/PR302/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/previews/PR302/zz_advection/index.html b/previews/PR302/zz_advection/index.html index fbf7ab7e1..5496d3cf7 100644 --- a/previews/PR302/zz_advection/index.html +++ b/previews/PR302/zz_advection/index.html @@ -1,2 +1,2 @@ -advection · moment_kinetics

      advection

      +advection · moment_kinetics

      advection

      diff --git a/previews/PR302/zz_analysis/index.html b/previews/PR302/zz_analysis/index.html index 60875f7d3..1ee1ab347 100644 --- a/previews/PR302/zz_analysis/index.html +++ b/previews/PR302/zz_analysis/index.html @@ -1,6 +1,6 @@ -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;
      +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,
      -                       only_max_abs=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 just returns the "max absolute residual", not an OrderedDict.

      source
      moment_kinetics.analysis.steady_state_square_residualsFunction
      steady_state_square_residuals(variable, variable_at_previous_time, dt,
      +                       only_max_abs=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 just returns the "max absolute residual", not an OrderedDict.

      source
      moment_kinetics.analysis.steady_state_square_residualsFunction
      steady_state_square_residuals(variable, variable_at_previous_time, dt,
                                     variable_max=nothing, use_mpi=false,
      -                              only_max_abs=false, epsilon=0.0001)

      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
      + only_max_abs=false, epsilon=0.0001)

      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/previews/PR302/zz_array_allocation/index.html b/previews/PR302/zz_array_allocation/index.html index c73535918..30d45ca79 100644 --- a/previews/PR302/zz_array_allocation/index.html +++ b/previews/PR302/zz_array_allocation/index.html @@ -1,2 +1,2 @@ -array_allocation · moment_kinetics

      array_allocation

      +array_allocation · moment_kinetics

      array_allocation

      diff --git a/previews/PR302/zz_bgk/index.html b/previews/PR302/zz_bgk/index.html index 49b28f377..7fd37f32f 100644 --- a/previews/PR302/zz_bgk/index.html +++ b/previews/PR302/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/previews/PR302/zz_boundary_conditions/index.html b/previews/PR302/zz_boundary_conditions/index.html index 2786e0113..8e25546c2 100644 --- a/previews/PR302/zz_boundary_conditions/index.html +++ b/previews/PR302/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
      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
      diff --git a/previews/PR302/zz_calculus/index.html b/previews/PR302/zz_calculus/index.html index daf51aaea..7733000bd 100644 --- a/previews/PR302/zz_calculus/index.html +++ b/previews/PR302/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/previews/PR302/zz_charge_exchange/index.html b/previews/PR302/zz_charge_exchange/index.html index 201bf727a..1f2a86a46 100644 --- a/previews/PR302/zz_charge_exchange/index.html +++ b/previews/PR302/zz_charge_exchange/index.html @@ -1,2 +1,2 @@ -charge_exchange · moment_kinetics

      charge_exchange

      +charge_exchange · moment_kinetics

      charge_exchange

      diff --git a/previews/PR302/zz_chebyshev/index.html b/previews/PR302/zz_chebyshev/index.html index 13ea13da2..5cafe4d45 100644 --- a/previews/PR302/zz_chebyshev/index.html +++ b/previews/PR302/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/previews/PR302/zz_clenshaw_curtis/index.html b/previews/PR302/zz_clenshaw_curtis/index.html index a3d5c6e15..e5e601e97 100644 --- a/previews/PR302/zz_clenshaw_curtis/index.html +++ b/previews/PR302/zz_clenshaw_curtis/index.html @@ -1,2 +1,2 @@ -clenshaw_curtis · moment_kinetics
      +clenshaw_curtis · moment_kinetics
      diff --git a/previews/PR302/zz_command_line_options/index.html b/previews/PR302/zz_command_line_options/index.html index 4f95cee5c..6b3320945 100644 --- a/previews/PR302/zz_command_line_options/index.html +++ b/previews/PR302/zz_command_line_options/index.html @@ -1,2 +1,2 @@ -command_line_options · moment_kinetics
      +command_line_options · moment_kinetics
      diff --git a/previews/PR302/zz_communication/index.html b/previews/PR302/zz_communication/index.html index 3b47d58e0..8f9bcc4bc 100644 --- a/previews/PR302/zz_communication/index.html +++ b/previews/PR302/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/previews/PR302/zz_constants/index.html b/previews/PR302/zz_constants/index.html index 4f9271dff..6cfb2b1dd 100644 --- a/previews/PR302/zz_constants/index.html +++ b/previews/PR302/zz_constants/index.html @@ -1,2 +1,2 @@ -constants · moment_kinetics
      +constants · moment_kinetics
      diff --git a/previews/PR302/zz_continuity/index.html b/previews/PR302/zz_continuity/index.html index 2ad9f65fe..893eea44a 100644 --- a/previews/PR302/zz_continuity/index.html +++ b/previews/PR302/zz_continuity/index.html @@ -1,2 +1,2 @@ -continuity · moment_kinetics
      +continuity · moment_kinetics
      diff --git a/previews/PR302/zz_coordinates/index.html b/previews/PR302/zz_coordinates/index.html index cf5ba965f..90a40fea2 100644 --- a/previews/PR302/zz_coordinates/index.html +++ b/previews/PR302/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/previews/PR302/zz_debugging/index.html b/previews/PR302/zz_debugging/index.html index 5657dc278..494c1c028 100644 --- a/previews/PR302/zz_debugging/index.html +++ b/previews/PR302/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/previews/PR302/zz_derivatives/index.html b/previews/PR302/zz_derivatives/index.html index e328efb80..41f32cf9d 100644 --- a/previews/PR302/zz_derivatives/index.html +++ b/previews/PR302/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/previews/PR302/zz_electron_fluid_equations/index.html b/previews/PR302/zz_electron_fluid_equations/index.html index 4b1ca02de..015937eb9 100644 --- a/previews/PR302/zz_electron_fluid_equations/index.html +++ b/previews/PR302/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,
      +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
      + 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
      diff --git a/previews/PR302/zz_electron_kinetic_equation/index.html b/previews/PR302/zz_electron_kinetic_equation/index.html index e70cf6a77..85a0aa4e3 100644 --- a/previews/PR302/zz_electron_kinetic_equation/index.html +++ b/previews/PR302/zz_electron_kinetic_equation/index.html @@ -2,41 +2,41 @@ electron_kinetic_equation · moment_kinetics

      electron_kinetic_equation

      moment_kinetics.electron_kinetic_equation.add_wall_boundary_condition_to_Jacobian!Function
      add_wall_boundary_condition_to_Jacobian!(jacobian, phi, pdf, ppar, vthe, upar, z,
                                                vperp, vpa, vperp_spectral, vpa_spectral,
                                                vpa_adv, moments, vpa_diffusion, me_over_mi,
      -                                         ir)

      All the contributions that we add in this function have to be added with a -'ve sign so that they combine with the 1 on the diagonal of the preconditioner matrix to make rows corresponding to the boundary points which define constraint equations imposing the boundary condition on those entries of δg (when the right-hand-side is set to zero).

      source
      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,
      +                                         ir)

      All the contributions that we add in this function have to be added with a -'ve sign so that they combine with the 1 on the diagonal of the preconditioner matrix to make rows corresponding to the boundary points which define constraint equations imposing the boundary condition on those entries of δg (when the right-hand-side is set to zero).

      source
      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_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!Function
      fill_electron_kinetic_equation_Jacobian!(jacobian_matrix, f, ppar, moments,
      +                                        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!Function
      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, include=:all)

      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.fill_electron_kinetic_equation_v_only_Jacobian!Method
      fill_electron_kinetic_equation_v_only_Jacobian!()
           jacobian_matrix, f, ppar, dpdf_dz, dpdf_dvpa, z_speed, moments, zeroth_moment,
           first_moment, second_moment, third_moment, dthird_moment_dz, phi, collisions,
           composition, z, vperp, vpa, z_spectral, vperp_spectral, vpa_spectral, z_advect,
           vpa_advect, scratch_dummy, external_source_settings, num_diss_params, t_params,
      -    ion_dt, ir, iz, evolve_ppar)

      Fill a pre-allocated matrix with the Jacobian matrix for a velocity-space solve part of the ADI method for electron kinetic equation and (if evolve_ppar=true) the electron energy equation.

      source
      moment_kinetics.electron_kinetic_equation.fill_electron_kinetic_equation_z_only_Jacobian_f!Method
      fill_electron_kinetic_equation_z_only_Jacobian_f!(
           jacobian_matrix, f, ppar, dpdf_dz, dpdf_dvpa, z_speed, moments, zeroth_moment,
           first_moment, second_moment, third_moment, dthird_moment_dz, collisions,
           composition, z, vperp, vpa, z_spectral, vperp_spectral, vpa_spectral, z_advect,
           vpa_advect, scratch_dummy, external_source_settings, num_diss_params, t_params,
      -    ion_dt, ir, ivperp, ivpa, evolve_ppar)

      Fill a pre-allocated matrix with the Jacobian matrix for a z-direction solve part of the ADI method for electron kinetic equation and (if evolve_ppar=true) the electron energy equation.

      source
      moment_kinetics.electron_kinetic_equation.fill_electron_kinetic_equation_z_only_Jacobian_ppar!Method
      fill_electron_kinetic_equation_z_only_Jacobian_ppar!(
           jacobian_matrix, ppar, moments, zeroth_moment, first_moment, second_moment,
           third_moment, dthird_moment_dz, collisions, composition, z, vperp, vpa,
           z_spectral, vperp_spectral, 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 a z-direction solve part of the ADI method for electron kinetic equation and (if evolve_ppar=true) the electron energy equation.

      source
      moment_kinetics.electron_kinetic_equation.get_electron_split_Jacobians!Method
      get_electron_split_Jacobians!(ivperp, ivpa, ppar, moments, collisions, composition,
      +    external_source_settings, num_diss_params, t_params, ion_dt, ir, evolve_ppar)

      Fill a pre-allocated matrix with the Jacobian matrix for a z-direction solve part of the ADI method for electron kinetic equation and (if evolve_ppar=true) the electron energy equation.

      source
      moment_kinetics.electron_kinetic_equation.get_electron_split_Jacobians!Method
      get_electron_split_Jacobians!(ivperp, ivpa, ppar, moments, collisions, composition,
                                     z, vperp, vpa, z_spectral, vperp_spectral, 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:
      +                              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:
       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
      @@ -55,7 +55,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
      @@ -67,7 +67,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
      @@ -86,4 +86,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/previews/PR302/zz_electron_vpa_advection/index.html b/previews/PR302/zz_electron_vpa_advection/index.html index a6eb3a076..159718828 100644 --- a/previews/PR302/zz_electron_vpa_advection/index.html +++ b/previews/PR302/zz_electron_vpa_advection/index.html @@ -1,2 +1,2 @@ -electron_vpa_advection · moment_kinetics
      +electron_vpa_advection · moment_kinetics
      diff --git a/previews/PR302/zz_electron_z_advection/index.html b/previews/PR302/zz_electron_z_advection/index.html index 199ddce5a..3d9aee5b3 100644 --- a/previews/PR302/zz_electron_z_advection/index.html +++ b/previews/PR302/zz_electron_z_advection/index.html @@ -1,2 +1,2 @@ -electron_z_advection · moment_kinetics
      +electron_z_advection · moment_kinetics
      diff --git a/previews/PR302/zz_em_fields/index.html b/previews/PR302/zz_em_fields/index.html index d7b3d9260..a48ac04d4 100644 --- a/previews/PR302/zz_em_fields/index.html +++ b/previews/PR302/zz_em_fields/index.html @@ -1,2 +1,2 @@ -em_fields · moment_kinetics
      +em_fields · moment_kinetics
      diff --git a/previews/PR302/zz_energy_equation/index.html b/previews/PR302/zz_energy_equation/index.html index 092cf691c..451ba6bcd 100644 --- a/previews/PR302/zz_energy_equation/index.html +++ b/previews/PR302/zz_energy_equation/index.html @@ -1,2 +1,2 @@ -energy_equation · moment_kinetics
      +energy_equation · moment_kinetics
      diff --git a/previews/PR302/zz_external_sources/index.html b/previews/PR302/zz_external_sources/index.html index 22286fff8..ef0f5a2bb 100644 --- a/previews/PR302/zz_external_sources/index.html +++ b/previews/PR302/zz_external_sources/index.html @@ -1,9 +1,9 @@ -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
      moment_kinetics.external_sources.total_external_electron_sources!Method
      total_external_electron_sources!(pdf_out, pdf_in, electron_density, electron_upar,
      +                          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, ir)

      Contribute all of the electron sources to the electron pdf, one by one.

      source
      diff --git a/previews/PR302/zz_file_io/index.html b/previews/PR302/zz_file_io/index.html index 368260cda..471558f1c 100644 --- a/previews/PR302/zz_file_io/index.html +++ b/previews/PR302/zz_file_io/index.html @@ -1,10 +1,10 @@ -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::Union{coordinate,NamedTuple}...; parallel_io,
      -                         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.

      A description and/or units can be added with the keyword arguments.

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

      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.

      A description and/or units can be added with the keyword arguments.

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

      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,
      -                    overwrite=false) 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.

      If overwrite=true is passed, overwrite the variable if it already exists in the file. Note that when overwriting a String variable, the new String must have exactly the same length as the original String.

      source
      + overwrite=false) 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.

      If overwrite=true is passed, overwrite the variable if it already exists in the file. Note that when overwriting a String variable, the new String must have exactly the same length as the original String.

      source
      diff --git a/previews/PR302/zz_finite_differences/index.html b/previews/PR302/zz_finite_differences/index.html index a67222b2f..42b391106 100644 --- a/previews/PR302/zz_finite_differences/index.html +++ b/previews/PR302/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/previews/PR302/zz_fokker_planck/index.html b/previews/PR302/zz_fokker_planck/index.html index ed792866e..3ce3f323a 100644 --- a/previews/PR302/zz_fokker_planck/index.html +++ b/previews/PR302/zz_fokker_planck/index.html @@ -1,13 +1,13 @@ -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.conserving_corrections!Method

      Function that applies numerical-error correcting terms to ensure numerical conservation of the moments density, upar, pressure in the self-collision operator. Modifies the collision operator such that the operator becomes

      \[C_{ss} = C^\ast_{ss}[F_s,F_{s}] - \left(x_0 + x_1(v_{\|}-u_{\|})+ x_2(v_\perp^2 +(v_{\|}-u_{\|})^2)\right)F_s\]

      where $C^\ast_{ss}[F_s,F_{s}]$ is the weak-form self-collision operator computed using the finite-element implementation, $u_{\|}$ is the parallel velocity of $F_s$, and $x_0,x_1,x_2$ are parameters that are chosen so that $C_{ss}$ conserves density, parallel velocity and pressure of $F_s$.

      source
      moment_kinetics.fokker_planck.density_conserving_correction!Method

      Function that applies a numerical-error correcting term to ensure numerical conservation of the density in the collision operator.

      \[C_{ss^\prime} = C^\ast_{ss}[F_s,F_{s^\prime}] - x_0 F_s\]

      where $C^\ast_{ss}[F_s,F_{s^\prime}]$ is the weak-form collision operator computed using the finite-element implementation.

      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
      moment_kinetics.fokker_planck.setup_fkpl_collisions_inputMethod

      Function for reading Fokker Planck collision operator input parameters. Structure the namelist as follows.

      [fokker_planck_collisions]
      +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.conserving_corrections!Method

      Function that applies numerical-error correcting terms to ensure numerical conservation of the moments density, upar, pressure in the self-collision operator. Modifies the collision operator such that the operator becomes

      \[C_{ss} = C^\ast_{ss}[F_s,F_{s}] - \left(x_0 + x_1(v_{\|}-u_{\|})+ x_2(v_\perp^2 +(v_{\|}-u_{\|})^2)\right)F_s\]

      where $C^\ast_{ss}[F_s,F_{s}]$ is the weak-form self-collision operator computed using the finite-element implementation, $u_{\|}$ is the parallel velocity of $F_s$, and $x_0,x_1,x_2$ are parameters that are chosen so that $C_{ss}$ conserves density, parallel velocity and pressure of $F_s$.

      source
      moment_kinetics.fokker_planck.density_conserving_correction!Method

      Function that applies a numerical-error correcting term to ensure numerical conservation of the density in the collision operator.

      \[C_{ss^\prime} = C^\ast_{ss}[F_s,F_{s^\prime}] - x_0 F_s\]

      where $C^\ast_{ss}[F_s,F_{s^\prime}]$ is the weak-form collision operator computed using the finite-element implementation.

      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
      source
      moment_kinetics.fokker_planck.symmetric_matrix_inverseMethod

      Function that solves A x = b for a matrix of the form

      \[\begin{array}{ccc} A_{00} & 0 & A_{02} \\ 0 & A_{11} & A_{12} \\ A_{02} & A_{12} & A_{22} \\ -\end{array}\]

      appropriate for the moment numerical conserving terms used in the Fokker-Planck collision operator.

      source
      +\end{array}\]

      appropriate for moment numerical conserving terms.

      source diff --git a/previews/PR302/zz_fokker_planck_calculus/index.html b/previews/PR302/zz_fokker_planck_calculus/index.html index 747fd2a10..6e22bd46a 100644 --- a/previews/PR302/zz_fokker_planck_calculus/index.html +++ b/previews/PR302/zz_fokker_planck_calculus/index.html @@ -1,8 +1,8 @@ -fokker_planck_calculus · moment_kinetics

      fokker_planck_calculus

      moment_kinetics.fokker_planck_calculus.YY_collision_operator_arraysType

      Struct to store the elemental nonlinear stiffness matrices used to express the finite-element weak form of the collision operator. The arrays are indexed so that the contraction in the assembly step is carried out over the fastest accessed indices, i.e., for YY0perp[i,j,k,iel], we contract over i and j to give data for the field position index k, all for the 1D element indexed by iel.

      source
      moment_kinetics.fokker_planck_calculus.algebraic_solve!Method

      Same as elliptic_solve!() above but no Dirichlet boundary conditions are imposed, because the function is only used where the lu_object_lhs is derived from a mass matrix. The source is made of two different terms with different weak matrices because of the form of the only algebraic equation that we consider.

      Note: algebraic_solve!() run only in serial. They do not handle shared-memory parallelism themselves. The calling site must ensure that algebraic_solve!() is only called by one process in a shared-memory block.

      source
      moment_kinetics.fokker_planck_calculus.assemble_explicit_collision_operator_rhs_parallel!Method

      Function to assemble the RHS of the kinetic equation due to the collision operator, in weak form. Once the array rhsvpavperp contains the assembled weak-form collision operator, a mass matrix solve still must be carried out to find the time derivative of the distribution function due to collisions. This function uses a purely parallel algorithm and may be tested by comparing to assemble_explicit_collision_operator_rhs_serial!(). The inner-most loop of the function is in assemble_explicit_collision_operator_rhs_parallel_inner_loop().

      source
      moment_kinetics.fokker_planck_calculus.assemble_explicit_collision_operator_rhs_serial!Method

      Function to assemble the RHS of the kinetic equation due to the collision operator, in weak form. Once the array rhsvpavperp contains the assembled weak-form collision operator, a mass matrix solve still must be carried out to find the time derivative of the distribution function due to collisions. This function uses a purely serial algorithm for testing purposes.

      source
      moment_kinetics.fokker_planck_calculus.assemble_matrix_operators_dirichlet_bcMethod

      Function to contruct the global sparse matrices used to solve the elliptic PDEs for the Rosenbluth potentials. Uses a dense matrix construction method. The matrices are 2D in the compound index ic which indexes the velocity space labelled by ivpa,ivperp. Dirichlet boundary conditions are imposed in the appropriate stiffness matrices by setting the boundary row to be the Kronecker delta (0 except where ivpa = ivpap and ivperp = ivperpp). Used for testing.

      source
      moment_kinetics.fokker_planck_calculus.assemble_matrix_operators_dirichlet_bc_sparseMethod

      Function to contruct the global sparse matrices used to solve the elliptic PDEs for the Rosenbluth potentials. Uses a sparse matrix construction method. The matrices are 2D in the compound index ic which indexes the velocity space labelled by ivpa,ivperp. Dirichlet boundary conditions are imposed in the appropriate stiffness matrices by setting the boundary row to be the Kronecker delta (0 except where ivpa = ivpap and ivperp = ivperpp). See also assemble_matrix_operators_dirichlet_bc().

      source
      moment_kinetics.fokker_planck_calculus.calculate_boundary_data!Method

      Function to carry out the direct integration of a formal definition of one of the Rosenbluth potentials, on the boundaries of the (vpa,vperp) domain, using the precomputed integration weights with dimension 4. The result is stored in an instance of vpa_vperp_boundary_data. Used in testing.

      source
      moment_kinetics.fokker_planck_calculus.calculate_boundary_data!Method

      Function to carry out the direct integration of a formal definition of one of the Rosenbluth potentials, on the boundaries of the (vpa,vperp) domain, using the precomputed integration weights with dimension 3. The result is stored in an instance of vpa_vperp_boundary_data.

      source
      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.calculate_rosenbluth_potentials_via_elliptic_solve!Method

      Function to solve the appropriate elliptic PDEs to find the Rosenbluth potentials. First, we calculate the Rosenbluth potentials at the boundary with the direct integration method. Then, we use this data to solve the elliptic PDEs with the boundary data providing an accurate Dirichlet boundary condition on the maximum vpa and vperp of the domain. We use the sparse LU decomposition from the LinearAlgebra package to solve the PDE matrix equations.

      source
      moment_kinetics.fokker_planck_calculus.elliptic_solve!Method

      Elliptic solve function.

      field: the solution
      +fokker_planck_calculus · moment_kinetics

      fokker_planck_calculus

      moment_kinetics.fokker_planck_calculus.YY_collision_operator_arraysType

      Struct to store the elemental nonlinear stiffness matrices used to express the finite-element weak form of the collision operator. The arrays are indexed so that the contraction in the assembly step is carried out over the fastest accessed indices, i.e., for YY0perp[i,j,k,iel], we contract over i and j to give data for the field position index k, all for the 1D element indexed by iel.

      source
      moment_kinetics.fokker_planck_calculus.algebraic_solve!Method

      Same as elliptic_solve!() above but no Dirichlet boundary conditions are imposed, because the function is only used where the lu_object_lhs is derived from a mass matrix. The source is made of two different terms with different weak matrices because of the form of the only algebraic equation that we consider.

      Note: algebraic_solve!() run only in serial. They do not handle shared-memory parallelism themselves. The calling site must ensure that algebraic_solve!() is only called by one process in a shared-memory block.

      source
      moment_kinetics.fokker_planck_calculus.assemble_explicit_collision_operator_rhs_parallel!Method

      Function to assemble the RHS of the kinetic equation due to the collision operator, in weak form. Once the array rhsvpavperp contains the assembled weak-form collision operator, a mass matrix solve still must be carried out to find the time derivative of the distribution function due to collisions. This function uses a purely parallel algorithm and may be tested by comparing to assemble_explicit_collision_operator_rhs_serial!(). The inner-most loop of the function is in assemble_explicit_collision_operator_rhs_parallel_inner_loop().

      source
      moment_kinetics.fokker_planck_calculus.assemble_explicit_collision_operator_rhs_serial!Method

      Function to assemble the RHS of the kinetic equation due to the collision operator, in weak form. Once the array rhsvpavperp contains the assembled weak-form collision operator, a mass matrix solve still must be carried out to find the time derivative of the distribution function due to collisions. This function uses a purely serial algorithm for testing purposes.

      source
      moment_kinetics.fokker_planck_calculus.assemble_matrix_operators_dirichlet_bcMethod

      Function to contruct the global sparse matrices used to solve the elliptic PDEs for the Rosenbluth potentials. Uses a dense matrix construction method. The matrices are 2D in the compound index ic which indexes the velocity space labelled by ivpa,ivperp. Dirichlet boundary conditions are imposed in the appropriate stiffness matrices by setting the boundary row to be the Kronecker delta (0 except where ivpa = ivpap and ivperp = ivperpp). Used for testing.

      source
      moment_kinetics.fokker_planck_calculus.assemble_matrix_operators_dirichlet_bc_sparseMethod

      Function to contruct the global sparse matrices used to solve the elliptic PDEs for the Rosenbluth potentials. Uses a sparse matrix construction method. The matrices are 2D in the compound index ic which indexes the velocity space labelled by ivpa,ivperp. Dirichlet boundary conditions are imposed in the appropriate stiffness matrices by setting the boundary row to be the Kronecker delta (0 except where ivpa = ivpap and ivperp = ivperpp). See also assemble_matrix_operators_dirichlet_bc().

      source
      moment_kinetics.fokker_planck_calculus.calculate_boundary_data!Method

      Function to carry out the direct integration of a formal definition of one of the Rosenbluth potentials, on the boundaries of the (vpa,vperp) domain, using the precomputed integration weights with dimension 4. The result is stored in an instance of vpa_vperp_boundary_data. Used in testing.

      source
      moment_kinetics.fokker_planck_calculus.calculate_boundary_data!Method

      Function to carry out the direct integration of a formal definition of one of the Rosenbluth potentials, on the boundaries of the (vpa,vperp) domain, using the precomputed integration weights with dimension 3. The result is stored in an instance of vpa_vperp_boundary_data.

      source
      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.calculate_rosenbluth_potentials_via_elliptic_solve!Method

      Function to solve the appropriate elliptic PDEs to find the Rosenbluth potentials. First, we calculate the Rosenbluth potentials at the boundary with the direct integration method. Then, we use this data to solve the elliptic PDEs with the boundary data providing an accurate Dirichlet boundary condition on the maximum vpa and vperp of the domain. We use the sparse LU decomposition from the LinearAlgebra package to solve the PDE matrix equations.

      source
      moment_kinetics.fokker_planck_calculus.elliptic_solve!Method

      Elliptic solve function.

      field: the solution
       source: the source function on the RHS
       boundary data: the known values of field at infinity
       lu_object_lhs: the object for the differential operator that defines field
       matrix_rhs: the weak matrix acting on the source vector
      -vpa, vperp: coordinate structs

      Note: all variants of elliptic_solve!() run only in serial. They do not handle shared-memory parallelism themselves. The calling site must ensure that elliptic_solve!() is only called by one process in a shared-memory block.

      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.get_scaled_x_w_with_divergences!Method

      Function to get the local integration grid and quadrature weights to integrate a 1D element in the 2D representation of the velocity space distribution functions. This function assumes that there is a divergence at the point coord_val, and splits the grid and integration weights appropriately, using Gauss-Laguerre points near the divergence and Gauss-Legendre points away from the divergence.

      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
      moment_kinetics.fokker_planck_calculus.local_element_integration!Method

      Base level function for computing the integration kernals for the Rosenbluth potential integration. Note the definitions of ellipe(m) ($E(m)$) and ellipk(m) ($K(m)$). https://specialfunctions.juliamath.org/stable/functions_list/#SpecialFunctions.ellipe https://specialfunctions.juliamath.org/stable/functions_list/#SpecialFunctions.ellipk

      \[E(m) = \int^{\pi/2}_0 \sqrt{ 1 - m \sin^2(\theta)} d \theta\]

      \[K(m) = \int^{\pi/2}_0 \frac{1}{\sqrt{ 1 - m \sin^2(\theta)}} d \theta\]

      source
      moment_kinetics.fokker_planck_calculus.loop_over_vpa_elements!Method

      Function for computing the quadratures and carrying out the loop over the primed vpa coordinate in doing the numerical integration. Splits the integrand into three pieces – two which use Gauss-Legendre quadrature assuming no divergences in the integrand, and one which assumes a logarithmic divergence and uses a Gauss-Laguerre quadrature with an (exponential) change of variables to mitigate this divergence.

      source
      moment_kinetics.fokker_planck_calculus.loop_over_vperp_vpa_elements!Method

      Function for computing the quadratures and carrying out the loop over the primed vperp coordinate in doing the numerical integration. Splits the integrand into three pieces – two which use Gauss-Legendre quadrature assuming no divergences in the integrand, and one which assumes a logarithmic divergence and uses a Gauss-Laguerre quadrature with an (exponential) change of variables to mitigate this divergence. This function calls loop_over_vpa_elements_no_divergences!() and loop_over_vpa_elements!() to carry out the primed vpa loop within the primed vperp loop.

      source
      moment_kinetics.fokker_planck_calculus.loop_over_vperp_vpa_elements_no_divergences!Method

      The function loop_over_vperp_vpa_elements_no_divergences!() was used for debugging. By changing the source where loop_over_vperp_vpa_elements!() is called to instead call this function we can verify that the Gauss-Legendre quadrature is adequate for integrating a divergence-free integrand. This function should be kept until we understand the problems preventing machine-precision accurary in the pure integration method of computing the Rosenbluth potentials.

      source
      +vpa, vperp: coordinate structs

      Note: all variants of elliptic_solve!() run only in serial. They do not handle shared-memory parallelism themselves. The calling site must ensure that elliptic_solve!() is only called by one process in a shared-memory block.

      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.get_scaled_x_w_with_divergences!Method

      Function to get the local integration grid and quadrature weights to integrate a 1D element in the 2D representation of the velocity space distribution functions. This function assumes that there is a divergence at the point coord_val, and splits the grid and integration weights appropriately, using Gauss-Laguerre points near the divergence and Gauss-Legendre points away from the divergence.

      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
      moment_kinetics.fokker_planck_calculus.local_element_integration!Method

      Base level function for computing the integration kernals for the Rosenbluth potential integration. Note the definitions of ellipe(m) ($E(m)$) and ellipk(m) ($K(m)$). https://specialfunctions.juliamath.org/stable/functions_list/#SpecialFunctions.ellipe https://specialfunctions.juliamath.org/stable/functions_list/#SpecialFunctions.ellipk

      \[E(m) = \int^{\pi/2}_0 \sqrt{ 1 - m \sin^2(\theta)} d \theta\]

      \[K(m) = \int^{\pi/2}_0 \frac{1}{\sqrt{ 1 - m \sin^2(\theta)}} d \theta\]

      source
      moment_kinetics.fokker_planck_calculus.loop_over_vpa_elements!Method

      Function for computing the quadratures and carrying out the loop over the primed vpa coordinate in doing the numerical integration. Splits the integrand into three pieces – two which use Gauss-Legendre quadrature assuming no divergences in the integrand, and one which assumes a logarithmic divergence and uses a Gauss-Laguerre quadrature with an (exponential) change of variables to mitigate this divergence.

      source
      moment_kinetics.fokker_planck_calculus.loop_over_vperp_vpa_elements!Method

      Function for computing the quadratures and carrying out the loop over the primed vperp coordinate in doing the numerical integration. Splits the integrand into three pieces – two which use Gauss-Legendre quadrature assuming no divergences in the integrand, and one which assumes a logarithmic divergence and uses a Gauss-Laguerre quadrature with an (exponential) change of variables to mitigate this divergence. This function calls loop_over_vpa_elements_no_divergences!() and loop_over_vpa_elements!() to carry out the primed vpa loop within the primed vperp loop.

      source
      moment_kinetics.fokker_planck_calculus.loop_over_vperp_vpa_elements_no_divergences!Method

      The function loop_over_vperp_vpa_elements_no_divergences!() was used for debugging. By changing the source where loop_over_vperp_vpa_elements!() is called to instead call this function we can verify that the Gauss-Legendre quadrature is adequate for integrating a divergence-free integrand. This function should be kept until we understand the problems preventing machine-precision accurary in the pure integration method of computing the Rosenbluth potentials.

      source
      diff --git a/previews/PR302/zz_fokker_planck_test/index.html b/previews/PR302/zz_fokker_planck_test/index.html index deffaf034..3f81ea648 100644 --- a/previews/PR302/zz_fokker_planck_test/index.html +++ b/previews/PR302/zz_fokker_planck_test/index.html @@ -1,2 +1,2 @@ -fokker_planck_test · moment_kinetics

      fokker_planck_test

      moment_kinetics.fokker_planck_test.Cssp_fully_expanded_formMethod

      Function calculating the fully expanded form of the collision operator taking as arguments the derivatives of $F_s$, $G_{s^\prime}$ and $H_{s^\prime}$. This function is designed to be used at the lowest level of a coordinate loop, with derivatives and integrals all previously calculated.

      source
      moment_kinetics.fokker_planck_test.G_MaxwellianMethod

      Function computing G, defined by

      \[\nabla^4 G = -\frac{8}{\sqrt{\pi}} F \]

      with

      \[F = c_{\rm ref}^3 \pi^{3/2} F_{\rm Maxwellian} / n_{\rm ref} \]

      the normalised Maxwellian. See Plasma Confinement, R. D. Hazeltine & J. D. Meiss, 2003, Dover Publications, pg 184, Chpt 5.2, Eqn (5.49).

      source
      moment_kinetics.fokker_planck_test.H_MaxwellianMethod

      Function computing H, defined by

      \[\nabla^2 H = -\frac{4}{\sqrt{\pi}} F \]

      with

      \[F = c_{\rm ref}^3 \pi^{3/2} F_{\rm Maxwellian} / n_{\rm ref} \]

      the normalised Maxwellian. See Plasma Confinement, R. D. Hazeltine & J. D. Meiss, 2003, Dover Publications, pg 184, Chpt 5.2, Eqn (5.49).

      source
      moment_kinetics.fokker_planck_test.eta_funcMethod

      Function computing the normalised speed variable

      \[\eta = \frac{\sqrt{(v_\| - u_\|)^2 + v_\perp^2}}{v_{\rm th}}\]

      with $v_{\rm th} = \sqrt{2 p / n m}$ the thermal speed, and $p$ the pressure, $n$ the density and $m$ the mass.

      source
      +fokker_planck_test · moment_kinetics

      fokker_planck_test

      moment_kinetics.fokker_planck_test.Cssp_fully_expanded_formMethod

      Function calculating the fully expanded form of the collision operator taking as arguments the derivatives of $F_s$, $G_{s^\prime}$ and $H_{s^\prime}$. This function is designed to be used at the lowest level of a coordinate loop, with derivatives and integrals all previously calculated.

      source
      moment_kinetics.fokker_planck_test.G_MaxwellianMethod

      Function computing G, defined by

      \[\nabla^4 G = -\frac{8}{\sqrt{\pi}} F \]

      with

      \[F = c_{\rm ref}^3 \pi^{3/2} F_{\rm Maxwellian} / n_{\rm ref} \]

      the normalised Maxwellian. See Plasma Confinement, R. D. Hazeltine & J. D. Meiss, 2003, Dover Publications, pg 184, Chpt 5.2, Eqn (5.49).

      source
      moment_kinetics.fokker_planck_test.H_MaxwellianMethod

      Function computing H, defined by

      \[\nabla^2 H = -\frac{4}{\sqrt{\pi}} F \]

      with

      \[F = c_{\rm ref}^3 \pi^{3/2} F_{\rm Maxwellian} / n_{\rm ref} \]

      the normalised Maxwellian. See Plasma Confinement, R. D. Hazeltine & J. D. Meiss, 2003, Dover Publications, pg 184, Chpt 5.2, Eqn (5.49).

      source
      moment_kinetics.fokker_planck_test.eta_funcMethod

      Function computing the normalised speed variable

      \[\eta = \frac{\sqrt{(v_\| - u_\|)^2 + v_\perp^2}}{v_{\rm th}}\]

      with $v_{\rm th} = \sqrt{2 p / n m}$ the thermal speed, and $p$ the pressure, $n$ the density and $m$ the mass.

      source
      diff --git a/previews/PR302/zz_force_balance/index.html b/previews/PR302/zz_force_balance/index.html index 0428c168e..323d0e522 100644 --- a/previews/PR302/zz_force_balance/index.html +++ b/previews/PR302/zz_force_balance/index.html @@ -1,2 +1,2 @@ -force_balance · moment_kinetics
      +force_balance · moment_kinetics
      diff --git a/previews/PR302/zz_gauss_legendre/index.html b/previews/PR302/zz_gauss_legendre/index.html index 8b39c0018..354252063 100644 --- a/previews/PR302/zz_gauss_legendre/index.html +++ b/previews/PR302/zz_gauss_legendre/index.html @@ -1,21 +1,21 @@ -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 with a scaling factor.

      source
      moment_kinetics.gauss_legendre.GaussLegendre_weak_product_matrix!Method

      Assign abitrary weak (nonlinear) inner product matrix Q on a 1D line with Jacobian equal to 1. matrix Q acts on two vectors x1 and x2 such that the quadratic form y = x1 * Q * x2 is also a vector. See documentation of corresponding function for linear inner product matrices.

      source
      moment_kinetics.gauss_legendre.GaussLegendre_weak_product_matrix!Method

      Assign abitrary weak inner product matrix Q on a 1D line with Jacobian equal to 1 matrix Q acts on a single vector x such that y = Q * x is also a vector.

      We use a projection onto Gauss-Legendre polynomials to carry out the calculation in two steps (see, e.g, S. A. Teukolsky, Short note on the mass matrix for Gauss–Lobatto grid points, J. Comput. Phys. 283 (2015) 408–413. https://doi.org/10.1016/j.jcp.2014.12.012). First, we write the desired matrix elements in terms of Legendre polynomials

      \[ l_i(x) = \sum_j \frac{P_j(x)P_j(x_i)w_i}{\gamma_j}\]

      with $w_i$ the weights from an integration on the Gauss-Legendre-Lobatto (or Radau) points $x_i$, i.e.,

      \[ \int^1_{-1} f(x) d x = \sum_{i} f(x_i)w_i,\]

      and $\gamma_j = \sum_k w_k P_j(x_k)P_j(x_k)$ the numerical inner-product. Then, a matrix element can be expressed in integrals over Legendre polynomials rather than Lagrange polynomials, i.e.,

      \[ M_{ij} = \int^1_{-1} l_i(x)l_j(x) d x = \sum_{mn} \frac{w_m P_m(x_i) w_n P_n(x_j)}{\gamma_m\gamma_n} \int^{1}_{-1} P_m(x)P_n(x) d x. \]

      Defining

      \[ A_{mn} = \int^{1}_{-1} P_m(x)P_n(x) d x, \]

      we can thus write

      \[ M_{ij} = \sum_{mn} \frac{w_m P_m(x_i) w_n P_n(x_j)}{\gamma_m\gamma_n} A_{mn}. \]

      We can use a quadrature which yields exact results (to machine precision) to evaluate $A_{mn}$ using fast library functions for the Legendre polynomials, and then carry out the sum $\sum_{mn}$ to obtain exact results (to machine-precision). Here we use a Gauss-Legendre integration quadrature with exact results up to polynomials with order $k_{max} = 4N +1$, with $N=$ngrid and the highest order polynomial product that we integrate is $P_{N-1}(x)P_{N-1}(x)x^2$, which has order $k=2N < k_{max}$.

      source
      moment_kinetics.gauss_legendre.gausslobattolegendre_differentiation_matrix!Method

      Formula for Gauss-Legendre-Lobatto 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 
      +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 with a scaling factor.

      source
      moment_kinetics.gauss_legendre.GaussLegendre_weak_product_matrix!Method

      Assign abitrary weak (nonlinear) inner product matrix Q on a 1D line with Jacobian equal to 1. matrix Q acts on two vectors x1 and x2 such that the quadratic form y = x1 * Q * x2 is also a vector. See documentation of corresponding function for linear inner product matrices.

      source
      moment_kinetics.gauss_legendre.GaussLegendre_weak_product_matrix!Method

      Assign abitrary weak inner product matrix Q on a 1D line with Jacobian equal to 1 matrix Q acts on a single vector x such that y = Q * x is also a vector.

      We use a projection onto Gauss-Legendre polynomials to carry out the calculation in two steps (see, e.g, S. A. Teukolsky, Short note on the mass matrix for Gauss–Lobatto grid points, J. Comput. Phys. 283 (2015) 408–413. https://doi.org/10.1016/j.jcp.2014.12.012). First, we write the desired matrix elements in terms of Legendre polynomials

      \[ l_i(x) = \sum_j \frac{P_j(x)P_j(x_i)w_i}{\gamma_j}\]

      with $w_i$ the weights from an integration on the Gauss-Legendre-Lobatto (or Radau) points $x_i$, i.e.,

      \[ \int^1_{-1} f(x) d x = \sum_{i} f(x_i)w_i,\]

      and $\gamma_j = \sum_k w_k P_j(x_k)P_j(x_k)$ the numerical inner-product. Then, a matrix element can be expressed in integrals over Legendre polynomials rather than Lagrange polynomials, i.e.,

      \[ M_{ij} = \int^1_{-1} l_i(x)l_j(x) d x = \sum_{mn} \frac{w_m P_m(x_i) w_n P_n(x_j)}{\gamma_m\gamma_n} \int^{1}_{-1} P_m(x)P_n(x) d x. \]

      Defining

      \[ A_{mn} = \int^{1}_{-1} P_m(x)P_n(x) d x, \]

      we can thus write

      \[ M_{ij} = \sum_{mn} \frac{w_m P_m(x_i) w_n P_n(x_j)}{\gamma_m\gamma_n} A_{mn}. \]

      We can use a quadrature which yields exact results (to machine precision) to evaluate $A_{mn}$ using fast library functions for the Legendre polynomials, and then carry out the sum $\sum_{mn}$ to obtain exact results (to machine-precision). Here we use a Gauss-Legendre integration quadrature with exact results up to polynomials with order $k_{max} = 4N +1$, with $N=$ngrid and the highest order polynomial product that we integrate is $P_{N-1}(x)P_{N-1}(x)x^2$, which has order $k=2N < k_{max}$.

      source
      moment_kinetics.gauss_legendre.gausslobattolegendre_differentiation_matrix!Method

      Formula for Gauss-Legendre-Lobatto 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.gaussradaulegendre_differentiation_matrix!Method

      Formula for Gauss-Legendre-Radau differentiation matrix taken from https://doc.nektar.info/tutorials/latest/fundamentals/differentiation/fundamentals-differentiationch2.html

      D -- differentiation matrix 
      +ngrid -- number of points per element (incl. boundary points)

      Note that D has does not include a scaling factor

      source
      moment_kinetics.gauss_legendre.gaussradaulegendre_differentiation_matrix!Method

      Formula for Gauss-Legendre-Radau differentiation matrix taken from https://doc.nektar.info/tutorials/latest/fundamentals/differentiation/fundamentals-differentiationch2.html

      D -- differentiation matrix 
       x -- Gauss-Legendre-Radau 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.get_KJ_local!Method

      If called for coord.name = vperp elemental matrix KJ on the $i^{th}$ element is

      \[ (KJ)_{jk} = -\int^{v_\perp^U}_{v_\perp^L} \frac{\partial\varphi_j(v_\perp)}{\partial v_\perp}\frac{\partial\varphi_k(v_\perp)}{\partial v_\perp} v_\perp^2 d v_\perp - = -\int^1_{-1} (c_i + x s_i)^2l_j^\prime(x)l_k^\prime(x) d x /s_i\]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix KJ is the same as LL (see get_LL_local()!).

      source
      moment_kinetics.gauss_legendre.get_KK_local!Method

      If called for coord.name = vperp elemental matrix KK on the $i^{th}$ element is

      \[ K_{jk} = -\int^{v_\perp^U}_{v_\perp^L} \left(v_\perp \frac{\partial\varphi_j(v_\perp)}{\partial v_\perp} + \varphi_j(v_\perp) \right) +ngrid -- number of points per element (incl. boundary points)

      Note that D has does not include a scaling factor

      source
      moment_kinetics.gauss_legendre.get_KJ_local!Method

      If called for coord.name = vperp elemental matrix KJ on the $i^{th}$ element is

      \[ (KJ)_{jk} = -\int^{v_\perp^U}_{v_\perp^L} \frac{\partial\varphi_j(v_\perp)}{\partial v_\perp}\frac{\partial\varphi_k(v_\perp)}{\partial v_\perp} v_\perp^2 d v_\perp + = -\int^1_{-1} (c_i + x s_i)^2l_j^\prime(x)l_k^\prime(x) d x /s_i\]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix KJ is the same as LL (see get_LL_local()!).

      source
      moment_kinetics.gauss_legendre.get_KK_local!Method

      If called for coord.name = vperp elemental matrix KK on the $i^{th}$ element is

      \[ K_{jk} = -\int^{v_\perp^U}_{v_\perp^L} \left(v_\perp \frac{\partial\varphi_j(v_\perp)}{\partial v_\perp} + \varphi_j(v_\perp) \right) \frac{\partial\varphi_k(v_\perp)}{\partial v_\perp} d v_\perp - = -\int^1_{-1} ((c_i + x s_i)l_j^\prime(x) + l_j(x))l_k^\prime(x) d x /s_i\]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix KK is the same as LL (see get_LL_local!()). IfexplicitBCterms = true`, boundary terms arising from integration by parts are included at the extreme boundary points.

      source
      moment_kinetics.gauss_legendre.get_LL_local!Method

      If called for coord.name = vperp elemental matrix LL on the $i^{th}$ element is

      \[ L_{jk} = -\int^{v_\perp^U}_{v_\perp^L} \frac{\partial\varphi_j(v_\perp)}{\partial v_\perp}\frac{\partial\varphi_k(v_\perp)}{\partial v_\perp} v_\perp d v_\perp + = -\int^1_{-1} ((c_i + x s_i)l_j^\prime(x) + l_j(x))l_k^\prime(x) d x /s_i\]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix KK is the same as LL (see get_LL_local!()). IfexplicitBCterms = true`, boundary terms arising from integration by parts are included at the extreme boundary points.

      source
      moment_kinetics.gauss_legendre.get_LL_local!Method

      If called for coord.name = vperp elemental matrix LL on the $i^{th}$ element is

      \[ L_{jk} = -\int^{v_\perp^U}_{v_\perp^L} \frac{\partial\varphi_j(v_\perp)}{\partial v_\perp}\frac{\partial\varphi_k(v_\perp)}{\partial v_\perp} v_\perp d v_\perp = -\int^1_{-1} (c_i + x s_i)l_j^\prime(x)l_k^\prime(x) d x /s_i\]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix LL is

      \[ L_{jk} = -\int^{v_\|^U}_{v_\|^L} \frac{\partial\varphi_j(v_\|)}{\partial v_\|}\frac{\partial\varphi_k(v_\|)}{\partial v_\|} d v_\| = - -\int^1_{-1} l_j^\prime(x)l_k^\prime(x) d x /s_i.\]

      If explicit_BC_terms = true, boundary terms arising from integration by parts are included at the extreme boundary points.

      source
      moment_kinetics.gauss_legendre.get_MM_local!Method

      If called for coord.name = vperp elemental matrix MM on the $i^{th}$ element is

      \[ M_{jk} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\varphi_k(v_\perp) v_\perp d v_\perp = \int^1_{-1} (c_i + x s_i)l_j(x)l_k(x) s_i d x \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix MM is

      \[ M_{jk} = \int^{v_\|^U}_{v_\|^L} \varphi_j(v_\|)\varphi_k(v_\|) d v_\| = \int^1_{-1} l_j(x)l_k(x) s_i d x.\]

      source
      moment_kinetics.gauss_legendre.get_MN_local!Method

      If called for coord.name = vperp elemental matrix MN on the $i^{th}$ element is

      \[ (MN)_{jk} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\varphi_k(v_\perp) d v_\perp = \int^1_{-1} l_j(x)l_k(x) s_i d x \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix MN is the same as MM (see get_MM_local!()).

      source
      moment_kinetics.gauss_legendre.get_MR_local!Method

      If called for coord.name = vperp elemental matrix MR on the $i^{th}$ element is

      \[ (MR)_{jk} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\varphi_k(v_\perp) v_\perp^2 d v_\perp = \int^1_{-1} (c_i + s_i x)^2 l_j(x)l_k(x) s_i d x \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix MR is the same as MM (see get_MM_local!()).

      source
      moment_kinetics.gauss_legendre.get_PP_local!Method

      If called for coord.name = vperp elemental matrix PP on the $i^{th}$ element is

      \[ P_{jk} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\frac{\partial\varphi_k(v_\perp)}{\partial v_\perp} v_\perp d v_\perp - = \int^1_{-1} (c_i + x s_i)l_j(x)l_k^\prime(x) d x \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix PP is

      \[ P_{jk} = \int^{v_\|^U}_{v_\|^L} \varphi_j(v_\|)\frac{\partial\varphi_k(v_\|)}{\partial v_\|} d v_\| = \int^1_{-1} l_j(x)l_k^\prime(x) d x.\]

      source
      moment_kinetics.gauss_legendre.get_PU_local!Method

      If called for coord.name = vperp elemental matrix PP on the $i^{th}$ element is

      \[ (PU)_{jk} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\frac{\partial\varphi_k(v_\perp)}{\partial v_\perp} v_\perp^2 d v_\perp - = \int^1_{-1} (c_i + x s_i)^2l_j(x)l_k^\prime(x) d x \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix PU is the same as PP see get_PP_local!().

      source
      moment_kinetics.gauss_legendre.get_YY0_local!Method

      If called for coord.name = vperp elemental matrix YY0 on the $i^{th}$ element is

      \[ (YY0)_{jkm} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\varphi_k(v_\perp)\varphi_m(v_\perp) v_\perp d v_\perp + -\int^1_{-1} l_j^\prime(x)l_k^\prime(x) d x /s_i.\]

      If explicit_BC_terms = true, boundary terms arising from integration by parts are included at the extreme boundary points.

      source
      moment_kinetics.gauss_legendre.get_MM_local!Method

      If called for coord.name = vperp elemental matrix MM on the $i^{th}$ element is

      \[ M_{jk} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\varphi_k(v_\perp) v_\perp d v_\perp = \int^1_{-1} (c_i + x s_i)l_j(x)l_k(x) s_i d x \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix MM is

      \[ M_{jk} = \int^{v_\|^U}_{v_\|^L} \varphi_j(v_\|)\varphi_k(v_\|) d v_\| = \int^1_{-1} l_j(x)l_k(x) s_i d x.\]

      source
      moment_kinetics.gauss_legendre.get_MN_local!Method

      If called for coord.name = vperp elemental matrix MN on the $i^{th}$ element is

      \[ (MN)_{jk} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\varphi_k(v_\perp) d v_\perp = \int^1_{-1} l_j(x)l_k(x) s_i d x \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix MN is the same as MM (see get_MM_local!()).

      source
      moment_kinetics.gauss_legendre.get_MR_local!Method

      If called for coord.name = vperp elemental matrix MR on the $i^{th}$ element is

      \[ (MR)_{jk} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\varphi_k(v_\perp) v_\perp^2 d v_\perp = \int^1_{-1} (c_i + s_i x)^2 l_j(x)l_k(x) s_i d x \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix MR is the same as MM (see get_MM_local!()).

      source
      moment_kinetics.gauss_legendre.get_PP_local!Method

      If called for coord.name = vperp elemental matrix PP on the $i^{th}$ element is

      \[ P_{jk} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\frac{\partial\varphi_k(v_\perp)}{\partial v_\perp} v_\perp d v_\perp + = \int^1_{-1} (c_i + x s_i)l_j(x)l_k^\prime(x) d x \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix PP is

      \[ P_{jk} = \int^{v_\|^U}_{v_\|^L} \varphi_j(v_\|)\frac{\partial\varphi_k(v_\|)}{\partial v_\|} d v_\| = \int^1_{-1} l_j(x)l_k^\prime(x) d x.\]

      source
      moment_kinetics.gauss_legendre.get_PU_local!Method

      If called for coord.name = vperp elemental matrix PP on the $i^{th}$ element is

      \[ (PU)_{jk} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\frac{\partial\varphi_k(v_\perp)}{\partial v_\perp} v_\perp^2 d v_\perp + = \int^1_{-1} (c_i + x s_i)^2l_j(x)l_k^\prime(x) d x \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix PU is the same as PP see get_PP_local!().

      source
      moment_kinetics.gauss_legendre.get_YY0_local!Method

      If called for coord.name = vperp elemental matrix YY0 on the $i^{th}$ element is

      \[ (YY0)_{jkm} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\varphi_k(v_\perp)\varphi_m(v_\perp) v_\perp d v_\perp = \int^1_{-1} (c_i + x s_i)l_j(x)l_k(x)l_m(x) s_i d x \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix YY0 is

      \[ (YY0)_{jkm} = \int^{v_\|^U}_{v_\|^L} \varphi_j(v_\|)\varphi_k(v_\|)\varphi_m(v_\|) d v_\| - = \int^1_{-1} l_j(x)l_k(x)l_m(x) s_i d x.\]

      source
      moment_kinetics.gauss_legendre.get_YY1_local!Method

      If called for coord.name = vperp elemental matrix YY1 on the $i^{th}$ element is

      \[ (YY1)_{jkm} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\varphi_k(v_\perp)\frac{\partial\varphi_m(v_\perp)}{\partial v_\perp} v_\perp d v_\perp + = \int^1_{-1} l_j(x)l_k(x)l_m(x) s_i d x.\]

      source
      moment_kinetics.gauss_legendre.get_YY1_local!Method

      If called for coord.name = vperp elemental matrix YY1 on the $i^{th}$ element is

      \[ (YY1)_{jkm} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\varphi_k(v_\perp)\frac{\partial\varphi_m(v_\perp)}{\partial v_\perp} v_\perp d v_\perp = \int^1_{-1} (c_i + x s_i)l_j(x)l_k(x)l_m^\prime(x) d x \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix YY1 is

      \[ (YY1)_{jkm} = \int^{v_\|^U}_{v_\|^L} \varphi_j(v_\|)\varphi_k(v_\|)\frac{\partial\varphi_m(v_\|)}{\partial v_\|} d v_\| - = \int^1_{-1} l_j(x)l_k(x)l_m^\prime(x) d x.\]

      source
      moment_kinetics.gauss_legendre.get_YY2_local!Method

      If called for coord.name = vperp elemental matrix YY2 on the $i^{th}$ element is

      \[ (YY2)_{jkm} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\frac{\partial\varphi_k(v_\|)}{\partial v_\|}\frac{\partial\varphi_m(v_\perp)}{\partial v_\perp} v_\perp d v_\perp + = \int^1_{-1} l_j(x)l_k(x)l_m^\prime(x) d x.\]

      source
      moment_kinetics.gauss_legendre.get_YY2_local!Method

      If called for coord.name = vperp elemental matrix YY2 on the $i^{th}$ element is

      \[ (YY2)_{jkm} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\frac{\partial\varphi_k(v_\|)}{\partial v_\|}\frac{\partial\varphi_m(v_\perp)}{\partial v_\perp} v_\perp d v_\perp = \int^1_{-1} (c_i + x s_i)l_j(x)l_k^\prime(x)l_m^\prime(x) d x/s_i \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix YY2 is

      \[ (YY2)_{jkm} = \int^{v_\|^U}_{v_\|^L} \varphi_j(v_\|)\frac{\partial\varphi_k(v_\|)}{\partial v_\|}\frac{\partial\varphi_m(v_\|)}{\partial v_\|} d v_\| - = \int^1_{-1} l_j(x)l_k^\prime(x)l_m^\prime(x) d x /s_i.\]

      source
      moment_kinetics.gauss_legendre.get_YY3_local!Method

      If called for coord.name = vperp elemental matrix YY3 on the $i^{th}$ element is

      \[ (YY3)_{jkm} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\frac{\partial\varphi_k(v_\|)}{\partial v_\|}\varphi_m(v_\perp) v_\perp d v_\perp + = \int^1_{-1} l_j(x)l_k^\prime(x)l_m^\prime(x) d x /s_i.\]

      source
      moment_kinetics.gauss_legendre.get_YY3_local!Method

      If called for coord.name = vperp elemental matrix YY3 on the $i^{th}$ element is

      \[ (YY3)_{jkm} = \int^{v_\perp^U}_{v_\perp^L} \varphi_j(v_\perp)\frac{\partial\varphi_k(v_\|)}{\partial v_\|}\varphi_m(v_\perp) v_\perp d v_\perp = \int^1_{-1} (c_i + x s_i)l_j(x)l_k^\prime(x)l_m(x) d x \]

      with $c_i$ and $s_i$ the appropriate shift and scale factors, respectively. Otherwise, if called for any other coordinate elemental matrix YY3 is

      \[ (YY3)_{jkm} = \int^{v_\|^U}_{v_\|^L} \varphi_j(v_\|)\frac{\partial\varphi_k(v_\|)}{\partial v_\|}\varphi_m(v_\|) d v_\| - = \int^1_{-1} l_j(x)l_k^\prime(x)l_m(x) d x.\]

      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 derivative_elements_to_full_grid!() 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
      + = \int^1_{-1} l_j(x)l_k^\prime(x)l_m(x) d x.\]

      source
      moment_kinetics.gauss_legendre.identity_matrix!Method

      Function that fills and n x n array with the values of the identity matrix I.

      source
      moment_kinetics.gauss_legendre.ielement_global_funcMethod

      Function for finding the elemental index in the global distributed-memory grid. Distributed-memory for global finite-element operators is not yet supported.

      source
      moment_kinetics.gauss_legendre.scale_factor_funcMethod

      Function for computing the scale factor on a grid with uniformed spaced element boundaries. Unused.

      source
      moment_kinetics.gauss_legendre.scaled_gauss_legendre_lobatto_gridMethod

      Function for setting up the full Gauss-Legendre-Lobatto grid and collocation point weights.

      source
      moment_kinetics.gauss_legendre.scaled_gauss_legendre_radau_gridMethod

      Function for setting up the full Gauss-Legendre-Radau grid and collocation point weights.

      source
      moment_kinetics.gauss_legendre.setup_gausslegendre_pseudospectralMethod

      Function to create gausslegendre_info struct.

      source
      moment_kinetics.gauss_legendre.setup_gausslegendre_pseudospectral_lobattoMethod

      Function that creates the gausslegendre_base_info struct for Lobatto points. If collision_operator_dim = true, assign the elemental matrices used to implement the Fokker-Planck collision operator.

      source
      moment_kinetics.gauss_legendre.setup_gausslegendre_pseudospectral_radauMethod

      Function that creates the gausslegendre_base_info struct for Lobatto points. If collision_operator_dim = true, assign the elemental matrices used to implement the Fokker-Planck collision operator.

      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 derivative_elements_to_full_grid!() 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
      moment_kinetics.gauss_legendre.shift_factor_funcMethod

      Function for computing the shift factor on a grid with uniformed spaced element boundaries. Unused.

      source
      moment_kinetics.interpolation.single_element_interpolate!Method

      Function to perform interpolation on a single element.

      source
      diff --git a/previews/PR302/zz_geo/index.html b/previews/PR302/zz_geo/index.html index 30372d07e..8631ac45b 100644 --- a/previews/PR302/zz_geo/index.html +++ b/previews/PR302/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/previews/PR302/zz_gyroaverages/index.html b/previews/PR302/zz_gyroaverages/index.html index f39b8b114..3782ff9de 100644 --- a/previews/PR302/zz_gyroaverages/index.html +++ b/previews/PR302/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/previews/PR302/zz_initial_conditions/index.html b/previews/PR302/zz_initial_conditions/index.html index 1574db08b..38208dc80 100644 --- a/previews/PR302/zz_initial_conditions/index.html +++ b/previews/PR302/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/previews/PR302/zz_input_structs/index.html b/previews/PR302/zz_input_structs/index.html index 278388fe8..00f3988fd 100644 --- a/previews/PR302/zz_input_structs/index.html +++ b/previews/PR302/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.convert_to_sorted_nested_OptionsDictMethod
      convert_to_sorted_nested_OptionsDict(d::AbstractDict)

      To ensure consistency when writing options to an output file, the entries in the dictionary containing the options must be in a deterministic order. As TOML reads options into a nested Dict, the only way to guarantee this is to sort the options before storing them in an OptionsDict. OptionsDict is an alias for OrderedDict{String,Any} so it will preserve the order of entries as long as they were in a consistent order when it was created.

      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 an AbstractDict) 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::OptionsDict, 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 OptionsDict that can be modified, and then use that OptionsDict 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]::OptionsDict 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.convert_to_sorted_nested_OptionsDictMethod
      convert_to_sorted_nested_OptionsDict(d::AbstractDict)

      To ensure consistency when writing options to an output file, the entries in the dictionary containing the options must be in a deterministic order. As TOML reads options into a nested Dict, the only way to guarantee this is to sort the options before storing them in an OptionsDict. OptionsDict is an alias for OrderedDict{String,Any} so it will preserve the order of entries as long as they were in a consistent order when it was created.

      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 an AbstractDict) 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::OptionsDict, 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 OptionsDict that can be modified, and then use that OptionsDict 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]::OptionsDict by adding defaults for any values that are not already present.

      Ignores any sections, as these will be checked separately.

      source
      diff --git a/previews/PR302/zz_interpolation/index.html b/previews/PR302/zz_interpolation/index.html index 2d86b02cd..c22f61ed5 100644 --- a/previews/PR302/zz_interpolation/index.html +++ b/previews/PR302/zz_interpolation/index.html @@ -1,3 +1,3 @@ -interpolation · moment_kinetics

      interpolation

      moment_kinetics.interpolation.fill_single_element_interpolation_matrix!Function
      fill_single_element_interpolation_matrix!(
      -    matrix_slice, newgrid, jelement, coord, spectral)

      Set matrix_slice equal to the interpolation matrix that interpolates values from the element jelement of the vector being multiplied onto the grid points given by newgrid (which must be contained within the physical space covered by element jelement).

      coord is the coordinate object for the dimension in which the interpolation is done, and spectral the discretization object corresponding to jelement.

      source
      moment_kinetics.interpolation.interpolate_symmetric!Function
      interpolate_symmetric!(result, newgrid, f, oldgrid, derivative=Val(0))

      Interpolate f from oldgrid to newgrid, imposing that f(x) is symmetric around x=0, so the interpolation is done by fitting a polynomial in x^2 to the values of f given on oldgrid, and evaluating on newgrid. Since interpolation is done in a polynomial of x^2, the signs of the points on newgrid and oldgrid do not matter, and are ignored.

      Val(n) can be passed as derivative to calculate the derivative of order n of the interpolating function (only a few values of n are supported).

      source
      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. derivative : Val(n) The value of n the integer in the Val{n} indicates the order of the derivative to be calculated of the interpolating function (only a few values of n are supported). Defaults to Val(0), which means just calculating the interpolating function itself.

      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. derivative : Val(n) The value of n the integer in the Val{n} indicates the order of the derivative to be calculated of the interpolating function (only a few values of n are supported). Defaults to Val(0), which means just calculating the interpolating function itself.

      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.fill_single_element_interpolation_matrix!Function
      fill_single_element_interpolation_matrix!(
      +    matrix_slice, newgrid, jelement, coord, spectral)

      Set matrix_slice equal to the interpolation matrix that interpolates values from the element jelement of the vector being multiplied onto the grid points given by newgrid (which must be contained within the physical space covered by element jelement).

      coord is the coordinate object for the dimension in which the interpolation is done, and spectral the discretization object corresponding to jelement.

      source
      moment_kinetics.interpolation.interpolate_symmetric!Function
      interpolate_symmetric!(result, newgrid, f, oldgrid, derivative=Val(0))

      Interpolate f from oldgrid to newgrid, imposing that f(x) is symmetric around x=0, so the interpolation is done by fitting a polynomial in x^2 to the values of f given on oldgrid, and evaluating on newgrid. Since interpolation is done in a polynomial of x^2, the signs of the points on newgrid and oldgrid do not matter, and are ignored.

      Val(n) can be passed as derivative to calculate the derivative of order n of the interpolating function (only a few values of n are supported).

      source
      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. derivative : Val(n) The value of n the integer in the Val{n} indicates the order of the derivative to be calculated of the interpolating function (only a few values of n are supported). Defaults to Val(0), which means just calculating the interpolating function itself.

      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. derivative : Val(n) The value of n the integer in the Val{n} indicates the order of the derivative to be calculated of the interpolating function (only a few values of n are supported). Defaults to Val(0), which means just calculating the interpolating function itself.

      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/previews/PR302/zz_ionization/index.html b/previews/PR302/zz_ionization/index.html index b17e14fb6..fb5f7a920 100644 --- a/previews/PR302/zz_ionization/index.html +++ b/previews/PR302/zz_ionization/index.html @@ -1,2 +1,2 @@ -ionization · moment_kinetics
      +ionization · moment_kinetics
      diff --git a/previews/PR302/zz_krook_collisions/index.html b/previews/PR302/zz_krook_collisions/index.html index 5ba41add6..e8a0d2d0f 100644 --- a/previews/PR302/zz_krook_collisions/index.html +++ b/previews/PR302/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/previews/PR302/zz_lagrange_polynomials/index.html b/previews/PR302/zz_lagrange_polynomials/index.html index 026c250f9..e7652c241 100644 --- a/previews/PR302/zz_lagrange_polynomials/index.html +++ b/previews/PR302/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_derivative_optimisedMethod
      lagrange_poly_derivative_optimised(other_nodes, one_over_denominator, x)

      Optimised calculation of the first derivative of a Lagrange polynomial, 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
      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_derivative_optimisedMethod
      lagrange_poly_derivative_optimised(other_nodes, one_over_denominator, x)

      Optimised calculation of the first derivative of a Lagrange polynomial, 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
      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/previews/PR302/zz_load_data/index.html b/previews/PR302/zz_load_data/index.html index 927b67158..ead5480c4 100644 --- a/previews/PR302/zz_load_data/index.html +++ b/previews/PR302/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, group=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).

      If a variable is found in a group other than "dynamic_data", the group name should be passed to the group argument.

      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, group=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).

      If a variable is found in a group other than "dynamic_data", the group name should be passed to the group argument.

      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/previews/PR302/zz_looping/index.html b/previews/PR302/zz_looping/index.html index 2244c1fe6..99896a346 100644 --- a/previews/PR302/zz_looping/index.html +++ b/previews/PR302/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/previews/PR302/zz_makie_post_processing/index.html b/previews/PR302/zz_makie_post_processing/index.html index 732365e29..b95bb84bd 100644 --- a/previews/PR302/zz_makie_post_processing/index.html +++ b/previews/PR302/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,
      +           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,
                               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,
      +                        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,
                                 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 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,
                    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,
      +        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,
      +                     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,
      +                       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,
                 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,17 +672,17 @@
                   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
      makie_post_processing.timing_dataMethod
      timing_data(run_info; plot_prefix=nothing, threshold=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
      makie_post_processing.timing_dataMethod
      timing_data(run_info; plot_prefix=nothing, threshold=nothing,
                   include_patterns=nothing, exclude_patterns=nothing, ranks=nothing,
      -            figsize=nothing, include_legend=true)

      Plot timings from different parts of the moment_kinetics code. Only timings from function calls during the time evolution loop are included, not from the setup, because we plot versus time.

      To reduce clutter, timings whose total time (at the final time point) is less than threshold times the overall run time will be excluded. By default, threshold is 1.0e-3.

      When there is more than one MPI rank present, the timings for each rank will be plotted separately. The lines will be labelled with the MPI rank, with the position of the labels moving along the lines one point at a time, to try to avoid overlapping many labels. If the curves all overlap, this will look like one curve labelled by many MPI ranks.

      There are many timers, so it can be useful to filter them to see only the most relevant ones. By default all timers will be plotted. If include_patterns is passed, and exclude_patterns is not, then only the total time and any timers that match include_patterns (matches checked using occursin()) will be included in the plots. If exclude_patterns is passed, then any timers that match (matches checked using occursin()) exclude_patterns will be omitted, unless they match include_patterns in which case they will still be included. If ranks is passed, then only the MPI ranks with indices found in ranks will be included.

      figsize can be passed to customize the size of the figures that plots are made on. This can be useful because the legends may become very large when many timers are plotted, in which case a larger figure might be needed.

      threshold, exclude_patterns, include_patterns, ranks, and figsize can also be set in this_input_dict. When this function is called as part of makie_post_process, input_dict is passed as this_input_dict so that the settings are read from the post processing input file (by default post_processing_input.toml). The function arguments take precedence, if they are given.

      If you load GLMakie by doing using GLMakie before running this function, but after calling using makie_post_processing (because CairoMakie is loaded when the module is loaded and would take over if you load GLMakie before makie_post_processing), the figures will be displayed in interactive windows. When you hover over a line some useful information will be displayed.

      Pass include_legend=false to remove legends from the figures. This is mostly useful for interactive figures where hovering over the lines can show what they are, so that the legend is not needed.

      source
      + figsize=nothing, include_legend=true)

      Plot timings from different parts of the moment_kinetics code. Only timings from function calls during the time evolution loop are included, not from the setup, because we plot versus time.

      To reduce clutter, timings whose total time (at the final time point) is less than threshold times the overall run time will be excluded. By default, threshold is 1.0e-3.

      When there is more than one MPI rank present, the timings for each rank will be plotted separately. The lines will be labelled with the MPI rank, with the position of the labels moving along the lines one point at a time, to try to avoid overlapping many labels. If the curves all overlap, this will look like one curve labelled by many MPI ranks.

      There are many timers, so it can be useful to filter them to see only the most relevant ones. By default all timers will be plotted. If include_patterns is passed, and exclude_patterns is not, then only the total time and any timers that match include_patterns (matches checked using occursin()) will be included in the plots. If exclude_patterns is passed, then any timers that match (matches checked using occursin()) exclude_patterns will be omitted, unless they match include_patterns in which case they will still be included. If ranks is passed, then only the MPI ranks with indices found in ranks will be included.

      figsize can be passed to customize the size of the figures that plots are made on. This can be useful because the legends may become very large when many timers are plotted, in which case a larger figure might be needed.

      threshold, exclude_patterns, include_patterns, ranks, and figsize can also be set in this_input_dict. When this function is called as part of makie_post_process, input_dict is passed as this_input_dict so that the settings are read from the post processing input file (by default post_processing_input.toml). The function arguments take precedence, if they are given.

      If you load GLMakie by doing using GLMakie before running this function, but after calling using makie_post_processing (because CairoMakie is loaded when the module is loaded and would take over if you load GLMakie before makie_post_processing), the figures will be displayed in interactive windows. When you hover over a line some useful information will be displayed.

      Pass include_legend=false to remove legends from the figures. This is mostly useful for interactive figures where hovering over the lines can show what they are, so that the legend is not needed.

      source
      diff --git a/previews/PR302/zz_manufactured_solns/index.html b/previews/PR302/zz_manufactured_solns/index.html index 87293f0a7..c21d2c6bd 100644 --- a/previews/PR302/zz_manufactured_solns/index.html +++ b/previews/PR302/zz_manufactured_solns/index.html @@ -1,2 +1,2 @@ -manufactured_solns · moment_kinetics
      +manufactured_solns · moment_kinetics
      diff --git a/previews/PR302/zz_maxwell_diffusion/index.html b/previews/PR302/zz_maxwell_diffusion/index.html index 1607a7881..819a48831 100644 --- a/previews/PR302/zz_maxwell_diffusion/index.html +++ b/previews/PR302/zz_maxwell_diffusion/index.html @@ -1,2 +1,2 @@ -maxwell_diffusion · moment_kinetics

      maxwell_diffusion

      +maxwell_diffusion · moment_kinetics

      maxwell_diffusion

      diff --git a/previews/PR302/zz_moment_constraints/index.html b/previews/PR302/zz_moment_constraints/index.html index 734514d5d..542f4661e 100644 --- a/previews/PR302/zz_moment_constraints/index.html +++ b/previews/PR302/zz_moment_constraints/index.html @@ -1,7 +1,7 @@ -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.add_electron_implicit_constraint_forcing_to_Jacobian!Function
      add_electron_implicit_constraint_forcing_to_Jacobian!(jacobian_matrix, f,
      +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
      + f_offset=0)

      Add the contributions corresponding to electron_implicit_constraint_forcing! to jacobian_matrix.

      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
      diff --git a/previews/PR302/zz_moment_kinetics/index.html b/previews/PR302/zz_moment_kinetics/index.html index d293d945a..197521763 100644 --- a/previews/PR302/zz_moment_kinetics/index.html +++ b/previews/PR302/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/previews/PR302/zz_moment_kinetics_input/index.html b/previews/PR302/zz_moment_kinetics_input/index.html index f8b69190b..eedc5a8a7 100644 --- a/previews/PR302/zz_moment_kinetics_input/index.html +++ b/previews/PR302/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/previews/PR302/zz_moment_kinetics_structs/index.html b/previews/PR302/zz_moment_kinetics_structs/index.html index 83eb87043..63dab02c5 100644 --- a/previews/PR302/zz_moment_kinetics_structs/index.html +++ b/previews/PR302/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/previews/PR302/zz_neutral_r_advection/index.html b/previews/PR302/zz_neutral_r_advection/index.html index a7c040470..896e9b835 100644 --- a/previews/PR302/zz_neutral_r_advection/index.html +++ b/previews/PR302/zz_neutral_r_advection/index.html @@ -1,2 +1,2 @@ -neutral_r_advection · moment_kinetics
      +neutral_r_advection · moment_kinetics
      diff --git a/previews/PR302/zz_neutral_vz_advection/index.html b/previews/PR302/zz_neutral_vz_advection/index.html index 2c36f730a..68189faba 100644 --- a/previews/PR302/zz_neutral_vz_advection/index.html +++ b/previews/PR302/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/previews/PR302/zz_neutral_z_advection/index.html b/previews/PR302/zz_neutral_z_advection/index.html index febd99a6e..1a2096bc5 100644 --- a/previews/PR302/zz_neutral_z_advection/index.html +++ b/previews/PR302/zz_neutral_z_advection/index.html @@ -1,2 +1,2 @@ -neutral_z_advection · moment_kinetics

      neutral_z_advection

      +neutral_z_advection · moment_kinetics

      neutral_z_advection

      diff --git a/previews/PR302/zz_nonlinear_solvers/index.html b/previews/PR302/zz_nonlinear_solvers/index.html index f27218606..8d542d6ed 100644 --- a/previews/PR302/zz_nonlinear_solvers/index.html +++ b/previews/PR302/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. [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
      diff --git a/previews/PR302/zz_numerical_dissipation/index.html b/previews/PR302/zz_numerical_dissipation/index.html index bb9d21023..fa3c06ea3 100644 --- a/previews/PR302/zz_numerical_dissipation/index.html +++ b/previews/PR302/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/previews/PR302/zz_plot_MMS_sequence/index.html b/previews/PR302/zz_plot_MMS_sequence/index.html index 6ee1ef540..5cec696fc 100644 --- a/previews/PR302/zz_plot_MMS_sequence/index.html +++ b/previews/PR302/zz_plot_MMS_sequence/index.html @@ -1,2 +1,2 @@ -plot_MMS_sequence · moment_kinetics
      +plot_MMS_sequence · moment_kinetics
      diff --git a/previews/PR302/zz_plot_sequence/index.html b/previews/PR302/zz_plot_sequence/index.html index 92f0543f8..ad3160f3c 100644 --- a/previews/PR302/zz_plot_sequence/index.html +++ b/previews/PR302/zz_plot_sequence/index.html @@ -1,2 +1,2 @@ -plot_sequence · moment_kinetics
      +plot_sequence · moment_kinetics
      diff --git a/previews/PR302/zz_plots_post_processing/index.html b/previews/PR302/zz_plots_post_processing/index.html index d28633a75..f638bde4e 100644 --- a/previews/PR302/zz_plots_post_processing/index.html +++ b/previews/PR302/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/previews/PR302/zz_quadrature/index.html b/previews/PR302/zz_quadrature/index.html index 201b59465..8e470dd97 100644 --- a/previews/PR302/zz_quadrature/index.html +++ b/previews/PR302/zz_quadrature/index.html @@ -1,2 +1,2 @@ -quadrature · moment_kinetics
      +quadrature · moment_kinetics
      diff --git a/previews/PR302/zz_r_advection/index.html b/previews/PR302/zz_r_advection/index.html index 8367767d1..18d50220e 100644 --- a/previews/PR302/zz_r_advection/index.html +++ b/previews/PR302/zz_r_advection/index.html @@ -1,2 +1,2 @@ -r_advection · moment_kinetics
      +r_advection · moment_kinetics
      diff --git a/previews/PR302/zz_reference_parameters/index.html b/previews/PR302/zz_reference_parameters/index.html index 78a49d59a..858ee8bad 100644 --- a/previews/PR302/zz_reference_parameters/index.html +++ b/previews/PR302/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/previews/PR302/zz_runge_kutta/index.html b/previews/PR302/zz_runge_kutta/index.html index 4278af5cb..9ec22689f 100644 --- a/previews/PR302/zz_runge_kutta/index.html +++ b/previews/PR302/zz_runge_kutta/index.html @@ -1,7 +1,7 @@ -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,
      +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)
       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/previews/PR302/zz_source_terms/index.html b/previews/PR302/zz_source_terms/index.html index 4f017f63d..0f5cf9348 100644 --- a/previews/PR302/zz_source_terms/index.html +++ b/previews/PR302/zz_source_terms/index.html @@ -1,2 +1,2 @@ -source_terms · moment_kinetics

      source_terms

      +source_terms · moment_kinetics

      source_terms

      diff --git a/previews/PR302/zz_species_input/index.html b/previews/PR302/zz_species_input/index.html index bd9be3b42..58034fef9 100644 --- a/previews/PR302/zz_species_input/index.html +++ b/previews/PR302/zz_species_input/index.html @@ -1,2 +1,2 @@ -species_input · moment_kinetics
      +species_input · moment_kinetics
      diff --git a/previews/PR302/zz_time_advance/index.html b/previews/PR302/zz_time_advance/index.html index 9b7a05776..377b478d1 100644 --- a/previews/PR302/zz_time_advance/index.html +++ b/previews/PR302/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,
      +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,
                                 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,
      +                          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/previews/PR302/zz_timer_utils/index.html b/previews/PR302/zz_timer_utils/index.html index 45e062b1e..5f65b4e80 100644 --- a/previews/PR302/zz_timer_utils/index.html +++ b/previews/PR302/zz_timer_utils/index.html @@ -1,2 +1,2 @@ -timer_utils · moment_kinetics

      timer_utils

      moment_kinetics.timer_utils.format_global_timerMethod
      format_global_timer(; show=true, truncate_output=true)

      Manipulate a copy of the global_timer, to remove some things to reduce the clutter when it is printed.

      By default the resulting TimerOutput is displayed in the terminal. Pass show_output=true to display the resulting TimerOutput in the terminal.

      By default, the output is truncated, removing deeply nested timers and timers with very little time. To include all timers, pass truncate_output=false. The threshold for dropping timers is if their time is less than threshold times the total time.

      By default, returns a string showing the contents of the TimerOutput. When show_output=true is passed, just returns the empty string.

      source
      moment_kinetics.timer_utils.timeit_debug_enabledMethod
      timeit_debug_enabled()

      @timeit_debug uses a function defined in the enclosing module called timeit_debug_enabled() to decide whether to include debug timers (included if this function returns true, or not - with zero overhead - if it returns false).

      To control the debug timers in moment_kinetics we define this function once, in timer_utils, and import it from there into any other modules that use @timeit_debug.

      To activate debug timers, edit this function so that it returns true.

      source
      +timer_utils · moment_kinetics

      timer_utils

      moment_kinetics.timer_utils.format_global_timerMethod
      format_global_timer(; show=true, truncate_output=true)

      Manipulate a copy of the global_timer, to remove some things to reduce the clutter when it is printed.

      By default the resulting TimerOutput is displayed in the terminal. Pass show_output=true to display the resulting TimerOutput in the terminal.

      By default, the output is truncated, removing deeply nested timers and timers with very little time. To include all timers, pass truncate_output=false. The threshold for dropping timers is if their time is less than threshold times the total time.

      By default, returns a string showing the contents of the TimerOutput. When show_output=true is passed, just returns the empty string.

      source
      moment_kinetics.timer_utils.timeit_debug_enabledMethod
      timeit_debug_enabled()

      @timeit_debug uses a function defined in the enclosing module called timeit_debug_enabled() to decide whether to include debug timers (included if this function returns true, or not - with zero overhead - if it returns false).

      To control the debug timers in moment_kinetics we define this function once, in timer_utils, and import it from there into any other modules that use @timeit_debug.

      To activate debug timers, edit this function so that it returns true.

      source
      diff --git a/previews/PR302/zz_type_definitions/index.html b/previews/PR302/zz_type_definitions/index.html index 6a401e9b4..5c5cf4a99 100644 --- a/previews/PR302/zz_type_definitions/index.html +++ b/previews/PR302/zz_type_definitions/index.html @@ -1,2 +1,2 @@ -type_definitions · moment_kinetics
      +type_definitions · moment_kinetics
      diff --git a/previews/PR302/zz_utils/index.html b/previews/PR302/zz_utils/index.html index 5d8fc1338..d4f08f08f 100644 --- a/previews/PR302/zz_utils/index.html +++ b/previews/PR302/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::AbstractDict)
      -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 AbstractDict is a mixed AbstractDict of AbstractDicts and non-AbstractDict float/int/string entries, and the keyword arguments are also a mix of AbstractDicts and non-AbstractDicts

      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::AbstractDict)
      +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 AbstractDict is a mixed AbstractDict of AbstractDicts and non-AbstractDict float/int/string entries, and the keyword arguments are also a mix of AbstractDicts and non-AbstractDicts

      source
      diff --git a/previews/PR302/zz_velocity_grid_transforms/index.html b/previews/PR302/zz_velocity_grid_transforms/index.html index 7669ee1fe..74965b87b 100644 --- a/previews/PR302/zz_velocity_grid_transforms/index.html +++ b/previews/PR302/zz_velocity_grid_transforms/index.html @@ -1,2 +1,2 @@ -velocity_grid_transforms · moment_kinetics
      +velocity_grid_transforms · moment_kinetics
      diff --git a/previews/PR302/zz_velocity_moments/index.html b/previews/PR302/zz_velocity_moments/index.html index 92bf542b3..c0110a38f 100644 --- a/previews/PR302/zz_velocity_moments/index.html +++ b/previews/PR302/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/previews/PR302/zz_vpa_advection/index.html b/previews/PR302/zz_vpa_advection/index.html index 13034b018..250359d93 100644 --- a/previews/PR302/zz_vpa_advection/index.html +++ b/previews/PR302/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/previews/PR302/zz_z_advection/index.html b/previews/PR302/zz_z_advection/index.html index ace908ea5..977badb55 100644 --- a/previews/PR302/zz_z_advection/index.html +++ b/previews/PR302/zz_z_advection/index.html @@ -1,2 +1,2 @@ -z_advection · moment_kinetics
      +z_advection · moment_kinetics