From 6705af6d3d02e47a797c53146666a1d168e1aefc Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Thu, 06 Mar 2014 08:56:37 +0000
Subject: [PATCH] Merge branch 'trisurf-polyel'. It is the most debugged version. True, without polymeres dump may not work yet, still, from scratch with polymeres set to 0, there should be minimal time penalty.

---
 src/poly.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/poly.c b/src/poly.c
index edab18f..2057db1 100644
--- a/src/poly.c
+++ b/src/poly.c
@@ -4,6 +4,7 @@
 #include"vertex.h"
 #include"bond.h"
 #include<math.h>
+#include"energy.h"
 
 ts_bool poly_assign_spring_const(ts_vesicle *vesicle){
 	ts_uint i;
@@ -30,6 +31,7 @@
 
 	for(i=0;i<poly->blist->n;i++){
 	poly->blist->bond[i]->bond_length=sqrt(vtx_distance_sq(poly->blist->bond[i]->vtx1,poly->blist->bond[i]->vtx2));
+	bond_energy(poly->blist->bond[i],poly);
 	}
 
 	return poly;
@@ -39,7 +41,7 @@
 ts_poly_list *init_poly_list(ts_uint n_poly, ts_uint n_mono, ts_vertex_list *vlist){
 	ts_poly_list *poly_list=(ts_poly_list *)calloc(1,sizeof(ts_poly_list));
 	poly_list->poly	= (ts_poly **)calloc(n_poly,sizeof(ts_poly *));
-	ts_uint i=0,j=0, idx;
+	ts_uint i=0,j=0; //idx;
 	ts_uint gvtxi;
 	ts_double xnorm,ynorm,znorm,normlength;
 
@@ -79,7 +81,7 @@
 	}
 
 		//index correction for polymeres. Important, since each vtx has to have unique id
-	idx=vlist->n;
+/*	idx=vlist->n;
 	for(i=0;i<n_poly;i++){
 		for(j=0;j<n_mono;j++,idx++){
 
@@ -87,7 +89,7 @@
 
 		}
 	}
-
+*/
 
 	return poly_list;
 }

--
Gitblit v1.9.3