Skip to content

Commit

Permalink
increment version
Browse files Browse the repository at this point in the history
  • Loading branch information
boriskaus committed Nov 20, 2022
1 parent 3b16dd5 commit 7406453
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LaMEM"
uuid = "2e889f3d-35ce-4a77-8ea2-858aecb630f7"
authors = ["Boris Kaus <kaus@uni-mainz.de>"]
version = "0.1.5"
version = "0.1.6"

[deps]
GeophysicalModelGenerator = "3700c31b-fa53-48a6-808a-ef22d5a84742"
Expand Down
37 changes: 11 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,19 @@ Time stepping parameters:
```
The last parameter are optional PETSc command-line options. By default it runs on one processor.

Please note that you will have to be in the correct directory (the same one as where the LaMEM parameter file is located). If you are in a different directory, the easiest way to change to the correct one is by using the build-in terminal/shell in julia, which you can access with:
Please note that you will have to be in the correct directory (the same one as where the LaMEM parameter file is located). If you are in a different directory, the easiest way to change to the correct one is by using the `changefolder` function (on Windows and Mac):
```julia
julia> changefolder()
```

Alternatively, you can use the build-in terminal/shell in julia, which you can access with:
```julia
julia>;
shell>cd ~/LaMEM/input_models/BuildInSetups/
```
use the Backspace key to return to the julia REPL.


Once you have performed a simulation, you can look at the results by opening the `*.pvd` files with Paraview. In this example, that would be `FB_multigrid.pvd` and `FB_multigrid_phase.pvd`.

### 3. Reading LaMEM output back into julia
Expand All @@ -76,33 +82,11 @@ CartData
```
The output is in a `CartData` structure (as defined in GeophysicalModelGenerator).

Please note that you will have to be in the correct directory (the same one as where the LaMEM parameter file is located). If you are in a different directory, the easiest way to change to the correct one is by using the `changefolder` function (on Windows and Mac):
```julia
julia> changefolder()
```

Alternatively, you can use the build-in terminal/shell in julia, which you can access with:
```julia
julia>;
shell>cd ~/LaMEM/input_models/BuildInSetups/
```
use the Backspace key to return to the julia REPL.

Please note that you will have to be in the correct directory (see above).
Once you have performed a simulation, you can look at the results by opening the `*.pvd` files with Paraview. In this example, that would be `FB_multigrid.pvd` and `FB_multigrid_phase.pvd`.

### 3. Reading LaMEM output back into julia
If you want to quantitatively do something with the results, there is an easy way to read the output of a LaMEM timestep back into julia. Make sure you are in the directory where the simulation was run and read a timestep with:
```julia
julia>]
pkg> add PythonCall
```
After this you need to load *both* LaMEM and PythonCall, which will make the reading functions available:
```julia
julia> using LaMEM, PythonCall
Adding PythonCall dependencies to read LaMEM timesteps
```

Make sure you are in the directory where the simulation was run and read a timestep with:
If you want to quantitatively do something with the results, there is an easy way to read the output of a LaMEM timestep back into julia. Make sure you are in the directory where the simulation was run and read a timestep with:
```julia
julia> FileName="FB_multigrid.pvtr"
julia> DirName = "Timestep_00000001_6.72970343e+00"
Expand All @@ -118,8 +102,9 @@ CartData
The output is in a `CartData` structure (as defined in GeophysicalModelGenerator).

### 4. Dependencies
We rely on the following package:
We rely on the following packages:
- [GeophysicalModelGenerator](https://github.com/JuliaGeodynamics/GeophysicalModelGenerator.jl) - Data structure in which we store the info of a LaMEM timestep. The package can also be used to generate setups for LaMEM.
- [LaMEM_jll](https://github.com/JuliaRegistries/General/tree/master/L/LaMEM_jll) - this contains the LaMEM binaries, precompiled for most systems. Note that on windows, the MUMPS parallel direct solver is not available.

And for reading files, we rely on the optional package
- [PythonCall](https://github.com/cjdoris/PythonCall.jl) - installs a local python version and the VTK toolbox, used to read the output files. We make this an optional dependency as this involves installing quite a few additional packages, which have been broken at some times in the past. If you experience problems, you can try installing an earlier version of [MicroMamba](https://github.com/cjdoris/MicroMamba.jl) first (e.g. `pkg> add MicroMambe@0.1.9`), before installing `PythonCall` .
Expand Down

0 comments on commit 7406453

Please sign in to comment.