From 00251384c9c40368b04cfab4f4082666b5541a80 Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Tue, 15 May 2018 16:36:49 +0000 Subject: [PATCH] Fixes in dump ;) --- src/bondflip.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/src/bondflip.c b/src/bondflip.c index 66c40f7..13ec263 100644 --- a/src/bondflip.c +++ b/src/bondflip.c @@ -176,7 +176,6 @@ /* vesicle_volume(vesicle); fprintf(stderr,"Volume in the beginning=%1.16e\n", vesicle->volume); */ - /* fix data structure for flipped bond */ ts_flip_bond(k,it,km,kp, bond,lm, lp, lm2, lp1, vesicle->tape->w); @@ -189,6 +188,12 @@ delta_energy+=it->xk* it->energy; delta_energy+=bond->energy; /* attraction with neighboring vertices, that have spontaneous curvature */ //Neigbours of k, it, km, kp don't change its energy. + if(vesicle->tape->stretchswitch==1){ + oldenergy+=lm->energy+lp->energy; + stretchenergy(vesicle,lm); + stretchenergy(vesicle,lp); + delta_energy+=lm->energy+lp->energy; + } delta_energy-=oldenergy; if(vesicle->pswitch == 1 || vesicle->tape->constvolswitch>0){ @@ -334,6 +339,10 @@ // fprintf(stderr,"Restoration complete!!!\n"); // vesicle_volume(vesicle); // fprintf(stderr,"Volume after fail=%1.16e\n", vesicle->volume); + if(vesicle->tape->stretchswitch==1){ + stretchenergy(vesicle,lm); + stretchenergy(vesicle,lp); + } return TS_FAIL; } -- Gitblit v1.9.3