Skip to content

Commit

Permalink
Fix docs (#54)
Browse files Browse the repository at this point in the history
* Fix docs

* flaky
  • Loading branch information
DanielVandH authored Sep 25, 2024
1 parent 9dc2612 commit 43e727d
Show file tree
Hide file tree
Showing 12 changed files with 6 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 = "FiniteVolumeMethod"
uuid = "d4f04ab7-4f65-4d72-8a28-7087bc7f46f4"
authors = ["Daniel VandenHeuvel <[email protected]>"]
version = "1.1.3"
version = "1.1.4"

[deps]
ChunkSplitters = "ae650224-84b6-46f8-82ea-d812ca08434e"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ end #src
x, y, u = compare_solutions(sol, tri, α, f) #src
fig = Figure(fontsize=64) #src
for i in eachindex(sol) #src
local ax
local ax #src
ax = Axis(fig[1, i], width=600, height=600) #src
tricontourf!(ax, tri, sol.u[i], levels=0:0.01:1, colormap=:matter) #src
ax = Axis(fig[2, i], width=600, height=600) #src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ end #src
x, y, u = compare_solutions(sol, tri) #src
fig = Figure(fontsize=64) #src
for i in eachindex(sol) #src
local ax
local ax #src
ax = Axis(fig[1, i], width=600, height=600) #src
tricontourf!(ax, tri, sol.u[i], levels=0:5:50, colormap=:matter) #src
ax = Axis(fig[2, i], width=600, height=600) #src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function get_errs(_sol, tri, flux_parameters) #src
_errs = zeros(length(_sol)) #src
_err = zeros(DelaunayTriangulation.num_points(tri)) #src
for i in eachindex(_sol) #src
!DelaunayTriangulation.has_vertex(tri, i) && continue
!DelaunayTriangulation.has_vertex(tri, i) && continue #src
i == 1 && continue #src
m = maximum(_sol.u[i]) #src
for j in each_solid_vertex(tri) #src
Expand Down
2 changes: 1 addition & 1 deletion docs/src/literate_tutorials/porous_medium_equation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function compare_solutions(sol, tri, m, M, D) #src
y = zeros(n, length(sol)) #src
u = zeros(n, length(sol)) #src
for i in eachindex(sol) #src
!DelaunayTriangulation.has_vertex(tri, i) && continue
!DelaunayTriangulation.has_vertex(tri, i) && continue #src
for j in each_solid_vertex(tri) #src
x[j, i], y[j, i] = get_point(tri, j) #src
u[j, i] = exact_solution(x[j, i], y[j, i], sol.t[i], m, M, D) #src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function compare_solutions(sol, tri) #src
y = zeros(n, length(sol)) #src
u = zeros(n, length(sol)) #src
for i in eachindex(sol) #src
!DelaunayTriangulation.has_vertex(tri, i) && continue
!DelaunayTriangulation.has_vertex(tri, i) && continue #src
for j in each_solid_vertex(tri) #src
x[j, i], y[j, i] = get_point(tri, j) #src
u[j, i] = exact_solution(x[j, i], y[j, i], sol.t[i]) #src
Expand Down
1 change: 0 additions & 1 deletion docs/src/literate_wyos/diffusion_equations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ using LinearSolve #src
sol1 = solve(diff_eq, Tsit5(); saveat=0.05) #src
sol2 = solve(fvm_prob, TRBDF2(linsolve=KLUFactorization()), saveat=0.05) #src
using Test #src
@test sol1[begin:end-1, 2:end] sol2[begin:end, 2:end] rtol = 1e-3 #src

# To finish this example, let's solve a diffusion equation with constant Neumann boundary conditions:
# ```math
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ for (i, j) in zip(1:3, (1, 6, 11))
end
resize_to_layout!(fig)
fig
local ax
````

## Just the code
Expand Down Expand Up @@ -186,8 +184,6 @@ for (i, j) in zip(1:3, (1, 6, 11))
end
resize_to_layout!(fig)
fig

local ax
```

---
Expand Down
4 changes: 0 additions & 4 deletions docs/src/tutorials/diffusion_equation_on_a_square_plate.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ for (i, j) in zip(1:3, (1, 6, 11))
end
resize_to_layout!(fig)
fig
local ax
````

## Just the code
Expand Down Expand Up @@ -146,8 +144,6 @@ for (i, j) in zip(1:3, (1, 6, 11))
end
resize_to_layout!(fig)
fig

local ax
```

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ for i in eachindex(sol)
end
resize_to_layout!(fig)
fig
!DelaunayTriangulation.has_vertex(tri, i) && continue
````

## Piecewise linear interpolation
Expand Down Expand Up @@ -345,8 +343,6 @@ end
resize_to_layout!(fig)
fig

!DelaunayTriangulation.has_vertex(tri, i) && continue

x = LinRange(-L, L, 250)
y = LinRange(-L, L, 250)
triangles = Matrix{NTuple{3,Int}}(undef, length(x), length(y))
Expand Down
4 changes: 0 additions & 4 deletions docs/src/tutorials/porous_medium_equation.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ for (i, j) in zip(1:3, (1, 3, 5))
end
resize_to_layout!(fig)
fig
!DelaunayTriangulation.has_vertex(tri, i) && continue
````

## Linear source
Expand Down Expand Up @@ -221,8 +219,6 @@ end
resize_to_layout!(fig)
fig

!DelaunayTriangulation.has_vertex(tri, i) && continue

# Step 0: Define all the parameters
m = 3.4
M = 2.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ for (i, j) in zip(1:3, (1, 6, 11))
end
resize_to_layout!(fig)
fig
!DelaunayTriangulation.has_vertex(tri, i) && continue
````

## Just the code
Expand Down Expand Up @@ -137,8 +135,6 @@ for (i, j) in zip(1:3, (1, 6, 11))
end
resize_to_layout!(fig)
fig

!DelaunayTriangulation.has_vertex(tri, i) && continue
```

---
Expand Down

2 comments on commit 43e727d

@DanielVandH
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/115929

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.1.4 -m "<description of version>" 43e727dc3afc9f6d46ac9a5cc2e32cc2850304e3
git push origin v1.1.4

Please sign in to comment.