From 8e83439a6d921f3f21740b28c70bdd19e2dd8e36 Mon Sep 17 00:00:00 2001 From: Stephen Mardson McQuay Date: Mon, 1 Nov 2010 15:54:12 -0600 Subject: [PATCH] the exact funcs now log what they're doing when they're called --- interp/tools.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/interp/tools.py b/interp/tools.py index 937f4d0..875e09e 100644 --- a/interp/tools.py +++ b/interp/tools.py @@ -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']: