diff options
author | Franz Zotter <fzotter@users.sourceforge.net> | 2009-01-12 19:14:05 +0000 |
---|---|---|
committer | Franz Zotter <fzotter@users.sourceforge.net> | 2009-01-12 19:14:05 +0000 |
commit | ca0d6cb8ef5e7ad9ada495fb38892e2d6562ec81 (patch) | |
tree | 35241d566124517e802972961b2b6199ee4e11ea /src/mtx_sh/sharmonics.c | |
parent | 55253e4e15b093a0826fc10b376f7724cea2ba7e (diff) |
corrected some misbehavior of the spherical harmoncis mathematical functions
svn path=/trunk/externals/iem/iemmatrix/; revision=10518
Diffstat (limited to 'src/mtx_sh/sharmonics.c')
-rw-r--r-- | src/mtx_sh/sharmonics.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mtx_sh/sharmonics.c b/src/mtx_sh/sharmonics.c index 57f7367..8593182 100644 --- a/src/mtx_sh/sharmonics.c +++ b/src/mtx_sh/sharmonics.c @@ -56,7 +56,15 @@ static void sharmonics_multcheby12(SHWorkSpace *ws) { const int yincr=(ws->nmax+1)*(ws->nmax+1); for (n=0,ny0=0; n<=ws->nmax; n++) { - for (m=0; m<=n; m++) { + m=0; + ly0=0; + lt0=nt0; + for (l=0; l<ws->l; l++) { + ws->y[ly0+ny0+m]*= ws->wc->t[lt0+m]; + ly0+=yincr; + lt0+=tincr; + } + for (m=1; m<=n; m++) { ly0=0; lt0=nt0; for (l=0; l<ws->l; l++) { |