From 7169f14c2110f02320e3f438b1ae0881bd93440d Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Tue, 14 Jun 2016 18:40:36 +0000
Subject: [PATCH] Updated trisurfmanager file. Added remote computer capabilities. Added web interface. Added networked example configuration.

---
 src/io.c |   42 +++++++++++++++++++++++++++++++++++++++---
 1 files changed, 39 insertions(+), 3 deletions(-)

diff --git a/src/io.c b/src/io.c
index 7cb0d62..39dc1e0 100644
--- a/src/io.c
+++ b/src/io.c
@@ -612,11 +612,17 @@
 	fprintf(fd,"Flags:\n\n");
 	fprintf(fd,"--force-from-tape\t\t makes initial shape of the vesicle from tape. Ignores already existing binary dump and possible simulation results.\n");
 	fprintf(fd,"--restore-from-vtk\t\t VTK's file ending with '.vtu' are preferred way to make state snapshots for restoration. With this flag the restoration of the vesicle from vtk is possible. The simulation will continue if hidden '.status' file with last iteration done is present. Otherwise it will start simulation from timestep 0.\n");
-	fprintf(fd,"--reset-iteration-count\t\t starts simulation from the beginning (using binary dump or tape).\n");
+	fprintf(fd,"--reset-iteration-count\t\t starts simulation from the beginning (using binary dump).\n");
 	fprintf(fd,"--tape (or -t)\t\t specifies tape filename. For --force-from-tape and restoring from binary dump. Defaults to 'tape'.\n");
 	fprintf(fd,"--version (or -v)\t\t Prints version information.\n");
 	fprintf(fd,"--output-file (or -o)\t\t Specifies filename of .PVD file. Defaults to 'output.pvd'\n");
-	fprintf(fd,"--dump-filename (or -f)\t\t specifies filename for binary dump&restore. Defaults to 'dump.bin'\n\n");
+	fprintf(fd,"--dump-filename (or -f)\t\t specifies filename for binary dump&restore. Defaults to 'dump.bin'\n\n\n");
+	fprintf(fd,"Examples:\n\n");
+	fprintf(fd,"trisurf --force-from-tape\n");
+	fprintf(fd,"trisurf --reset-iteration-count\n");
+	fprintf(fd,"trisurf --restore-from-vtk filename.vtu\n");
+	fprintf(fd,"\n\n");
+
 	return TS_SUCCESS;
 }
 
@@ -880,7 +886,37 @@
 		}
 	}
 
-    fprintf(fh,"</DataArray>\n</PointData>\n<CellData>\n</CellData>\n<Points>\n<DataArray type=\"Float64\" Name=\"Koordinate tock\" NumberOfComponents=\"3\" format=\"ascii\">\n");
+    	fprintf(fh,"</DataArray>\n");
+	
+	//here comes additional data as needed. Currently only spontaneous curvature
+	fprintf(fh,"<DataArray type=\"Float64\" Name=\"spontaneous_curvature\" format=\"ascii\">");
+	for(i=0;i<vlist->n;i++){
+		fprintf(fh,"%.17e ",vtx[i]->c);
+	}
+		//polymeres
+		if(poly){
+			poly_idx=vlist->n;
+			for(i=0;i<vesicle->poly_list->n;i++){
+				for(j=0;j<vesicle->poly_list->poly[i]->vlist->n;j++,poly_idx++){
+					fprintf(fh,"%.17e ", vesicle->poly_list->poly[i]->vlist->vtx[j]->c);
+				}
+			}
+		}
+		//filaments
+		if(fil){
+			poly_idx=vlist->n+monono*polyno;
+			for(i=0;i<vesicle->filament_list->n;i++){
+				for(j=0;j<vesicle->filament_list->poly[i]->vlist->n;j++,poly_idx++){
+		//	fprintf(stderr,"was here\n");
+					fprintf(fh,"%.17e ",  vesicle->filament_list->poly[i]->vlist->vtx[j]->c);
+				}
+			}
+		}
+    fprintf(fh,"</DataArray>\n");
+
+
+	
+	fprintf(fh,"</PointData>\n<CellData>\n</CellData>\n<Points>\n<DataArray type=\"Float64\" Name=\"Koordinate tock\" NumberOfComponents=\"3\" format=\"ascii\">\n");
 	for(i=0;i<vlist->n;i++){
 		fprintf(fh,"%.17e %.17e %.17e\n",vtx[i]->x,vtx[i]->y, vtx[i]->z);
 	}

--
Gitblit v1.9.3