From 8a66144c9118f8df80eba28c5b363fac574194da Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Sat, 08 Mar 2014 18:25:18 +0000 Subject: [PATCH] Parsing command line arguments is still kind-of messy, but it workds for force-from-tape and reset-iteration-count --- src/vertexmove.c | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/vertexmove.c b/src/vertexmove.c index 86b8533..7f6391f 100644 --- a/src/vertexmove.c +++ b/src/vertexmove.c @@ -18,7 +18,7 @@ ts_double dist; ts_bool retval; ts_uint cellidx; - ts_double delta_energy,oenergy; + ts_double delta_energy,oenergy,dvol=0.0; ts_double costheta,sintheta,phi,r; //This will hold all the information of vtx and its neighbours ts_vertex backupvtx[20]; @@ -83,7 +83,9 @@ memcpy((void *)&backupvtx[i+1],(void *)vtx->neigh[i],sizeof(ts_vertex)); } - + if(vesicle->pswitch == 1){ + for(i=0;i<vtx->tristar_no;i++) dvol-=vtx->tristar[i]->volume; + }; delta_energy=0; //update the normals of triangles that share bead i. @@ -97,6 +99,12 @@ energy_vertex(vtx->neigh[i]); delta_energy+=vtx->neigh[i]->xk*(vtx->neigh[i]->energy-oenergy); } + + if(vesicle->pswitch == 1){ + for(i=0;i<vtx->tristar_no;i++) dvol+=vtx->tristar[i]->volume; + delta_energy-=vesicle->pressure*dvol; + }; + /* No poly-bond energy for now! if(vtx->grafted_poly!=NULL){ delta_energy+= -- Gitblit v1.9.3