From a18ed8730a0bf9cf49db1869bb82b274969adebe Mon Sep 17 00:00:00 2001 From: Miha <mihaf@hapi.(none)> Date: Wed, 12 Feb 2014 15:11:31 +0000 Subject: [PATCH] Bug if(cell_occupation>1) in cell.c found and removed! Hura!!!! --- src/poly.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/src/poly.c b/src/poly.c index 05566d0..1ddcec7 100644 --- a/src/poly.c +++ b/src/poly.c @@ -4,7 +4,17 @@ #include"vertex.h" #include"bond.h" #include<math.h> +#include"energy.h" +ts_bool poly_assign_spring_const(ts_vesicle *vesicle){ + ts_uint i; + + for(i=0;i<vesicle->poly_list->n;i++){ + vesicle->poly_list->poly[i]->k = vesicle->spring_constant; + } + + return TS_SUCCESS; +} ts_poly *init_poly(ts_uint n, ts_vertex *grafted_vtx){ ts_poly *poly=(ts_poly *)calloc(1,sizeof(ts_poly)); @@ -19,6 +29,11 @@ vtx_add_neighbour(poly->vlist->vtx[i+1], poly->vlist->vtx[i]); } + 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; } -- Gitblit v1.9.3