just realized my 2D function is good, but isn't exactly the function used by Baker

This commit is contained in:
Stephen McQuay 2011-05-29 13:22:44 -06:00
parent f31f628b73
commit 00b564880a

View File

@ -22,9 +22,13 @@ def rms(errors):
def baker_exact_2D(X):
"""
the exact function (2D) used from baker's article (for testing)
the exact function (2D) used from baker's article (for testing, slightly
modified)
"""
x ,y = X
# TODO: this is not baker's function!! this is:
# np.power(np.sin(x*np.pi/2.0) * np.sin(y*np.pi/2.0),2)
answer = np.power((np.sin(x * np.pi) * np.cos(y * np.pi)), 2)
log.debug(answer)
return answer