From 5ec690fdf8f463a02c4e4d5505d5486b9a5bbd70 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Tue, 08 Jul 2014 16:21:14 +0000
Subject: [PATCH] Merge branch 'master' of bitbucket.org:samop/trisurf-ng into cross-section

---
 src/main.c |    3 +++
 src/io.c   |   17 +++++------------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/src/io.c b/src/io.c
index eef903c..1bf5d4a 100644
--- a/src/io.c
+++ b/src/io.c
@@ -10,7 +10,7 @@
 #include <dirent.h>
 #include "initial_distribution.h"
 #include "poly.h"
-
+#include "cell.h"
 #include <getopt.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -419,19 +419,12 @@
                 vesicle->filament_list->poly[i]->blist->bond[j]->vtx2=vesicle->filament_list->poly[i]->vlist->vtx[idx];
         }
     }
-
+    vesicle->tape=parsetape("tape");
 // recreating space for cells // 
-	vesicle->clist=(ts_cell_list *)malloc(sizeof(ts_cell_list));
-	retval=fread(vesicle->clist, sizeof(ts_cell_list), 1,fh); 
-	vesicle->clist->cell=(ts_cell **)malloc(sizeof(ts_cell *)*vesicle->clist->ncmax[0]*vesicle->clist->ncmax[1]*vesicle->clist->ncmax[2]);
-	for(i=0;i<vesicle->clist->ncmax[0]*vesicle->clist->ncmax[1]*vesicle->clist->ncmax[2];i++){
-        	vesicle->clist->cell[i]=(ts_cell *)calloc(1,sizeof(ts_cell));
-        	vesicle->clist->cell[i]->idx=i+1; // We enumerate cells! Probably never required!
-    	}
+    vesicle->clist=init_cell_list(vesicle->tape->ncxmax, vesicle->tape->ncymax, vesicle->tape->nczmax, vesicle->tape->stepsize);
 
-//recreating stored tape information//
-    vesicle->tape=(ts_tape *)malloc(sizeof(ts_tape));
-    retval=fread(vesicle->tape, sizeof(ts_tape),1,fh);
+//    vesicle->tape=(ts_tape *)malloc(sizeof(ts_tape));
+//    retval=fread(vesicle->tape, sizeof(ts_tape),1,fh);
 	retval=fread(iteration,sizeof(ts_uint),1,fh);
     if(retval); 
     fclose(fh);
diff --git a/src/main.c b/src/main.c
index f300719..00bd95f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -55,6 +55,9 @@
         free(vesicle->tape);
         vesicle->tape=tape;
 		vesicle->clist->dmin_interspecies = tape->dmin_interspecies*tape->dmin_interspecies;
+
+
+
         /* spherical harmonics */
         if(tape->shc>0){
 	        vesicle->sphHarmonics=complex_sph_init(vesicle->vlist,tape->shc);

--
Gitblit v1.9.3