Skip to content

Commit

Permalink
introduced "plot_cross_section" as a separate function, rather than o…
Browse files Browse the repository at this point in the history
…verriding "heatmap" & add the required Statistics package
  • Loading branch information
boriskaus committed Jul 21, 2023
1 parent 37d9c9b commit 0f30655
Show file tree
Hide file tree
Showing 5 changed files with 1,832 additions and 35 deletions.
9 changes: 5 additions & 4 deletions 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 <[email protected]>"]
version = "0.2.0"
version = "0.2.1"

[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Expand All @@ -12,22 +12,23 @@ LaMEM_jll = "15d6fa20-f789-5486-b71b-22b4ac8eb1c1"
PETSc_jll = "8fa3689e-f0b9-5420-9873-adf6ccf46f2d"
ReadVTK = "dc215faf-f008-4882-a9f7-a79a826fadc3"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
DocStringExtensions = "0.9"
GeoParams = "0.4"
GeophysicalModelGenerator = "0.4 - 0.6"
DocStringExtensions = "0.9"
Glob = "1"
LaMEM_jll = "1.2.4 - 1.2.4"
PETSc_jll = "3.16.8 - 3.16.8"
ReadVTK = "0.1.7"
Requires = "1.0, 2"
Statistics = "1.0"
julia = "1.9"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"

Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
2 changes: 1 addition & 1 deletion docs/src/man/juliasetup_LaPalma.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ julia> AddEllipsoid!(model, cen=(-0,0,-23), axes=(8,8,2), StrikeAngle=0, DipAngl

We can plot a cross-section through the model:
```julia
julia> heatmap(model, x=0, field=:phase)
julia> plot_cross_section(model, x=0, field=:phase)
```
![LaPalma_CrossSection](LaPalma_CrossSection.png)

Expand Down
4 changes: 2 additions & 2 deletions docs/src/man/juliasetup_example_sphere.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ julia> AddSphere!(model,cen=(0.0,0.0,0.0), radius=(0.5, ))
It is often useful to plot the initial model setup. You can do this with the `heatmap` function from the `Plots.jl` package, for which we provide a LaMEM plugin that allows you to specify a cross-section through a 3D LaMEM setup:

```julia
julia> heatmap(model, field=:phase, y=0)
julia> plot_cross_section(model, field=:phase, y=0)
```

![InitialSetupSphere](InitialSetupSphere.png)
Expand Down Expand Up @@ -136,7 +136,7 @@ Time stepping parameters:
Once the simulation is done, you can look at the results using the same `heatmap` function, but by specifying a timestep, which will read that timestep and plot a cross-section though it:

```julia
julia> heatmap(model, y=0, timestep=20, field=:phase)
julia> plot_cross_section(model, y=0, timestep=20, field=:phase)
```

![FallingSphere_t20](FallingSphere_t20.png)
Expand Down
Loading

0 comments on commit 0f30655

Please sign in to comment.