Skip to content

Commit a0f91ed

Browse files
committed
update after save
1 parent 53e18e7 commit a0f91ed

File tree

4 files changed

+14
-18
lines changed

4 files changed

+14
-18
lines changed

2D/Stokes2D_DYREL_Decoupled_TwoPhases_v5.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ end
295295
end
296296
Pt .+= γ_eff.*RPt
297297
end
298+
298299
# Plotting
299300
p1 = pt.heatmap(xc, yc, Pf[2:end-1,2:end-1]' , aspect_ratio=1, c=:inferno, title="Pf", xlims=(-Lx/2,Lx/2), xlabel="x",ylabel="y")
300301
p2 = pt.heatmap(xc, yc, Pt' , aspect_ratio=1, c=:inferno, title="Pt", xlims=(-Lx/2,Lx/2), xlabel="x",ylabel="y")
@@ -305,14 +306,13 @@ end
305306
p3 = pt.plot!(err_evo_it/ncx, log10.(ϵ.*ones(size(err_evo_it))), label="tol")
306307
p4 = pt.heatmap(xc, yc, log10.(ηc)' , aspect_ratio=1, c=:inferno, title="ηc", xlims=(-Lx/2,Lx/2), xlabel="x",ylabel="y")
307308
display(pt.plot(p1, p2, p3, p4))
309+
308310
@show iter/ncx
309311
n = length(ηc)
310312
@show η_h = 1.0 / sum(1.0/n ./ηc)
311313
@show η_g = exp( sum( 1.0/n*log.(ηc)))
312314
@show η_a = mean(ηc)
313315

314-
save("./results/twophases_n$(ncx).jld2", "err_evo_it", err_evo_it, "ncx", ncx, "err_evo_V", err_evo_V, "err_evo_Pt", err_evo_Pt, "err_evo_Pf", err_evo_Pf, "xc", xc, "yc", yc, "∇V", ∇V, "Pt", Pt, "Pf", Pf, "Vx", Vx, "Vy", Vy )
315-
316316
return
317317
end
318318

2D/Stokes2D_DYREL_Decoupled_comp_VEP_v5.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ end
379379
p1 = pt.heatmap(xc, yc, log10.(EIIc'./sc.t) , aspect_ratio=1, c=:inferno, title="EII", xlims=(-Lx/2,Lx/2), xlabel="x",ylabel="y")
380380
p2 = pt.heatmap(xc, yc, Pt'.*sc.σ , aspect_ratio=1, c=:inferno, title="Pt", xlims=(-Lx/2,Lx/2), xlabel="x",ylabel="y")
381381
p3 = pt.plot(1:it, Tii_evo[1:it]*sc.σ, xlabel="time",ylabel="mean dev. stress", label=:none)
382-
p4 = heatmap(xc, yc, log10.(ηc)' , aspect_ratio=1, c=:inferno, title="ηc", xlims=(-Lx/2,Lx/2))
382+
p4 = pt.heatmap(xc, yc, log10.(ηc)' , aspect_ratio=1, c=:inferno, title="ηc", xlims=(-Lx/2,Lx/2))
383383
display(pt.plot(p1, p2, p3, p4))
384384
@show iter/ncx
385385
@show itg

2D/Stokes2D_DYREL_Decoupled_comp_v4.jl

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Initialisation
2-
using Plots, Printf, Statistics, LinearAlgebra, JLD2
2+
using Printf, Statistics, LinearAlgebra, JLD2
3+
import Plots as pt
34
# Macros
45
@views av(A) = 0.25*(A[1:end-1,1:end-1].+A[2:end,1:end-1].+A[1:end-1,2:end].+A[2:end,2:end])
56
@views av_xa(A) = 0.5*(A[1:end-1,:].+A[2:end,:])
@@ -255,26 +256,22 @@ end
255256
end
256257
Pt .+= γ_eff.*Rp
257258
end
259+
258260
# Plotting
259-
p1 = heatmap(xc, yc, ∇V' , aspect_ratio=1, c=:inferno, title="∇V", xlims=(-Lx/2,Lx/2), xlabel="x", ylabel="y")
260-
p2 = heatmap(xc, yc, Pt' , aspect_ratio=1, c=:inferno, title="Pt", xlims=(-Lx/2,Lx/2), xlabel="x", ylabel="y")
261-
p3 = plot(title="Convergence", xlabel="DR iterations / nx",ylabel="errors")
262-
p3 = plot!(err_evo_it/ncx, log10.(err_evo_V), label="V")
263-
p3 = plot!(err_evo_it/ncx, log10.(err_evo_P), label="P")
264-
# p3 = plot!(err_evo_it/ncx, log10.(ϵ.*ones(size(err_evo_it))), label="tol")
265-
p4 = heatmap(xc, yc, log10.(ηc)' , aspect_ratio=1, c=:inferno, title="ηc", xlims=(-Lx/2,Lx/2), xlabel="x", ylabel="y")
266-
display(plot(p1, p2, p3, p4))
261+
p1 = pt.heatmap(xc, yc, ∇V' , aspect_ratio=1, c=:inferno, title="∇V", xlims=(-Lx/2,Lx/2), xlabel="x", ylabel="y")
262+
p2 = pt.heatmap(xc, yc, Pt' , aspect_ratio=1, c=:inferno, title="Pt", xlims=(-Lx/2,Lx/2), xlabel="x", ylabel="y")
263+
p3 = pt.plot(title="Convergence", xlabel="DR iterations / nx",ylabel="errors")
264+
p3 = pt.plot!(err_evo_it/ncx, log10.(err_evo_V), label="V")
265+
p3 = pt.plot!(err_evo_it/ncx, log10.(err_evo_P), label="P")
266+
p4 = pt.heatmap(xc, yc, log10.(ηc)' , aspect_ratio=1, c=:inferno, title="ηc", xlims=(-Lx/2,Lx/2), xlabel="x", ylabel="y")
267+
display(pt.plot(p1, p2, p3, p4))
268+
267269
@show iter/ncx
268270
n = length(ηc)
269271
@show η_h = 1.0 / sum(1.0/n ./ηc)
270272
@show η_g = exp( sum( 1.0/n*log.(ηc)))
271273
@show η_a = mean(ηc)
272274

273-
# save("./results/compressible_K2e0_PH.jld2", "err_evo_it", err_evo_it, "ncx", ncx, "err_evo_V", err_evo_V, "err_evo_P", err_evo_P, "xc", xc, "yc", yc, "∇V", ∇V )
274-
# save("./results/compressible_K2e3_PH.jld2", "err_evo_it", err_evo_it, "ncx", ncx, "err_evo_V", err_evo_V, "err_evo_P", err_evo_P, "xc", xc, "yc", yc, "∇V", ∇V )
275-
# save("./results/compressible_K2e0_1step.jld2", "err_evo_it", err_evo_it, "ncx", ncx, "err_evo_V", err_evo_V, "err_evo_P", err_evo_P, "xc", xc, "yc", yc, "∇V", ∇V )
276-
# save("./results/compressible_K2e3_1step.jld2", "err_evo_it", err_evo_it, "ncx", ncx, "err_evo_V", err_evo_V, "err_evo_P", err_evo_P, "xc", xc, "yc", yc, "∇V", ∇V )
277-
278275
return
279276
end
280277

3D/FD/Stokes3D_FD_MultiInclusion_CPU_v2.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,6 @@ function main_call()
688688
for i in eachindex(N)
689689
itPH[i], itDYREL[i], it_nx[i], wtime[i] = Stokes3D_PHDR(; n=N[i], ALE=false, restart=false, restart_step=500, end_step=1)
690690
end
691-
jldsave("Scaling_Balls_1m6_FDM.jld2"; itPH, itDYREL, it_nx, wtime)
692691
@show itPH
693692
@show wtime
694693
end

0 commit comments

Comments
 (0)