fixed import of delaunay grid

This commit is contained in:
Stephen McQuay 2011-03-23 11:47:42 -06:00
parent ba5280c17b
commit 50cc783b97

View File

@ -1,15 +1,9 @@
from interp.grid.delaunay import grid as basegrid from interp.grid.delaunay import dgrid as basegrid
from interp.tools import exact_func_3D, log from interp.tools import exact_func_3D, log
import numpy as np import numpy as np
class rect_grid(basegrid):
class grid(basegrid):
def __init__(self, verts, q):
basegrid.__init__(self, verts, q)
class rect_grid(grid):
def __init__(self, xres = 5, yres = 5, zres = 5): def __init__(self, xres = 5, yres = 5, zres = 5):
xmin = -1.0 xmin = -1.0
xmax = 1.0 xmax = 1.0
@ -37,7 +31,7 @@ class rect_grid(grid):
cur_z = zmin + (z * zdel) cur_z = zmin + (z * zdel)
verts.append([cur_x, cur_y, cur_z]) verts.append([cur_x, cur_y, cur_z])
q.append(exact_func_3D((cur_x, cur_y, cur_z))) q.append(exact_func_3D((cur_x, cur_y, cur_z)))
grid.__init__(self, verts, q) basegrid.__init__(self, verts, q)
@ -62,7 +56,7 @@ class random_grid(rect_grid):
verts.append([cur_x, cur_y, cur_z]) verts.append([cur_x, cur_y, cur_z])
q.append(exact_func_3D((cur_x, cur_y, cur_z))) q.append(exact_func_3D((cur_x, cur_y, cur_z)))
grid.__init__(self, verts, q) rect_grid.__init__(self, verts, q)
self.verts = np.array(self.verts) self.verts = np.array(self.verts)
self.q = np.array(self.q) self.q = np.array(self.q)