From e19e790e95f14ca69a7ce9c5e45d815fe21df36e Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Tue, 10 Jul 2012 12:33:43 +0000
Subject: [PATCH] It seems bondflip is fixed. Before 'for' loops I had to set j=0 in vertex.c and triangle.c in remove_neighbour

---
 src/co_test.c |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/src/co_test.c b/src/co_test.c
index cf08f6f..0885510 100644
--- a/src/co_test.c
+++ b/src/co_test.c
@@ -2,6 +2,7 @@
 #include "sh.h"
 #include "vesicle.h"
 #include "initial_distribution.h"
+#include <math.h>
 
 int main(){
 ts_vesicle *vesicle=initial_distribution_dipyramid(4,60,60,60,0.15);
@@ -16,14 +17,29 @@
 
 vesicle->sphHarmonics=sph_init(vesicle->vlist, 10);
 int 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]);
+    }
+}
+ts_double r0;
+vesicle_volume(vesicle);
+fprintf(stderr,"Volume=%e\n",vesicle->volume);
+r0=getR0(vesicle);
+fprintf(stderr,"r0=%e\n",r0);
+preparationSh(vesicle,r0);
+calculateYlmi(vesicle);
+calculateUlm(vesicle);
+
 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]);
+    fprintf(stderr,"ulm(%d,%d)=%e\n",i,j+1,vesicle->sphHarmonics->ulm[i][j]);
     }
 }
 
 
+
 sph_free(vesicle->sphHarmonics);
-//vesicle_free(vesicle);
+vesicle_free(vesicle);
 return 0;
 }

--
Gitblit v1.9.3