From d2f3609e9ecec5ec8dc02a992a6ec98e28ca9c6d Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Wed, 27 Feb 2019 18:37:32 +0000
Subject: [PATCH] Merge branch 'master' into plugins

---
 src/restore.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/restore.c b/src/restore.c
index c89ff6d..989a87b 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -16,13 +16,14 @@
 #include "poly.h"
 #include "initial_distribution.h"
 #include "io.h"
+#include <math.h>
 
 ts_vesicle *parseDump(char *dumpfname) {
 	xmlDocPtr doc;
 	xmlNodePtr cur, cur1,cur2;
 	ts_vesicle *vesicle=NULL;
 	doc = xmlParseFile(dumpfname);
-	
+	int i;
 	if (doc == NULL ) {
 		fatal("Dump file could not be found or parsed. It is correct file?",1);
 	}
@@ -86,7 +87,12 @@
 	init_normal_vectors(vesicle->tlist);
 	mean_curvature_and_energy(vesicle);
 	sweep_attraction_bond_energy(vesicle);
-
+	if(vesicle->tape->stretchswitch==1){
+		vesicle->tlist->a0=sqrt(3)/4.0*pow((vesicle->tape->dmax+1.0)/2.0,2);  
+		for(i=0;i<vesicle->tlist->n;i++){
+			stretchenergy(vesicle, vesicle->tlist->tria[i]);
+		}
+	}
 /* TODO: filaments */
 
 //	ts_fprintf(stdout,"Restoration completed\n");

--
Gitblit v1.9.3