Skip to content

Commit

Permalink
a little cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Aug 8, 2024
1 parent ae2370a commit 64c838d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
7 changes: 7 additions & 0 deletions ADDITIONS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* convergence testing via Richardson extrapolation

-- always test the convergence of the initial conditions

* PPM vis

* well-balancing
2 changes: 1 addition & 1 deletion figures/advection/domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def domains(method="FTCS"):
f.set_size_inches(9.0,5.0)

plt.tight_layout()
plt.savefig("domains_{}.pdf".format(method), bbox_inches="tight")
plt.savefig(f"domains_{method}.pdf", bbox_inches="tight")


if __name__== "__main__":
Expand Down
18 changes: 7 additions & 11 deletions figures/advection/fd_ghost.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import numpy as np
import matplotlib.pyplot as plt
import grid_plot as gp
import numpy as np

# plot a simple finite-difference grid

Expand All @@ -14,20 +13,18 @@

gr = gp.FDGrid(nzones, ng=1)

plt.clf()

gr.draw_grid(draw_ghost=1)

labels = ["-1", "0", "1", "", "i-1", "i", "i+1", "", "N-2", "N-1", "N"]

for i in range(gr.ilo-gr.ng, gr.ng+gr.nx+1):
if not labels[i] == "":
gr.label_node(i, r"$%s$" % (labels[i]), fontsize="medium")

# draw the data
for i in range(gr.ilo, gr.ihi+1):
gr.draw_data(i, a[i-gr.ng], color="r")
gr.draw_data(i, a[i-gr.ng], color="r")


gr.label_value(gr.ilo+4, a[gr.ilo+4-gr.ng], r"$a_i$", color="r")

Expand All @@ -36,9 +33,8 @@

gr.clean_axes(pad_fac=0.1, show_ghost=True, ylim=(-0.5, 1.3))

f = plt.gcf()
f.set_size_inches(10.0,3.0)

fig = gr.fig
fig.set_size_inches(10.0,3.0)

plt.savefig("fd_ghost.pdf")

fig.savefig("fd_ghost.pdf")
1 change: 0 additions & 1 deletion figures/advection/rea-limitex.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# reconstruct - evolve - average: demonstrate what happens when we don't
# limit

from __future__ import print_function

import numpy as np
import matplotlib.pyplot as plt
Expand Down

0 comments on commit 64c838d

Please sign in to comment.