diff --git a/examples/jupyter/demo1_diffusion.ipynb b/examples/jupyter/demo1_diffusion.ipynb index d4f91a758..2664d207b 100644 --- a/examples/jupyter/demo1_diffusion.ipynb +++ b/examples/jupyter/demo1_diffusion.ipynb @@ -90,8 +90,6 @@ "# -- 2D --\n", "elseif dimension == 2\n", " # compute\n", - " θ_plotting_x = zeros(numberruns)\n", - " θ_plotting_y = zeros(numberruns)\n", " maxeigenvalues = zeros(numberruns, numberruns)\n", "\n", " for i in 1:numberruns, j in 1:numberruns\n", @@ -107,14 +105,21 @@ "\n", " # plot\n", " println(\"max eigenvalue: \", maxeigenvalue)\n", + " xrange = θ_min/π:(θ_max - θ_min)/π/(numberruns-1):θ_max/π\n", " heatmap(\n", + " xrange,\n", + " xlabel=\"θ/π\",\n", + " xtickfont=font(12, \"Courier\"),\n", + " xrange,\n", + " ylabel=\"θ/π\",\n", " maxeigenvalues,\n", + " ytickfont=font(12, \"Courier\"),\n", " title=\"Diffusion Operator Symbol\",\n", " transpose=true,\n", " aspect_ratio=:equal\n", " )\n", - " xlims!(1, numberruns)\n", - " ylims!(1, numberruns)\n", + " xlims!(θ_min/π, θ_max/π)\n", + " ylims!(θ_min/π, θ_max/π)\n", "end" ] } diff --git a/examples/jupyter/demo2_jacobi.ipynb b/examples/jupyter/demo2_jacobi.ipynb index 42bd42e72..f72608519 100644 --- a/examples/jupyter/demo2_jacobi.ipynb +++ b/examples/jupyter/demo2_jacobi.ipynb @@ -117,14 +117,21 @@ "\n", " # plot\n", " println(\"max eigenvalue: \", maxeigenvalue)\n", + " xrange = θ_min/π:(θ_max - θ_min)/π/(numberruns-1):θ_max/π\n", " heatmap(\n", + " xrange,\n", + " xlabel=\"θ/π\",\n", + " xtickfont=font(12, \"Courier\"),\n", + " xrange,\n", + " ylabel=\"θ/π\",\n", + " ytickfont=font(12, \"Courier\"),\n", " maxeigenvalues,\n", " title=\"Jacobi Operator Symbol\",\n", " transpose=true,\n", " aspect_ratio=:equal\n", " )\n", - " xlims!(1, numberruns)\n", - " ylims!(1, numberruns)\n", + " xlims!(θ_min/π, θ_max/π)\n", + " ylims!(θ_min/π, θ_max/π)\n", "end" ] } diff --git a/examples/jupyter/demo3_pmultigrid.ipynb b/examples/jupyter/demo3_pmultigrid.ipynb index d868ad0b1..352e1ff0b 100644 --- a/examples/jupyter/demo3_pmultigrid.ipynb +++ b/examples/jupyter/demo3_pmultigrid.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# P-multigrid Example" + "# Two-grid P-multigrid Example" ] }, { @@ -122,14 +122,21 @@ "\n", " # plot\n", " println(\"max eigenvalue: \", maxeigenvalue)\n", + " xrange = θ_min/π:(θ_max - θ_min)/π/(numberruns-1):θ_max/π\n", " heatmap(\n", + " xrange,\n", + " xlabel=\"θ/π\",\n", + " xtickfont=font(12, \"Courier\"),\n", + " xrange,\n", + " ylabel=\"θ/π\",\n", + " ytickfont=font(12, \"Courier\"),\n", " maxeigenvalues,\n", " title=\"P-Multigrid Error Symbol\",\n", " transpose=true,\n", " aspect_ratio=:equal\n", " )\n", - " xlims!(1, numberruns)\n", - " ylims!(1, numberruns)\n", + " xlims!(θ_min/π, θ_max/π)\n", + " ylims!(θ_min/π, θ_max/π)\n", "end" ] } diff --git a/examples/jupyter/demo4_pmultigrid_multilevel.ipynb b/examples/jupyter/demo4_pmultigrid_multilevel.ipynb index a382e1e12..24ff9c2e1 100644 --- a/examples/jupyter/demo4_pmultigrid_multilevel.ipynb +++ b/examples/jupyter/demo4_pmultigrid_multilevel.ipynb @@ -4,7 +4,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# P-multigrid Example" + "# Three-grid P-multigrid Example" ] }, { @@ -127,14 +127,21 @@ "\n", " # plot\n", " println(\"max eigenvalue: \", maxeigenvalue)\n", + " xrange = θ_min/π:(θ_max - θ_min)/π/(numberruns-1):θ_max/π\n", " heatmap(\n", + " xrange,\n", + " xlabel=\"θ/π\",\n", + " xtickfont=font(12, \"Courier\"),\n", + " xrange,\n", + " ylabel=\"θ/π\",\n", + " ytickfont=font(12, \"Courier\"),\n", " maxeigenvalues,\n", " title=\"P-Multigrid Error Symbol\",\n", " transpose=true,\n", " aspect_ratio=:equal\n", " )\n", - " xlims!(1, numberruns)\n", - " ylims!(1, numberruns)\n", + " xlims!(θ_min/π, θ_max/π)\n", + " ylims!(θ_min/π, θ_max/π)\n", "end" ] }