Skip to content

Commit

Permalink
Merge pull request #12 from Iddingsite/correct-test-paths
Browse files Browse the repository at this point in the history
correct tests and update docs
  • Loading branch information
Iddingsite authored Mar 4, 2024
2 parents f799244 + 249f844 commit 714e5ee
Show file tree
Hide file tree
Showing 3 changed files with 309 additions and 276 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,12 @@ sol = simulate(domain1D)

# you can now plot the solutions from the sol variable

# extract characteristic time to convert back to dimensional time
@unpack tfinal_ad, t_charact = domain1D

anim = @animate for i = LinRange(0, tfinal_ad, 100)
anim = @animate for i = LinRange(0, sol.t[end], 100)
l = @layout [a ; b]

p1 = plot(distance, Fe0, label="Fe initial", linestyle = :dash, linewidth=1, dpi=200, title = "Timestep = $(round(((i)* t_charact);digits=2)) Ma", legend=:outerbottomright, linecolor=1,xlabel = "Distance (µm)")
p1 = plot(distance, Fe0, label="Fe initial", linestyle = :dash, linewidth=1, dpi=200, title = "Timestep = $(round(i;digits=2)) Ma", legend=:outerbottomright, linecolor=1,xlabel = "Distance (µm)")
p1 = plot!(distance, sol(i)[:,2], label="Fe",linecolor=1, linewidth=1)


p2 = plot(distance, Mg0, label="Mg initial", linestyle = :dash, linewidth=1, dpi=200,legend=:outerbottomright,linecolor=2,xlabel = "Distance (µm)")
p2 = plot!(distance, Mn0, label="Mn initial", linestyle = :dash, linewidth=1, linecolor=3)
p2 = plot!(distance, Ca0, label="Ca initial", linestyle = :dash, linewidth=1, linecolor=4)
Expand Down Expand Up @@ -84,6 +80,12 @@ DiffusionGarnet may be installed directly from the REPL:
```julia-repl
julia>]
pkg> add DiffusionGarnet
```

And you can test the package with:

```julia-repl
julia>]
pkg> test DiffusionGarnet
```

Expand Down
2 changes: 1 addition & 1 deletion docs/src/diffusion_1D.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ which outputs the time spent on the solver, for example, on the second run:

`simulate()` uses the [DifferentialEquations.jl](https://docs.sciml.ai/DiffEqDocs/stable/) package behind the hood to solve our problem efficiently. The returned variable `sol` is the common solution type from this package and more information can be found [here](https://docs.sciml.ai/DiffEqDocs/stable/basics/solution/). It basically holds all the information from our simulation.

We can now plot the solution to our problem.
We can now plot the solution to our problem. By default, DiffusionGarnet saves the time in Myr.

```julia

Expand Down
Loading

0 comments on commit 714e5ee

Please sign in to comment.