From f977e8fe32b6a1a2ae85662ab35fd7c9f647cc3e Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Mon, 02 Jul 2018 10:50:58 +0000
Subject: [PATCH] Added a funciton that calculates everything needed for spherical harmonics

---
 src/snapshot.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/snapshot.c b/src/snapshot.c
index da21498..6c628b4 100644
--- a/src/snapshot.c
+++ b/src/snapshot.c
@@ -22,7 +22,7 @@
 
 /* outputs additional data into paraview xml file */
 ts_bool xml_trisurf_data(FILE *fh, ts_vesicle *vesicle){
-
+	ts_double cvol_write=0, carea_write=0;
 	ts_string *data=(ts_string *)malloc(sizeof(ts_sprintf));
 	data->string=(char *)malloc(5120000*sizeof(char)); /*TODO: warning, can break if the string is to long */
 	data->beg=0;
@@ -33,7 +33,15 @@
 	xml_trisurf_vtx_neigh(data,vesicle->vlist);	
 	xml_trisurf_vtx_tristar(data,vesicle->vlist);
 	xml_trisurf_nucleus(data,vesicle);
-	xml_trisurf_constvolarea(data,V0,A0);
+	if(vesicle->tape->constvolswitch==0)
+		cvol_write=vesicle->volume;
+	else
+		cvol_write=V0;
+	if(vesicle->tape->constareaswitch==0)
+		carea_write=vesicle->area;
+	else
+		carea_write=A0;
+	xml_trisurf_constvolarea(data,cvol_write,carea_write);
 #ifdef COMPRESSION
 	char *compressed;
 	ts_uint nbytes=ts_compress_string64(data->string, data->beg-1, &compressed); //suppress null character at the end with by substracting 1

--
Gitblit v1.9.3