Primarily: fixed the gmsh module to use integer indices

also did some pep8/pyflakes cleanup
This commit is contained in:
Stephen M. McQuay
2011-09-27 15:23:42 -06:00
parent 0ae558f660
commit 1af176a6e0
9 changed files with 1131 additions and 1110 deletions
+6 -3
View File
@@ -45,8 +45,9 @@ def baker_exact_3D(X):
np.sin(z * np.pi / 2.0)), 2)
return answer
def exact_me(X, f):
a = np.array([f(i) for i in X])
def exact_me(points, f):
a = np.array([f(i) for i in points])
return a
@@ -71,10 +72,12 @@ def improved_answer(answer, exact):
else:
return False
def identical_points(a,b):
def identical_points(a, b):
return all(set(j[i] for j in a) \
== set(j[i] for j in b) for i in xrange(len(a[0])))
def improved(qlin, err, final, exact):
if np.abs(final - exact) <= np.abs(qlin - exact):
return True