From d5d78a49c6b51fb1f6f0661d063034eaf65e02f7 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Wed, 25 Sep 2019 09:20:36 +0000
Subject: [PATCH] Constant volume and constant area fix. Removed spherical harmonics calculations in simulations. No ulm2.cvs and state.dat files are produced anymore

---
 src/tsmeasure.c |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/src/tsmeasure.c b/src/tsmeasure.c
index 394f42a..beabc61 100644
--- a/src/tsmeasure.c
+++ b/src/tsmeasure.c
@@ -34,7 +34,9 @@
 }
 
 void vesicle_calculate_ulm2(ts_vesicle *vesicle){
-	vesicle->sphHarmonics=complex_sph_init(vesicle->vlist,21);
+	//complex_sph_free(vesicle->sphHarmonics);
+
+	//vesicle->sphHarmonics=complex_sph_init(vesicle->vlist,21);
 	vesicle_volume(vesicle);
 	preparationSh(vesicle,getR0(vesicle));
 	calculateUlmComplex(vesicle);
@@ -65,7 +67,9 @@
 		struct dirent *ent;
 		ent=list[n];	
             	i=rindex(ent->d_name,'.');
-            	if(i==NULL) continue;
+            	if(i==NULL) {
+				continue;
+		}
             	if(strcmp(i+1,"vtu")==0){
                     j=rindex(ent->d_name,'_');
                     if(j==NULL) continue;
@@ -76,11 +80,16 @@
 			vesicle=restoreVesicle(ent->d_name);
 			vesicle_calculate_ulm2(vesicle);
                     	tstep++;
-			//vesicle_free(vesicle);
                     free(number);
+			tape_free(vesicle->tape);
+			vesicle_free(vesicle);
             	}
-		free(ent);  
 		}
+	for (n = 0; n < count; n++)
+  	{
+  		free(list[n]);
+  	}
+	
 	free(list);
 	return 0;
 }

--
Gitblit v1.9.3