From d2f3609e9ecec5ec8dc02a992a6ec98e28ca9c6d Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Wed, 27 Feb 2019 18:37:32 +0000 Subject: [PATCH] Merge branch 'master' into plugins --- 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