From 47a7aced121a6a5348b5e718f36146c6ac76f6ed Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@fe.uni-lj.si>
Date: Tue, 08 Jul 2014 09:07:45 +0000
Subject: [PATCH] Changed procedure. Tape info from dump is not used. Tape info is read from file. This is to fix changing frame size temporary.

---
 src/io.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/io.c b/src/io.c
index 3fecef5..ead2a7e 100644
--- a/src/io.c
+++ b/src/io.c
@@ -419,19 +419,21 @@
                 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); 
+	retval=fread(vesicle->clist, sizeof(ts_cell_list), 1,fh);
+    vesicle->clist->ncmax[0]=vesicle->tape->ncxmax; 
+    vesicle->clist->ncmax[1]=vesicle->tape->ncymax; 
+    vesicle->clist->ncmax[2]=vesicle->tape->nczmax; 
 	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!
     	}
-
 //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);

--
Gitblit v1.9.3