modified to work with latest imports

This commit is contained in:
Stephen McQuay 2011-03-24 15:51:53 -06:00
parent 385294a040
commit 854545a92b

View File

@ -5,7 +5,7 @@ from optparse import OptionParser
import numpy as np import numpy as np
from interp.tools import rms, exact_func from interp.tools import rms, baker_exact_2D as exact_func
from interp.grid.DD import random_grid, rect_grid from interp.grid.DD import random_grid, rect_grid
@ -35,25 +35,25 @@ if __name__ == '__main__':
help = "qhull output file") help = "qhull output file")
parser.add_option("-e", parser.add_option("-e",
"--extra-points", "--extra-verts",
dest="extra", dest="extra",
type='int', type='int',
default = 3, default = 3,
help = "how many extra points (%default)") help = "how many extra verts (%default)")
parser.add_option("-s", parser.add_option("-s",
"--source-total", "--source-total",
dest="source_total", dest="source_total",
type='int', type='int',
default = 100, default = 100,
help = "total number of source points for random, resolution for structured (%default)") help = "total number of source verts for random, resolution for structured (%default)")
parser.add_option("-d", parser.add_option("-d",
"--destination-total", "--destination-total",
dest="destination_total", dest="destination_total",
type='int', type='int',
default = 100, default = 100,
help = "total number of destination points, resolution for structured (%default)") help = "total number of destination verts, resolution for structured (%default)")
parser.add_option("-r", parser.add_option("-r",
"--structured", "--structured",
@ -84,7 +84,7 @@ if __name__ == '__main__':
answer = mesh_source.run_baker(X) answer = mesh_source.run_baker(X)
if answer['a'] == None: if answer['abc'] == None:
errors.append(0) errors.append(0)
continue continue
@ -103,4 +103,4 @@ if __name__ == '__main__':
errors.append(cur_error) errors.append(cur_error)
print rms(errors) print rms(errors)
print >>sys.stderr, "%s of %s won" % (success, len(mesh_dest.points)) print >>sys.stderr, "%s of %s won" % (success, len(mesh_dest.verts))