From 6da644f98434d3eac8b4e19981754f6030a315a5 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Wed, 27 Jun 2018 12:05:32 +0000
Subject: [PATCH] Resolving the issues with restoring vesicles from vtu and fixing the volume. Dump to vtu has been repaired.

---
 src/vertexmove.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/vertexmove.c b/src/vertexmove.c
index 1d5d7fa..3483965 100644
--- a/src/vertexmove.c
+++ b/src/vertexmove.c
@@ -165,7 +165,7 @@
 
 	if(vesicle->tape->constvolswitch==2){
 		/*check whether the dvol is gt than epsvol */
-			//fprintf(stderr,"DVOL=%1.16e\n",dvol);
+			//fprintf(stderr,"DVOL=%1.16e, V0=%1.16e, vesicleVolume=%1.16e, |volume+dvol-V0|=%1.16e\n",dvol, V0, vesicle->volume, fabs(vesicle->volume+dvol-V0));
 		if(fabs(vesicle->volume+dvol-V0)>epsvol){
 			//restore old state.
  			vtx=memcpy((void *)vtx,(void *)&backupvtx[0],sizeof(ts_vertex));
@@ -173,11 +173,12 @@
 		        	vtx->neigh[i]=memcpy((void *)vtx->neigh[i],(void *)&backupvtx[i+1],sizeof(ts_vertex));
 	        	}
             		for(i=0;i<vtx->tristar_no;i++) triangle_normal_vector(vtx->tristar[i]); 
-            		//fprintf(stderr,"fajlam!\n");
+            	//	fprintf(stderr,"fajlam!\n");
             		return TS_FAIL;
 		}
 
 	} else
+		//fprintf(stderr, "success\n");
 //    vesicle_volume(vesicle);
 //    fprintf(stderr,"Volume before=%1.16e\n", vesicle->volume);
    if(vesicle->tape->constvolswitch == 1){

--
Gitblit v1.9.3