From d6ca6e8c97ee146583c4fa5590fe4ec32ce39ed4 Mon Sep 17 00:00:00 2001 From: knarf Date: Wed, 23 Feb 2005 10:24:29 +0000 Subject: insert a commented out (#if 0) section to cut very small spectral coefficients to 0. Does nothing if not enabled git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/TwoPunctures/trunk@38 b2a53a04-0f4f-0410-87ed-f9f25ced00cf --- src/TP_utilities.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/TP_utilities.c b/src/TP_utilities.c index 64edbfd..5c4b5da 100644 --- a/src/TP_utilities.c +++ b/src/TP_utilities.c @@ -555,7 +555,12 @@ chebft_Zeros (double u[], int n, int inv) } } for (j = 0; j < n; j++) - u[j] = c[j]; +#if 0 + if (fabs(c[j]) < 5.e-16) + u[j] = 0.0; + else +#endif + u[j] = c[j]; free_dvector (c, 0, n); } -- cgit v1.2.3