Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs #54

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading