Skip to content

Commit

Permalink
updated convergence #s
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Zingale committed Jun 11, 2014
1 parent 3a17947 commit 2426058
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 30 deletions.
11 changes: 5 additions & 6 deletions advection/tests/convergence_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@

def plot_convergence():

data = numpy.loadtxt("advection_convergence.txt")
data = numpy.loadtxt("smooth-error.out")

nx = data[:,0]
aerr_lim1 = data[:,1]
aerr_lim2 = data[:,3]
aerr = data[:,1]

ax = pylab.subplot(111)
ax.set_xscale('log')
ax.set_yscale('log')

pylab.scatter(nx, aerr_lim2, marker="x", color="r")
pylab.plot(nx, aerr_lim2[0]*(nx[0]/nx)**2, "--", color="k")
pylab.scatter(nx, aerr, marker="x", color="r")
pylab.plot(nx, aerr[0]*(nx[0]/nx)**2, "--", color="k")

pylab.xlabel("number of zones")
pylab.ylabel("L2 norm of abs error")
Expand All @@ -27,7 +26,7 @@ def plot_convergence():

pylab.xlim(8,256)

pylab.savefig("smooth_converge.png", bbox_inches="tight")
pylab.savefig("smooth_converge.eps", bbox_inches="tight")



Expand Down
2 changes: 1 addition & 1 deletion incompressible/problems/converge.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import mesh.patch as patch
from util import msg

def init_ata(my_data, rp):
def init_data(my_data, rp):
""" initialize the incompressible converge problem """

msg.bold("initializing the incompressible converge problem...")
Expand Down
10 changes: 1 addition & 9 deletions incompressible/tests/convergence_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ def plot_convergence():

nx = data[:,0]
errlim = data[:,1]
errnolim = data[:,3]

ax = pylab.subplot(111)
ax.set_xscale('log')
Expand All @@ -17,9 +16,6 @@ def plot_convergence():
pylab.scatter(nx, errlim, marker="x", color="r", label="limiting")
pylab.plot(nx, errlim[0]*(nx[0]/nx)**2, "--", color="k")

pylab.scatter(nx, errnolim, marker="x", color="b", label="no limiting")
pylab.plot(nx, errnolim[0]*(nx[0]/nx)**2, "--", color="k")

pylab.xlabel("number of zones")
pylab.ylabel("L2 norm of abs error")

Expand All @@ -31,12 +27,8 @@ def plot_convergence():
pylab.xlim(16,256)
pylab.ylim(2.e-4,5.e-2)

leg = pylab.legend()
leg.draw_frame(0)
ltext = leg.get_texts()
pylab.setp(ltext, fontsize='small')

pylab.savefig("incomp_converge.png", bbox_inches="tight")
pylab.savefig("incomp_converge.eps", bbox_inches="tight")



Expand Down
8 changes: 4 additions & 4 deletions incompressible/tests/incomp_converge.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# convergence of incompressible converge problem
# (convergence measured with analysis/incomp_converge_error.py)
#
# limiting nolimiting
32 0.0220739241002 0.0220739241002 0.0149125425126 0.0149125425126
64 0.00682161894998 0.00682161894998 0.00216262704768 0.00216262704768
128 0.00214105266633 0.00214105266633 0.000363800908554 0.000363800908554
32 0.0220739241002 0.0220739241002
64 0.00682161894998 0.00682161894998
128 0.00214105266633 0.00214105266633



16 changes: 6 additions & 10 deletions multigrid/tests/mg_convergence.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# convergence results from mg_test.py
# 2012-10-19
#
# nx L2 norm wrt true solution

16 4.06955e-4
32 1.02427e-4
64 2.56513e-5
128 6.41563e-6
256 1.60408e-6
# nx L2 norm wrt true solution (2014-06-11)

16 0.000406955
32 0.000102427
64 2.56513e-05
128 6.41563e-06
256 1.60408e-06

0 comments on commit 2426058

Please sign in to comment.