Skip to content

Commit

Permalink
minor tools (figures)
Browse files Browse the repository at this point in the history
Signed-off-by: thanasis@Dobby <giannakopoulos.th@gmail.com>
  • Loading branch information
ThanasisGiannakopoulos committed Dec 20, 2024
1 parent 1b8fd1a commit 84dcf82
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 33 deletions.
125 changes: 105 additions & 20 deletions tools/bh_backreact_vs_no_backreact.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions tools/classical_norm_convergence_noisy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"source": [
"# give the directory where the data from all the runs are saved\n",
"dir = \"../examples/classical_runs/\"\n",
"par1 = \"a0.5_b5.0_c2.0_rmax30_tmax15_cfl0.125_sigma0.02_infalling_rmax_false_rand_true_0.001_overMp2_25.132741228718345_damp0\"\n",
"par2 = \"a0.05_b5.0_c2.0_rmax30_tmax15_cfl0.125_sigma0.02_infalling_rmax_false_rand_true_0.001_overMp2_25.132741228718345_damp0\"\n",
"par1 = \"a0.5_b5.0_c2.0_rmax30_tmax15_cfl0.125_sigma0.0_infalling_rmax_false_rand_true_0.001_overMp2_25.132741228718345_damp0\"\n",
"par2 = \"a0.05_b5.0_c2.0_rmax30_tmax15_cfl0.125_sigma0.0_infalling_rmax_false_rand_true_0.001_overMp2_25.132741228718345_damp0\"\n",
"your_dir1 = dir*par1\n",
"your_dir2 = dir*par2\n",
"\n",
Expand Down Expand Up @@ -294,7 +294,7 @@
"\n",
"plot!(t_lists_strong[1,2:end], l2_diffs_strong[2,2:end]./l2_diffs_strong[3,2:end],\n",
" frame=true, linewidth=2.5, style=:dash, label=L\" ||\\mathbf{u}_{45}||/||\\mathbf{u}_{56}||\",\n",
" legend=:bottom,\n",
" legend=:top,\n",
" legendfontsize=10,\n",
" ylabel=\"Q\", ytickfont=10, yguidefontsize=10,\n",
" yticks = ([2,4,6,8],[\"2\",\"4\",\"6\",\"8\"])\n",
Expand Down
20 changes: 10 additions & 10 deletions tools/semiclassical_evol_standing_waves_mink_plots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
"# last timstep of the plot\n",
"tf = 137\n",
"\n",
"plot(t_list[1:tf], sqrt.(norm2_604[1,1:tf]), label=L\"||\\mathbf{u}_{k \\, 60 ; 5}||_2\", linewidth=2.8, style=:solid)\n",
"plot!(t_list[1:tf], 4*sqrt.(norm2_604[2,1:tf]), label=L\"4 \\, ||\\mathbf{u}_{k \\, 60 ;5}||_3\", linewidth=2.6, style=:dash)\n",
"p1 = plot!(t_list[1:tf], 4^2*sqrt.(norm2_604[3,1:tf]), label=L\"4^2 \\, ||\\mathbf{u}_{k \\, 60 ;5}||_4\", linewidth=2.4, style=:dot,\n",
"plot(t_list[1:tf], sqrt.(norm2_604[1,1:tf]), label=L\"||\\mathbf{u}_{\\text{qu}}||_{2;60,5}\", linewidth=2.8, style=:solid)\n",
"plot!(t_list[1:tf], 4*sqrt.(norm2_604[2,1:tf]), label=L\"4 \\, ||\\mathbf{u}_{\\text{qu}}||_{3;60,5}\", linewidth=2.6, style=:dash)\n",
"p1 = plot!(t_list[1:tf], 4^2*sqrt.(norm2_604[3,1:tf]), label=L\"4^2 \\, ||\\mathbf{u}_{\\text{qu}}||_{4;60,5}\", linewidth=2.4, style=:dot,\n",
" legend=:topleft, title=\"rescaled norms\", frame=true, xlim=(0,8),xlabel=\"time\",\n",
" legendfontsize=10,\n",
"ytickfont=10, yguidefontsize=10,\n",
Expand All @@ -74,9 +74,9 @@
")\n",
"\n",
"plot(t_list[1:tf], (sqrt.(norm2_604[1,1:tf]./norm2_604[2,1:tf])),\n",
" label=L\"||\\mathbf{u}_{k \\,60 ;5}||_2/||\\mathbf{u}_{k \\,60 ;5}||_3\", linewidth=2.8, style=:solid)\n",
" label=L\"||\\mathbf{u}_{\\text{qu}}||_{2;60,5}/||\\mathbf{u}_{\\text{qu}}||_{3;60,5}\", linewidth=2.8, style=:solid)\n",
"plot!(t_list[1:tf], (sqrt.(norm2_604[2,1:tf]./norm2_604[3,1:tf])),\n",
" label=L\"||\\mathbf{u}_{k \\, 60 ;5}||_3/||\\mathbf{u}_{k \\,60 ;5}||_4\", linewidth=2.6, style=:dash)\n",
" label=L\"||\\mathbf{u}_{\\text{qu}}||_{3;60,5}/||\\mathbf{u}_{\\text{qu}}||_{4;60,5}\", linewidth=2.6, style=:dash)\n",
"p2 = plot!(t_list[1:tf], 4.0*ones(length(t_list[1:tf])), label=\"\", linewidth=1.5, style=:dot, color=\"black\",\n",
"title=\"convergence rate\", xlabel=\"time\", legend=:top, frame=true, grid=true, xlim=(0,8),\n",
"legendfontsize=10,\n",
Expand All @@ -98,9 +98,9 @@
"source": [
"tf = 171\n",
"\n",
"plot(t_list[1:tf], sqrt.(norm2_all[1,1:tf]), label=L\"||\\mathbf{u}_{k \\,l ;n}||_2\", linewidth=3, style=:solid)\n",
"plot!(t_list[1:tf], 4*sqrt.(norm2_all[2,1:tf]), label=L\"4 \\, ||\\mathbf{u}_{k \\,l ;n}||_3\", linewidth=2.8, style=:dash)\n",
"p1 = plot!(t_list[1:tf], 4^2*sqrt.(norm2_all[3,1:tf]), label=L\"4^2 \\, ||\\mathbf{u}_{k \\,l ;n}||_4\", linewidth=2.6, style=:dot,\n",
"plot(t_list[1:tf], sqrt.(norm2_all[1,1:tf]), label=L\"||\\mathbf{u}_{\\text{qu}}||_2\", linewidth=3, style=:solid)\n",
"plot!(t_list[1:tf], 4*sqrt.(norm2_all[2,1:tf]), label=L\"4 \\, ||\\mathbf{u}_{\\text{qu}}||_3\", linewidth=2.8, style=:dash)\n",
"p1 = plot!(t_list[1:tf], 4^2*sqrt.(norm2_all[3,1:tf]), label=L\"4^2 \\, ||\\mathbf{u}_{\\text{qu}}||_4\", linewidth=2.6, style=:dot,\n",
" legend=:topleft, title=\"rescaled norms\", \n",
" frame=true, grid=true, xlim=(0,10),\n",
"legendfontsize=10,\n",
Expand All @@ -110,9 +110,9 @@
")\n",
"\n",
"plot(t_list[1:tf], (sqrt.(norm2_all[1,1:tf]./norm2_all[2,1:tf])),\n",
" label=L\"||\\mathbf{u}_{k \\,l ;n}||_2/||\\mathbf{u}_{k \\,l ;n}||_3\", linewidth=3, style=:solid)\n",
" label=L\"||\\mathbf{u}_{\\text{qu}}||_2/||\\mathbf{u}_{\\text{qu}}||_3\", linewidth=3, style=:solid)\n",
"plot!(t_list[1:tf], (sqrt.(norm2_all[2,1:tf]./norm2_all[3,1:tf])),\n",
" label=L\"||\\mathbf{u}_{k \\,l ;n}||_3/||\\mathbf{u}_{k\\, l ;n}||_4\", linewidth=2.6, style=:dash)\n",
" label=L\"||\\mathbf{u}_{\\text{qu}}||_3/||\\mathbf{u}_{\\text{qu}}||_4\", linewidth=2.6, style=:dash)\n",
"p2 = plot!(t_list[1:tf], 4.0*ones(length(t_list[1:tf])), label=\"\", linewidth=1.5, style=:dot, color=\"black\",\n",
"title=\"convergence rate\", \n",
"xlabel=\"time\", legend=:bottom, frame=true, grid=true, \n",
Expand Down

0 comments on commit 84dcf82

Please sign in to comment.