From 62b11daa07f943c5ab047049cf2e2803188d467c Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@fe.uni-lj.si>
Date: Tue, 05 Jul 2016 10:11:56 +0000
Subject: [PATCH] Added stub function for clustering

---
 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