From 2c4278db6ead5c27e30a3000097ed898c968534e Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Sat, 09 Mar 2019 19:45:22 +0000
Subject: [PATCH] Added direct force plugin and fixes in stretching energy

---
 src/plugins/pressure.c |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/plugins/pressure.c b/src/plugins/pressure.c
index a79a438..39676db 100644
--- a/src/plugins/pressure.c
+++ b/src/plugins/pressure.c
@@ -15,17 +15,14 @@
 
 void vm_energy_before_prepare(ts_vesicle *vesicle, ts_vertex *vtx){
 	if(vesicle->pswitch == 1){
-	ts_double *dvol=(ts_double *)vesicle->plist->pointer->plugin->details->data;
-	ts_uint i;
-	//printf ("DVOL was %f\n", *dvol);
-	*dvol=0;
-	for(i=0;i<vtx->tristar_no;i++) *dvol-=vtx->tristar[i]->volume;
-	//printf ("DVOL is %f\n", *dvol);
-
+		ts_double *dvol=(ts_double *)vesicle->plist->pointer->plugin->details->data;
+		ts_uint i;
+		*dvol=0;
+		for(i=0;i<vtx->tristar_no;i++) *dvol-=vtx->tristar[i]->volume;
 	}
 }
 
-ts_double vm_energy_after_execute(ts_vesicle *vesicle, ts_vertex *vtx){
+ts_double vm_energy_after_execute(ts_vesicle *vesicle, ts_vertex *vtx, ts_vertex *backup_vertices){
 	ts_double delta_energy=0;
 	if(vesicle->pswitch == 1){
 		ts_double *dvol=(ts_double *)vesicle->plist->pointer->plugin->details->data;

--
Gitblit v1.9.3