Rewrite the mathematical details section to also discuss internal con… #61
Triggered via pull request
September 3, 2023 10:24
Status
Success
Total duration
1h 37m 42s
Artifacts
–
CI.yml
on: pull_request
Documentation
16m 12s
Matrix: test
Annotations
9 warnings
Documentation:
../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
failed to run `@setup` block in src/math.md
```@setup ex_tri
using DelaunayTriangulation, CairoMakie
θ = LinRange(0, 2π, 50)
θ = collect(θ)
θ[end] = θ[begin]
g = θ -> cos(θ) - sin(3θ) + sin(5θ)
ε = 1 / 10
x = @. (1 + g(θ) * ε) * cos(θ)
y = @. (1 + g(θ) * ε) * sin(θ)
h = θ -> cos(3θ) - sin(θ)
ε = 1 / 5
x2 = @. 0.5(1 + h(θ) * ε) * cos(θ)
y2 = @. 0.5(1 + h(θ) * ε) * sin(θ)
reverse!(x2)
reverse!(y2)
boundary_nodes, points = convert_boundary_points_to_indices([[x], [x2]], [[y], [y2]])
tri = triangulate(points; boundary_nodes, delete_ghosts=false)
refine!(tri)
fig, ax, sc = triplot(tri,
show_convex_hull=false,
show_constrained_edges=false,
show_all_points=true,
point_color=:black)
hidedecorations!(ax)
```
exception =
LoadError: UndefVarError: `triplot` not defined
in expression starting at string:18
|
Documentation:
../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
failed to run `@example` block in src/math.md:46-48
```@example ex_tri
fig #hide
```
value = UndefVarError: `fig` not defined
|
Documentation:
../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
failed to run `@setup` block in src/math.md
```@setup ex_tri
centroids = NTuple{2,Float64}[]
linesegments = NTuple{2,Float64}[]
for T in each_solid_triangle(tri)
i, j, k = indices(T)
p, q, r = get_point(tri, i, j, k)
cent = DelaunayTriangulation.triangle_centroid(p, q, r)
push!(centroids, cent)
u, v, w = DelaunayTriangulation.triangle_edge_midpoints(p, q, r)
push!(linesegments, cent, u, cent, v, cent, w)
end
linesegments!(ax, linesegments, color=:blue)
scatter!(ax, centroids, color=:red, markersize=8)
```
exception =
LoadError: UndefVarError: `ax` not defined
in expression starting at string:11
|
Documentation:
../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
failed to run `@example` block in src/math.md:46-48
```@example ex_tri
fig #hide
```
value = UndefVarError: `fig` not defined
|
Documentation:
../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
failed to run `@setup` block in src/math.md
```@setup cv_notation
using DelaunayTriangulation, CairoMakie, LinearAlgebra
a, b, c, d, e, f = (0.0, 0.0),
(2.0, 3.0),
(4.0, -1.0),
(1.0, -4.0),
(-4.0, -2.0),
(-4.0, 2.0)
points = [a, b, c, d, e, f]
tri = triangulate(points)
centroids = NTuple{2,Float64}[]
linesegments = NTuple{2,Float64}[]
other_linesegments = NTuple{2,Float64}[]
non_cv_midpoints = collect.([
(f .+ b) ./ 2,
(b .+ c) ./ 2,
(c .+ d) ./ 2,
(d .+ e) ./ 2,
(e .+ f) ./ 2
])
for T in each_solid_triangle(tri)
i, j, k = indices(T)
p, q, r = get_point(tri, i, j, k)
cent = DelaunayTriangulation.triangle_centroid(p, q, r)
push!(centroids, cent)
u, v, w = DelaunayTriangulation.triangle_edge_midpoints(p, q, r)
any(≈(collect(u)), non_cv_midpoints) ? push!(other_linesegments, cent, u) : push!(linesegments, cent, u)
any(≈(collect(v)), non_cv_midpoints) ? push!(other_linesegments, cent, v) : push!(linesegments, cent, v)
any(≈(collect(w)), non_cv_midpoints) ? push!(other_linesegments, cent, w) : push!(linesegments, cent, w)
end
control_volume_verts = vcat(linesegments, centroids)
cv_idx = collect(eachindex(control_volume_verts))
DelaunayTriangulation.sort_convex_polygon!(cv_idx, control_volume_verts)
fig, ax, sc = poly(control_volume_verts[cv_idx],
color=:lightgreen,
axis=(width=400, height=400))
triplot!(tri,
show_convex_hull=false,
show_constrained_edges=false,
show_all_points=true,
point_color=:black,
markersize=11)
scatter!(ax, [a, b, c], color=:cyan, markersize=11, strokecolor=:black, strokewidth=1)
linesegments!(ax, linesegments, color=:blue, linewidth=3)
linesegments!(ax, other_linesegments, color=(:grey, 0.5))
cidx = findfirst(≈(collect((f .+ a .+ b) ./ 3)), collect.(centroids))
lidx = findfirst(≈(collect((f .+ a) ./ 2)), collect.(linesegments))
u, v = centroids[cidx], linesegments[lidx]
rot90_uv = [0 -1; 1 0] * collect(u .- v)
rot90_uv = 0.8rot90_uv ./ norm(rot90_uv)
m = (u .+ v) ./ 2
p = scatter!(ax, [m], color=:blue, markersize=11, strokecolor=:black, strokewidth=1)
arrows!(ax, [m[1]], [m[2]], [rot90_uv[1]], [rot90_uv[2]], color=:black)
lines!(ax, [u, v], color=:magenta, linewidth=3)
translate!(p, 0, 0, 1)
scatter!(ax, centroids, color=:red, markersize=11, strokecolor=:black, strokewidth=1)
text!(ax, -0.8, -1.7, text=L"\Omega_i", fontsize=24)
text!(ax, -3.2, -1.0, text=L"\partial\Omega_i", fontsize=24)
text!(ax, -2.0, 1.1, text=L"\sigma", fontsize=24)
text!(ax, -2.4, 1.6, text=L"\hat{\mathbf{n}}_{\sigma}", fontsize=24)
text!(ax, -1.4, 0.8, text=L"\mathbf{x}_{\sigma}", fontsize=24)
text!(ax, 0.2, 0.0, text=L"\mathbf{x}_{i}", fontsize=24)
text!(ax, 0.2, -0.5, text=L"v_{k1}", fontsize=24)
text!(ax, 3.1, -1.3, text=L"v_{k2}", fontsize=24)
text!(ax, 2.1, 2.9, text=L"v_{k3}", fontsize=24)
text!(ax, 1.7, 1.5, text=L"T_k", fontsize=24)
hidedecorations!(ax)
resize_to_layout!(fig)
```
exception =
LoadError: UndefVarError: `triplot!` not defined
in expression starting at string:38
|
Documentation:
../../../.julia/packages/Documenter/bYYzK/src/Utilities/Utilities.jl#L34
failed to run `@setup` block in src/math.md
```@setup ex_focus
using DelaunayTriangulation, CairoMakie
function get_control_volume(tri, i)
is_bnd, bnd_idx = DelaunayTriangulation.is_boundary_node(tri, i)
cv = NTuple{2,Float64}[]
if is_bnd
j = DelaunayTriangulation.get_right_boundary_node(tri, i, bnd_idx)
k = get_adjacent(tri, i, j)
p = get_point(tri, i)
push!(cv, p)
while !DelaunayTriangulation.is_boundary_index(k)
q, r = get_point(tri, j, k)
c = (p .+ q .+ r) ./ 3
m = (p .+ q) ./ 2
push!(cv, m, c)
j = k
k = get_adjacent(tri, i, j)
DelaunayTriangulation.is_boundary_index(k) && push!(cv, (p .+ r) ./ 2)
end
push!(cv, p)
else
S = DelaunayTriangulation.get_surrounding_polygon(tri, i)
push!(S, S[begin])
j = S[begin]
p = get_point(tri, i)
q = get_point(tri, j)
push!(cv, (p .+ q) ./ 2)
for k in S[2:end]
r = get_point(tri, k)
push!(cv, (p .+ q .+ r) ./ 3)
push!(cv, (p .+ r) ./ 2)
q = r
end
end
return cv
end
a, b, c, d, e, f, g, h, i, j, k, ℓ = (0.0, 0.0),
(2.0, 3.0),
(4.0, -1.0),
(1.0, -4.0),
(-4.0, -2.0),
(-4.0, 2.0),
(-1.0, 5.0),
(6.0, 3.0),
(7.0, -2.0),
(4.0, -5.0),
(-3.0, -4.0),
(-6.0, 0.0)
points = [a, b, c, d, e, f, g, h, i, j, k, ℓ]
tri = triangulate(points)
fig = Figure()
ax = Axis(fig[1, 1], width=400, height=400)
for i in 1:3
cv = get_control_volume(tri, i)
L = lines!(ax, cv, color=:blue, linewidth=3)
translate!(L, 0, 0, 1)
end
poly!(ax, [a, c, b],
color=:lightblue)
triplot!(tri,
show_convex_hull=false,
show_constrained_edges=false)
scatter!(ax, [a, c, b], color=[:blue, :red, :darkgreen], strokecolor=:black, strokewidth=1)
text!(ax, 2.1, -0.3, text=L"\sigma_{br}", fontsize=24)
text!(ax, 2.1, 1.0, text=L"\sigma_{rg}", fontsize=24)
text!(ax, 1.0, 0.6, text=L"\sigma_{gb}", fontsize=24)
br = lines!(ax, [(a .+ c) ./ 2, (a .+ b .+ c) ./ 3], color=:purple, linewidth=3)
translate!(br, 0, 0, 1)
bg = lines!(ax, [(a .+ b) ./ 2, (a .+ b .+ c) ./ 3], color=:teal, linewidth=3)
translate!(bg, 0, 0, 1)
rg = lines!(ax, [(b .+ c) ./ 2, (a .+ b .+ c) ./ 3], color=:yellow, linewidth=3)
translate!(rg, 0, 0, 1)
xlims!(ax, -3, 5.9)
ylims!(ax, -3.5, 4.5)
fig
hidedecorations!(ax)
resize_to_layout!(fig)
```
exception =
LoadError: UndefVarError: `triplot!` not defined
in expression starting at string:60
|
Documentation
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Julia 1 - ubuntu-latest - x64 - pull_request
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Julia 1.6 - ubuntu-latest - x64 - pull_request
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|