From e5858ff1dcf5cecfcfe81602f52d255de9d508f4 Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@fe.uni-lj.si> Date: Tue, 21 Jun 2016 10:49:57 +0000 Subject: [PATCH] Change in location of setting spontaneous curvature. Now it is done in initial_distribution.c, in function set_vesicle_values_from_tape. Also, energy assigning function is done and sweeping of the whole vesicle aswell. --- src/energy.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/src/energy.c b/src/energy.c index 4f2b386..cc5ccde 100644 --- a/src/energy.c +++ b/src/energy.c @@ -185,3 +185,25 @@ return TS_SUCCESS; } + + + +ts_bool sweep_attraction_bond_energy(ts_vesicle *vesicle){ + int i; + for(i=0;i<vesicle->blist->n;i++){ + attraction_bond_energy(vesicle->blist->bond[i], vesicle->tape->w); + } + return TS_SUCCESS; +} + + +inline ts_bool attraction_bond_energy(ts_bond *bond, ts_double w){ + + if(fabs(bond->vtx1->c)>1e-16 && fabs(bond->vtx2->c)>1e-16){ + bond->energy=w; + } + else { + bond->energy=0.0; + } + return TS_SUCCESS; +} -- Gitblit v1.9.3