From 06afc729f9061c1cfa14c78728d61d518324c2f0 Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Wed, 04 May 2022 05:46:43 +0000 Subject: [PATCH] Moved all global variables to separate file and defined extern keyword where appropriate --- src/energy.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/energy.c b/src/energy.c index 77d61ab..b182a87 100644 --- a/src/energy.c +++ b/src/energy.c @@ -213,7 +213,7 @@ } ts_double direct_force_energy(ts_vesicle *vesicle, ts_vertex *vtx, ts_vertex *vtx_old){ - if(fabs(vtx->c)<1e-15) return 0.0; + if(fabs(vtx->direct_interaction_force)<1e-15) return 0.0; // printf("was here"); if(fabs(vesicle->tape->F)<1e-15) return 0.0; @@ -240,5 +240,5 @@ } void stretchenergy(ts_vesicle *vesicle, ts_triangle *triangle){ - triangle->energy=vesicle->tape->xkA0/vesicle->tlist->n/2*pow((triangle->area/vesicle->tlist->a0-1),2); + triangle->energy=vesicle->tape->xkA0/2.0*pow((triangle->area/vesicle->tlist->a0-1.0),2); } -- Gitblit v1.9.3