working on adding 3D baker. also starting to massage together a good baker method test (2D), and added a stub file for 3D testing
This commit is contained in:
+14
-1
@@ -35,9 +35,22 @@ if __name__ == '__main__':
|
||||
print >> sys.stderr, "wrote output to %s" % options.output
|
||||
|
||||
errors = []
|
||||
success = 0
|
||||
for x in mesh_dest.points:
|
||||
(final, exact) = baker.run_baker(x, mesh_source, tree, options.extra, options.verbose)
|
||||
lin, error, final = baker.run_baker(x, mesh_source, tree, options.extra, options.verbose)
|
||||
exact = exact_func(x[0], x[1])
|
||||
if np.abs(exact - final) < np.abs(exact - lin):
|
||||
success += 1
|
||||
|
||||
if options.verbose:
|
||||
print "current point : %s" % x
|
||||
print "exact : %0.4f" % exact
|
||||
print "qlin : %0.4f" % lin
|
||||
print "q_final : %0.4f" % final
|
||||
print "qlinerr : %0.4f" % (exact - lin,)
|
||||
print "q_final_err : %0.4f" % (exact - final,)
|
||||
cur_error = np.abs(final - exact)
|
||||
errors.append(cur_error)
|
||||
|
||||
print rms(errors)
|
||||
print "%s of %s won" % (success, options.destination_total)
|
||||
|
||||
Reference in New Issue
Block a user