From 92b9deaf8d7c2a96c3977e1204341d6b6feb1fc1 Mon Sep 17 00:00:00 2001 From: Franz Zotter Date: Wed, 14 Jan 2009 10:58:32 +0000 Subject: renamed [mtx_sh] to [mtx_spherical_harmonics]. svn path=/trunk/externals/iem/iemmatrix/; revision=10549 --- .../cmdline/chebyshev12_cmd.c | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/mtx_spherical_harmonics/cmdline/chebyshev12_cmd.c (limited to 'src/mtx_spherical_harmonics/cmdline/chebyshev12_cmd.c') diff --git a/src/mtx_spherical_harmonics/cmdline/chebyshev12_cmd.c b/src/mtx_spherical_harmonics/cmdline/chebyshev12_cmd.c new file mode 100644 index 0000000..07f0305 --- /dev/null +++ b/src/mtx_spherical_harmonics/cmdline/chebyshev12_cmd.c @@ -0,0 +1,46 @@ + +/* command line test for chebyshev12.c + * Franz Zotter, 2009, see ../LICENSE.txt */ + +#include + +#include "chebyshev12.h" + +int main (int argc, char *argv[]) { + int nmax, l, lc, n, m; + Cheby12WorkSpace *wc=0; + double *ptr,*phi; + + if (argc <3) { + printf("chebyshev12 requires nmax as input argument followed by phi values\n"); + return 0; + } + + nmax=atoi(argv[1]); + l=argc-2; + if ((phi=(double*)calloc(l,sizeof(double)))==0) { + printf("chebyshev12 could not allocate memory for %d phi-values\n",l); + return 0; + } + if ((wc=chebyshev12_alloc(nmax,l))==0) { + printf("chebyshev12 could not allocate memory for n=%d\n and l=%d\n",nmax,l); + return 0; + } + for (n=0;nt; + for (lc=0;lc