From 032273a4cf21e1a43038b60b8744021930c97a5b Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@fe.uni-lj.si> Date: Tue, 21 Jun 2016 13:29:35 +0000 Subject: [PATCH] Testing and fixes --- src/energy.c | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/src/energy.c b/src/energy.c index 3173f67..0e57e71 100644 --- a/src/energy.c +++ b/src/energy.c @@ -1,3 +1,4 @@ +/* vim: set ts=4 sts=4 sw=4 noet : */ #include<stdlib.h> #include "general.h" #include "energy.h" @@ -184,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