the exact funcs now log what they're doing when they're called

This commit is contained in:
Stephen Mardson McQuay 2010-11-01 15:54:12 -06:00
parent a5cae0eebe
commit 8e83439a6d

View File

@ -48,7 +48,9 @@ def exact_func(X):
"""
x = X[0]
y = X[1]
return np.power((np.sin(x * np.pi) * np.cos(y * np.pi)), 2)
answer = np.power((np.sin(x * np.pi) * np.cos(y * np.pi)), 2)
log.debug(answer)
return answer
def exact_func_3D(X):
"""
@ -57,7 +59,9 @@ def exact_func_3D(X):
x = X[0]
y = X[1]
z = X[2]
return np.power((np.sin(x * np.pi / 2.0) * np.sin(y * np.pi / 2.0) * np.sin(z * np.pi / 2.0)), 2)
answer = np.power((np.sin(x * np.pi / 2.0) * np.sin(y * np.pi / 2.0) * np.sin(z * np.pi / 2.0)), 2)
log.debug(answer)
return answer
def improved_answer(answer, exact, verbose=False):
if not answer['error']: