aboutsummaryrefslogtreecommitdiff
path: root/src/mtx_spherical_harmonics/sharmonics.h
diff options
context:
space:
mode:
authorFranz Zotter <fzotter@users.sourceforge.net>2009-01-14 10:58:32 +0000
committerFranz Zotter <fzotter@users.sourceforge.net>2009-01-14 10:58:32 +0000
commit92b9deaf8d7c2a96c3977e1204341d6b6feb1fc1 (patch)
tree6e17422343f2a63bba88422d02e5d06fdf8d7baf /src/mtx_spherical_harmonics/sharmonics.h
parent96987170c95a18b779cd2bfc316d88d754db4b8e (diff)
renamed [mtx_sh] to [mtx_spherical_harmonics].
svn path=/trunk/externals/iem/iemmatrix/; revision=10549
Diffstat (limited to 'src/mtx_spherical_harmonics/sharmonics.h')
-rw-r--r--src/mtx_spherical_harmonics/sharmonics.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/mtx_spherical_harmonics/sharmonics.h b/src/mtx_spherical_harmonics/sharmonics.h
new file mode 100644
index 0000000..78919f7
--- /dev/null
+++ b/src/mtx_spherical_harmonics/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 <stdlib.h>
+#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
+