minor: used appropriate base class

This commit is contained in:
Stephen McQuay 2011-03-24 00:27:30 -06:00
parent c80b253141
commit 51277348b8

View File

@ -1,11 +1,8 @@
from interp.grid.delaunay import dgrid as basegrid from interp.grid.delaunay import dgrid as basegrid
from interp.tools import exact_func, log from interp.tools import exact_func, log
import numpy as np import numpy as np
class rect_grid(basegrid): class rect_grid(basegrid):
def __init__(self, xres = 5, yres = 5): def __init__(self, xres = 5, yres = 5):
xmin = -1.0 xmin = -1.0
@ -27,7 +24,7 @@ class rect_grid(basegrid):
cur_y = ymin + (y * ydel) cur_y = ymin + (y * ydel)
verts.append([cur_x, cur_y]) verts.append([cur_x, cur_y])
q.append(exact_func((cur_x, cur_y))) q.append(exact_func((cur_x, cur_y)))
grid.__init__(self, verts, q) basegrid.__init__(self, verts, q)
class random_grid(rect_grid): class random_grid(rect_grid):
@ -61,7 +58,7 @@ class random_grid(rect_grid):
verts.append([cur_x, cur_y]) verts.append([cur_x, cur_y])
q.append( exact_func( (cur_x, cur_y) ) ) q.append( exact_func( (cur_x, cur_y) ) )
grid.__init__(self, verts, q) basegrid.__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)