From d7aebc7be03cc5f7d605e70d7cd380b66e5c0733 Mon Sep 17 00:00:00 2001 From: Stephen Mardson McQuay Date: Tue, 24 May 2011 13:45:39 -0600 Subject: [PATCH] Added another exact function, this time from scipy website --- interp/tools.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/interp/tools.py b/interp/tools.py index a811091..4866f61 100644 --- a/interp/tools.py +++ b/interp/tools.py @@ -49,6 +49,10 @@ def friendly_exact_3D(X): x,y,z = X return 1 + x*x + y*y + z*z +def scipy_exact_2D(X): + x,y = X + return x*(1-x)*np.cos(4*np.pi*x) * np.sin(4*np.pi*y**2)**2 + def improved_answer(answer, exact): if not answer['error']: # was probably just a linear interpolation