-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add plots and package installation instruction to docs (#449)
* Add installation instructions for users * Add usage to readme * Renove failing doctest * Fix docs * Add plots --------- Co-authored-by: Niklas Neher <[email protected]>
- Loading branch information
1 parent
cf4af14
commit 3164e99
Showing
4 changed files
with
66 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,42 +30,67 @@ operating system](https://julialang.org/downloads/platform/). TrixiParticles.jl | |
with Julia v1.9 and newer. We recommend using the latest stable release of Julia. | ||
|
||
### For users | ||
<!-- | ||
TrixiParticles.jl is a registered Julia package. Hence, you | ||
can install TrixiParticles.jl and OrdinaryDiffEq.jl (used by the examples) by executing the following commands in the Julia REPL: | ||
TrixiParticles.jl is a registered Julia package. | ||
You can install TrixiParticles.jl, | ||
[OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) (used for time integration) | ||
and [Plots.jl](https://github.com/JuliaPlots/Plots.jl) by executing the following commands | ||
in the Julia REPL: | ||
```julia | ||
julia> using Pkg | ||
|
||
julia> Pkg.add(["OrdinaryDiffEq", "TrixiParticles"]) | ||
julia> Pkg.add(["TrixiParticles", "OrdinaryDiffEq", "Plots"]) | ||
``` | ||
--> | ||
|
||
### For developers | ||
If you plan on editing TrixiParticles.jl itself, you can download TrixiParticles.jl locally and use the | ||
code from the cloned directory: | ||
If you plan on editing TrixiParticles.jl itself, you can download TrixiParticles.jl | ||
to a local folder and use the code from the cloned directory: | ||
```bash | ||
git clone [email protected]:trixi-framework/TrixiParticles.jl.git | ||
cd TrixiParticles.jl | ||
mkdir run | ||
cd run | ||
julia --project=. -e 'using Pkg; Pkg.develop(PackageSpec(path=".."))' # Install locally | ||
julia --project=. -e 'using Pkg; Pkg.add("OrdinaryDiffEq")' # Install additional packages | ||
julia --project=run -e 'using Pkg; Pkg.develop(PackageSpec(path="."))' # Add TrixiParticles.jl to `run` project | ||
julia --project=run -e 'using Pkg; Pkg.add("OrdinaryDiffEq", "Plots")' # Add additional packages | ||
``` | ||
**Note:** OrdinaryDiffEq is only necessary to run examples. | ||
|
||
If you installed TrixiParticles.jl this way, you always have to start Julia with the `--project` | ||
flag set to your `run` directory, e.g., | ||
If you installed TrixiParticles.jl this way, you always have to start Julia with the | ||
`--project` flag set to your `run` directory, e.g., | ||
```bash | ||
julia --project=. | ||
julia --project=run | ||
``` | ||
from the TrixiParticles.jl root directory. | ||
Further details can be found in the [documentation](@ref installation). | ||
|
||
## Usage | ||
|
||
In the Julia REPL, first load the package TrixiParticles.jl. | ||
```jldoctest getting_started | ||
julia> using TrixiParticles | ||
``` | ||
|
||
Then start the simulation by executing | ||
```jldoctest getting_started; filter = r".*"s | ||
julia> trixi_include(joinpath(examples_dir(), "fluid", "hydrostatic_water_column_2d.jl")) | ||
``` | ||
|
||
This will open a new window with a 2D visualization of the final solution: | ||
<img src="https://github.com/trixi-framework/TrixiParticles.jl/assets/44124897/95821154-577d-4323-ba57-16ef02ea24e0" width="400"> | ||
|
||
Further details can be found in the [documentation](@ref getting_started). | ||
|
||
## Documentation | ||
|
||
You can find the documentation for the latest release | ||
[here](https://trixi-framework.github.io/TrixiParticles.jl/stable). | ||
|
||
## Publications | ||
|
||
## Cite Us | ||
|
||
## Authors | ||
Erik Faulhaber (University of Cologne) and Niklas Neher (HLRS) implemented the foundations for TrixiParticles.jl and are principal developers along with Sven Berger (hereon). The project was started by Michael Schlottke-Lakemper (RWTH Aachen University/HLRS) and Gregor Gassner (University of Cologne), who provide scientific direction and technical advice. | ||
Erik Faulhaber (University of Cologne) and Niklas Neher (HLRS) implemented the foundations | ||
for TrixiParticles.jl and are principal developers along with Sven Berger (hereon). | ||
The project was started by Michael Schlottke-Lakemper (RWTH Aachen University/HLRS) | ||
and Gregor Gassner (University of Cologne), who provide scientific direction and technical advice. | ||
The full list of contributors can be found in [AUTHORS.md](AUTHORS.md). | ||
|
||
## License and contributing | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,35 @@ | ||
# Installation | ||
# [Installation](@id installation) | ||
|
||
## Setting up Julia | ||
If you have not yet installed Julia, please [follow the instructions for your | ||
operating system](https://julialang.org/downloads/platform/). TrixiParticles.jl works | ||
with Julia v1.9 and newer. We recommend using the latest stable release of Julia. | ||
|
||
## Installation for users | ||
## For users | ||
TrixiParticles.jl is a registered Julia package. | ||
You can install TrixiParticles.jl, | ||
[OrdinaryDiffEq.jl](https://github.com/SciML/OrdinaryDiffEq.jl) (used for time integration) | ||
and [Plots.jl](https://github.com/JuliaPlots/Plots.jl) by executing the following commands | ||
in the Julia REPL: | ||
```julia | ||
julia> using Pkg | ||
|
||
julia> Pkg.add(["TrixiParticles", "OrdinaryDiffEq", "Plots"]) | ||
``` | ||
|
||
## [Installation for developers](@id for-developers) | ||
If you plan on editing TrixiParticles.jl itself, you can download TrixiParticles.jl to a local folder and use the | ||
code from the cloned directory: | ||
## [For developers](@id for-developers) | ||
If you plan on editing TrixiParticles.jl itself, you can download TrixiParticles.jl | ||
to a local folder and use the code from the cloned directory: | ||
```bash | ||
git clone [email protected]:trixi-framework/TrixiParticles.jl.git | ||
cd TrixiParticles.jl | ||
mkdir run | ||
julia --project=run -e 'using Pkg; Pkg.develop(PackageSpec(path="."))' # Install locally | ||
julia --project=run -e 'using Pkg; Pkg.add("OrdinaryDiffEq")' # Add TrixiParticles.jl to `run` project | ||
julia --project=run -e 'using Pkg; Pkg.develop(PackageSpec(path="."))' # Add TrixiParticles.jl to `run` project | ||
julia --project=run -e 'using Pkg; Pkg.add("OrdinaryDiffEq", "Plots")' # Add additional packages | ||
``` | ||
|
||
If you installed TrixiParticles.jl this way, you always have to start Julia with the `--project` | ||
flag set to your `run` directory, e.g., | ||
If you installed TrixiParticles.jl this way, you always have to start Julia with the | ||
`--project` flag set to your `run` directory, e.g., | ||
```bash | ||
julia --project=run | ||
``` | ||
|