From 79fc9ce029be3e91d3249a654f84c7a1ce1ff9ee Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Thu, 07 Jun 2012 19:46:44 +0000 Subject: [PATCH] spherical harmonics coefficients co fixed and working. Zero based indexing was solved in such a manner, that we allocated more memory that is required by coefficients. --- src/co_test.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/co_test.c b/src/co_test.c index cf08f6f..3b5c69d 100644 --- a/src/co_test.c +++ b/src/co_test.c @@ -16,9 +16,9 @@ vesicle->sphHarmonics=sph_init(vesicle->vlist, 10); int i,j; -for(i=0;i<vesicle->sphHarmonics->l;i++){ - for(j=0;j<2*i+1;j++){ - fprintf(stderr,"co(%d,%d)=%f\n",i,j,vesicle->sphHarmonics->co[i][j]); +for(i=1;i<=vesicle->sphHarmonics->l;i++){ + for(j=1;j<=2*i+1;j++){ + fprintf(stderr,"co(%d,%d)=%e\n",i,j,vesicle->sphHarmonics->co[i][j]); } } -- Gitblit v1.9.3