fixed the 3D grid too for resolution study

This commit is contained in:
Stephen McQuay 2011-05-20 12:40:42 -06:00
parent ab2e6655be
commit ae9d759788

View File

@ -5,24 +5,24 @@ import numpy as np
class rect_grid(basegrid):
def __init__(self, xres = 5, yres = 5, zres = 5):
xmin = -1.0
xmin = 0.0
xmax = 1.0
xspan = xmax - xmin
xdel = xspan / float(xres - 1)
ymin = -1.0
ymin = 0.0
ymay = 1.0
yspan = ymay - ymin
ydel = yspan / float(yres - 1)
zmin = -1.0
zmin = 0.0
zmaz = 1.0
zspan = zmaz - zmin
zdel = zspan / float(zres - 1)
verts = []
q = []
q = np.zeros(xres * yres * zres)
for x in xrange(xres):
cur_x = xmin + (x * xdel)
for y in xrange(yres):
@ -30,7 +30,7 @@ class rect_grid(basegrid):
for z in xrange(zres):
cur_z = zmin + (z * zdel)
verts.append([cur_x, cur_y, cur_z])
q.append(baker_exact_3D((cur_x, cur_y, cur_z)))
basegrid.__init__(self, verts, q)