From 8e58b474db332bf54c3e91684d8ac8d3f14ef11b Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Mon, 09 Jul 2012 17:15:37 +0000 Subject: [PATCH] Maybe found a bug... Lash sh was not initialized to 0 after each calculation --- src/vertex.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/vertex.c b/src/vertex.c index 4a6aeb9..21ad48e 100644 --- a/src/vertex.c +++ b/src/vertex.c @@ -23,6 +23,17 @@ for(i=0;i<N;i++) { vlist->vtx[i]=(ts_vertex *)calloc(1,sizeof(ts_vertex)); vlist->vtx[i]->idx=i; + + /* initialize Ylm for spherical hamonics DONE in sh.c */ +/* for(i=0;i<l;i++){ + vlist->vtx[i]->Ylm[i]=(ts_double **)calloc(2*i+1,sizeof(ts_double *)); + for(j=0;j<(2*i+1);j++){ + clist->vtx[i]->Ylm[i][j]=(ts_double *)calloc(sizeof(ts_double)); + } + } +*/ + + } vlist->n=N; return vlist; @@ -131,7 +142,6 @@ if(vtx->neigh!=NULL) free(vtx->neigh); if(vtx->tristar!=NULL) free(vtx->tristar); if(vtx->bond!=NULL) free(vtx->bond); - free(vtx); return TS_SUCCESS; } -- Gitblit v1.9.3