aboutsummaryrefslogtreecommitdiff log msg author committer range
blob: 32e86bbc66f8b25b95f1c13bb8d51cc732276c2f (plain)
 ```1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 ``` ``````/* * Recursive computation of (arbitrary degree) spherical Bessel/Neumann/Hankel functions, * according to Gumerov and Duraiswami, * "The Fast Multipole Methods for the Helmholtz Equation in Three Dimensions", * Elsevier, 2005. * * Implementation by Franz Zotter, Institute of Electronic Music and Acoustics * (IEM), University of Music and Dramatic Arts (KUG), Graz, Austria * http://iem.at/Members/zotter, 2007. * * This code is published under the Gnu General Public License, see * "LICENSE.txt" */ #include #include "sph_radial.h" #define EPS 1e-10 static void radialRecurrence (double x, double *y, int n); // the two recurrences for higher n: // by now no numeric stabilization for the bessel function is performed static void radialRecurrence (double x, double *y, int n) { int k; for (k=1;k=0) y[0] = (x=1) y[1] = -cos(x)/x + y[0]/x; radialRecurrence (x,y,n); } void sphNeumann (double x, double *y, int n) { if (y==0) return; if (n>=0) y[0] = -cos(x)/x; if (n>=1) y[1] = ((x