From def8b5262e183297ccee42ebbf9ebdb89c10f44c Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Sun, 03 Jul 2016 18:21:13 +0000 Subject: [PATCH] restoring vertices with spontaneous curvatures seems to work, however, the dumped energy differs on last few decimal places --- src/snapshot.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/snapshot.c b/src/snapshot.c index 8b71e83..fbb6d4b 100644 --- a/src/snapshot.c +++ b/src/snapshot.c @@ -33,6 +33,7 @@ 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); #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 @@ -127,10 +128,16 @@ ts_bool xml_trisurf_nucleus(ts_string *data, ts_vesicle* vesicle){ if(vesicle->R_nucleus>0.0 || (vesicle->R_nucleusX>0.0 && vesicle->R_nucleusY>0.0 && vesicle->R_nucleusZ>0.0)){ - ts_sprintf(data,"<nucleus>%.17e %.17e %.7e</nucleus>",vesicle->nucleus_center[0], vesicle->nucleus_center[1], vesicle->nucleus_center[2]); + ts_sprintf(data,"<nucleus>%.17e %.17e %.17e</nucleus>",vesicle->nucleus_center[0], vesicle->nucleus_center[1], vesicle->nucleus_center[2]); } return TS_SUCCESS; } +ts_bool xml_trisurf_constvolarea(ts_string *data, ts_double volume, ts_double area){ + ts_sprintf(data,"<constant_volume>%.17e</constant_volume>",volume); + ts_sprintf(data,"<constant_area>%.17e</constant_area>",area); + + return TS_SUCCESS; +} /* UTILITIES */ -- Gitblit v1.9.3