From 9166cbcd0e28d61a69646911af35bb7895ff9203 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@fe.uni-lj.si>
Date: Mon, 28 Apr 2014 11:16:45 +0000
Subject: [PATCH] Did major change in vesicle datastructure. Added tape information into vesicle. This means the dump files will be broken each time tape structure changes. Beware.

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

diff --git a/src/io.c b/src/io.c
index d001b7e..2113d9f 100644
--- a/src/io.c
+++ b/src/io.c
@@ -170,7 +170,8 @@
 */
 
 	fwrite(vesicle->clist, sizeof(ts_cell_list),1,  fh);
-	
+/* write tape information on vesicle */
+    fwrite(vesicle->tape,sizeof(ts_tape),1,fh);
 	fwrite(&iteration, sizeof(ts_uint),1,fh);
     fclose(fh);
     return TS_SUCCESS;
@@ -428,6 +429,9 @@
         	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);
 	retval=fread(iteration,sizeof(ts_uint),1,fh);
     if(retval); 
     fclose(fh);
@@ -973,6 +977,7 @@
 	CFG_SIMPLE_FLOAT("dmin_interspecies", &tape->dmin_interspecies),
         CFG_SIMPLE_FLOAT("xk0",&tape->xk0),
 	CFG_SIMPLE_INT("pswitch",&tape->pswitch),
+	CFG_SIMPLE_INT("constvolswitch",&tape->constvolswitch),
 	CFG_SIMPLE_FLOAT("pressure",&tape->pressure),
 	CFG_SIMPLE_FLOAT("k_spring",&tape->kspring),
 	CFG_SIMPLE_FLOAT("xi",&tape->xi),

--
Gitblit v1.9.3