From 2eaa9ed304d3cf22883db99a41a277cde6deb617 Mon Sep 17 00:00:00 2001 From: Samo Penic <samo.penic@gmail.com> Date: Wed, 27 Feb 2019 18:36:47 +0000 Subject: [PATCH] Fix in size of c0 for clustering --- src/tspoststat.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/tspoststat.c b/src/tspoststat.c index 5ac1c4e..f518000 100644 --- a/src/tspoststat.c +++ b/src/tspoststat.c @@ -70,7 +70,7 @@ ts_cluster_list *cstlist=init_cluster_list(); clusterize_vesicle(vesicle,cstlist); //printf("No clusters=%d\n",cstlist->n); - int k,i,cnt; + int k,i,cnt, test=0; int max_nvtx=0; char filename[255]; sprintf(filename,"histogram_%.6u.csv",timestep_no); @@ -84,12 +84,15 @@ for(k=0;k<cstlist->n;k++) if(cstlist->cluster[k]->nvtx==i) cnt++; fprintf(fd,"%d %d\n",i,cnt); + test+=cnt*i; } //for(k=0;k<cstlist->n;k++){ // printf("*Cluster %d has %d vertices\n",k,cstlist->cluster[k]->nvtx); // } fclose(fd); +// printf("*Sum of all vertices in clusters: %d\n", test); +// write_vertex_xml_file(vesicle,timestep_no,cstlist); cluster_list_free(cstlist); return TS_SUCCESS; @@ -102,11 +105,11 @@ ts_uint tstep,n; ts_char *number; struct dirent **list; - ts_double l1,l2,l3; + ts_double l1,l2,l3,hbar; int count; ts_fprintf(stderr,"TRISURF-NG v. %s, compiled on: %s %s.\n", TS_VERSION, __DATE__, __TIME__); - fprintf(stdout, "OuterLoop Volume Area lamdba1 lambda2 lambda3 Nbw/Nb\n"); + fprintf(stdout, "OuterLoop Volume Area lamdba1 lambda2 lambda3 Nbw/Nb hbar\n"); count=scandir(".",&list,0,alphasort); @@ -133,7 +136,8 @@ vesicle_volume(vesicle); vesicle_area(vesicle); gyration_eigen(vesicle,&l1,&l2,&l3); - fprintf(stdout,"%d %.17e %.17e %.17e %.17e %.17e %.17e\n",atoi(number),vesicle->volume, vesicle->area,l1,l2,l3, (ts_double)count_bonds_with_energy(vesicle->blist)/(ts_double)vesicle->blist->n), + hbar=vesicle_meancurvature(vesicle)/vesicle->area; + fprintf(stdout,"%d %.17e %.17e %.17e %.17e %.17e %.17e %.17e\n",atoi(number),vesicle->volume, vesicle->area,l1,l2,l3, (ts_double)count_bonds_with_energy(vesicle->blist)/(ts_double)vesicle->blist->n,hbar); tstep++; write_histogram_data(atoi(number), vesicle); free(number); -- Gitblit v1.9.3