From 55253e4e15b093a0826fc10b376f7724cea2ba7e Mon Sep 17 00:00:00 2001 From: Franz Zotter Date: Mon, 12 Jan 2009 17:09:13 +0000 Subject: added [mtx_sh] for spherical harmonics evaluation. svn path=/trunk/externals/iem/iemmatrix/; revision=10515 --- src/mtx_sh/sharmonics.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/mtx_sh/sharmonics.h (limited to 'src/mtx_sh/sharmonics.h') diff --git a/src/mtx_sh/sharmonics.h b/src/mtx_sh/sharmonics.h new file mode 100644 index 0000000..78919f7 --- /dev/null +++ b/src/mtx_sh/sharmonics.h @@ -0,0 +1,43 @@ +/* + * Recursive computation of (arbitrary degree) spherical harmonics, + * 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" + */ + +#ifndef _sh_h__ +#define _sh_h__ + +#include +#include "legendre_a.h" +#include "chebyshev12.h" +#include "sharmonics_normalization.h" + +typedef struct _SHWorkSpace_ +{ + size_t nmax; + size_t l; + + double *y; + + SHNorml *wn; + Cheby12WorkSpace *wc; + LegendreWorkSpace *wl; + +} SHWorkSpace; + +SHWorkSpace *sharmonics_alloc(size_t nmax, size_t l); + +void sharmonics_free(SHWorkSpace *sh); + +void sharmonics(double *phi, double *theta, SHWorkSpace *ws); + +#endif + -- cgit v1.2.1