Skip to content

Commit 2426058

Browse files
author
Michael Zingale
committed
updated convergence #s
1 parent 3a17947 commit 2426058

File tree

5 files changed

+17
-30
lines changed

5 files changed

+17
-30
lines changed

advection/tests/convergence_plot.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,17 @@
44

55
def plot_convergence():
66

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

99
nx = data[:,0]
10-
aerr_lim1 = data[:,1]
11-
aerr_lim2 = data[:,3]
10+
aerr = data[:,1]
1211

1312
ax = pylab.subplot(111)
1413
ax.set_xscale('log')
1514
ax.set_yscale('log')
1615

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

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

2827
pylab.xlim(8,256)
2928

30-
pylab.savefig("smooth_converge.png", bbox_inches="tight")
29+
pylab.savefig("smooth_converge.eps", bbox_inches="tight")
3130

3231

3332

incompressible/problems/converge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import mesh.patch as patch
2424
from util import msg
2525

26-
def init_ata(my_data, rp):
26+
def init_data(my_data, rp):
2727
""" initialize the incompressible converge problem """
2828

2929
msg.bold("initializing the incompressible converge problem...")

incompressible/tests/convergence_plot.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ def plot_convergence():
88

99
nx = data[:,0]
1010
errlim = data[:,1]
11-
errnolim = data[:,3]
1211

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

20-
pylab.scatter(nx, errnolim, marker="x", color="b", label="no limiting")
21-
pylab.plot(nx, errnolim[0]*(nx[0]/nx)**2, "--", color="k")
22-
2319
pylab.xlabel("number of zones")
2420
pylab.ylabel("L2 norm of abs error")
2521

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

34-
leg = pylab.legend()
35-
leg.draw_frame(0)
36-
ltext = leg.get_texts()
37-
pylab.setp(ltext, fontsize='small')
38-
3930
pylab.savefig("incomp_converge.png", bbox_inches="tight")
31+
pylab.savefig("incomp_converge.eps", bbox_inches="tight")
4032

4133

4234

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# convergence of incompressible converge problem
22
# (convergence measured with analysis/incomp_converge_error.py)
33
#
4-
# limiting nolimiting
5-
32 0.0220739241002 0.0220739241002 0.0149125425126 0.0149125425126
6-
64 0.00682161894998 0.00682161894998 0.00216262704768 0.00216262704768
7-
128 0.00214105266633 0.00214105266633 0.000363800908554 0.000363800908554
4+
32 0.0220739241002 0.0220739241002
5+
64 0.00682161894998 0.00682161894998
6+
128 0.00214105266633 0.00214105266633
7+
88

99

multigrid/tests/mg_convergence.txt

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
# convergence results from mg_test.py
2-
# 2012-10-19
3-
#
4-
# nx L2 norm wrt true solution
5-
6-
16 4.06955e-4
7-
32 1.02427e-4
8-
64 2.56513e-5
9-
128 6.41563e-6
10-
256 1.60408e-6
1+
# nx L2 norm wrt true solution (2014-06-11)
112

3+
16 0.000406955
4+
32 0.000102427
5+
64 2.56513e-05
6+
128 6.41563e-06
7+
256 1.60408e-06

0 commit comments

Comments
 (0)