From 555fd8b3ff5c121d9faff1000d664fc653c912bf Mon Sep 17 00:00:00 2001
From: mihaf <miha.fosnaric@gmail.com>
Date: Wed, 02 Apr 2014 09:43:19 +0000
Subject: [PATCH] In cell.c changed comparison between vertices in a cell from idx to pointer (to avoid bug that two distinct vertices with same idx are not checked for proximity).

---
 src/energy.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/energy.c b/src/energy.c
index 1e37e08..440f319 100644
--- a/src/energy.c
+++ b/src/energy.c
@@ -21,7 +21,9 @@
 
 
 inline ts_bool bond_energy(ts_bond *bond,ts_poly *poly){
-	bond->energy=poly->k*pow(bond->bond_length-1,2);
+//TODO: This value to be changed and implemented in data structure:
+	ts_double d_relaxed=1.0;
+	bond->energy=poly->k*pow(bond->bond_length-d_relaxed,2);
 	return TS_SUCCESS;
 };
 

--
Gitblit v1.9.3