Skip to content
Snippets Groups Projects
Commit e13aa513 authored by Lars Hubatsch's avatar Lars Hubatsch
Browse files

Cosmetics.

parent 6a4af8ba
No related branches found
No related tags found
No related merge requests found
......@@ -141,6 +141,8 @@ function make_A(geometry,B,α_i, α_o, Δxi, Δxo, x, D_i, D_o, N,
end
if geometry=="3D"
# Book: Numerical Solution of Partial Differential Equations:
# Finite Difference Methods, page 77
# A[2,1:3]=[-2*α_i,1+4*α_i,-2*α_i]
A[2,1:3]=[-3*α_i,1+6*α_i,-3*α_i]
end
......@@ -428,13 +430,11 @@ end
function plot_model(x, u, Nb, T, Δt)
u = u[:, vcat(1:Nb-1, Nb+2:size(u, 2))]
x = vcat(collect(x[1:Nb-1]), collect(x[Nb+2:end]))
plt=Plots.plot(xlabel= "x", ylabel = "u",
plt=Plots.plot(xlabel= "x", ylabel = "u",
foreground_color_legend = nothing, palette=:seaborn_colorblind)
plot!(plt,x, u[1,:], label="Numerics", lw=3, color=1)
for i in 101:500:(Int(T/Δt))
for i in 1:10:100 #(Int(T/Δt))
plot!(plt, x, u[i, :], label=false, color=1,
lw=3, xlims=(0, 2))
lw=3, xlims=(0, 3))
end
display(plt)
# # Plots.savefig(plt,"/Users/mestroni/Figures/3D_analytical.svg")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment