Skip to content

Commit

Permalink
Merge pull request #155 from mabarnes/documentation-improvements
Browse files Browse the repository at this point in the history
Small documentation improvements
  • Loading branch information
johnomotani authored Nov 22, 2023
2 parents 190d5d5 + e1f3100 commit c619f4e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@ 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`)
```bash
$ git clone [email protected]: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
```bash
$ git clone https://github.com/mabarnes/moment_kinetics
```
When using https somethings (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.

If you are working on a supported machine, use the `machines/machine_setup.sh`
script, see [Setup for `moment_kinetics` on known clusters](@ref). Otherwise:

Expand Down Expand Up @@ -35,7 +56,7 @@ script, see [Setup for `moment_kinetics` on known clusters](@ref). Otherwise:
```
this significantly decreases the load time but prevents code changes from taking effect when `moment_kinetics.so` is used without repeating the precompilation (to use this option, add an option `-Jmoment_kinetics.so` when starting julia).
4) 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 it is necessary to remove (or rename) the `Manifest.jl` file in the main directory, and generate a new `Manifest.jl` with step 1) above. It can sometimes be necessary to remove or rename the `.julia/` folder in your root directory for this step to be successful.
4) 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 it is necessary to remove (or rename) the `Manifest.jl` file in the main directory, and generate a new `Manifest.jl` with step 2) above. It can sometimes be necessary to remove or rename the `.julia/` folder in your root directory for this step to be successful.
5) One may have to set an environment variable to avoid error messages from the Qt library. If you execute the command
```
Expand All @@ -59,6 +80,8 @@ 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.
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
Expand Down
8 changes: 4 additions & 4 deletions test/calculus_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function runtests()
end
end

@testset "finite_difference derivatives (4 argument), Neumann" verbose=false begin
@testset "finite_difference derivatives (4 argument)" verbose=false begin
@testset "$nelement $ngrid" for bc ("constant", "zero"),
nelement (1:5), ngrid (9:33)

Expand Down Expand Up @@ -212,7 +212,7 @@ function runtests()
end
end

@testset "finite_difference derivatives upwinding (5 argument), Neumann" verbose=false begin
@testset "finite_difference derivatives upwinding (5 argument)" verbose=false begin
@testset "$nelement $ngrid" for bc ("constant", "zero"),
(fd_option, rtol_prefactor) (("fourth_order_centered", 3.0),
("second_order_centered", 3.0),
Expand Down Expand Up @@ -673,7 +673,7 @@ function runtests()
end
end

@testset "Chebyshev pseudospectral derivatives (4 argument), Neumann" verbose=false begin
@testset "Chebyshev pseudospectral derivatives (4 argument), polynomials" verbose=false begin
@testset "$nelement $ngrid" for bc ("constant", "zero"), element_spacing_option ("uniform", "sqrt"),
nelement (1:5), ngrid (3:33)

Expand Down Expand Up @@ -724,7 +724,7 @@ function runtests()
end
end

@testset "Chebyshev pseudospectral derivatives upwinding (5 argument), Neumann" verbose=false begin
@testset "Chebyshev pseudospectral derivatives upwinding (5 argument), polynomials" verbose=false begin
@testset "$nelement $ngrid" for bc ("constant", "zero"), element_spacing_option ("uniform", "sqrt"),
nelement (1:5), ngrid (3:33)

Expand Down

0 comments on commit c619f4e

Please sign in to comment.