From 5bb6bb1c525a0503f8eb2b1c0fa64a5d3cc6e9bf Mon Sep 17 00:00:00 2001 From: mihaf <miha.fosnaric@gmail.com> Date: Wed, 16 Apr 2014 10:09:35 +0000 Subject: [PATCH] Output for spherical harmonics testing added. --- src/timestep.c | 15 ++++++++++++++- src/tape | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/tape b/src/tape index c1f23e1..7de3646 100644 --- a/src/tape +++ b/src/tape @@ -44,11 +44,11 @@ ####### Program Control ############ #how many MC sweeps between subsequent records of states to disk -mcsweeps=100 +mcsweeps=10 #how many initial mcsweeps*inititer MC sweeps before recording to disk? inititer=0 #how many records do you want on the disk iteration are there in a run? -iterations=500 +iterations=10 ###### Spherical harmonics ########### diff --git a/src/timestep.c b/src/timestep.c index b7857dd..f24eccd 100644 --- a/src/timestep.c +++ b/src/timestep.c @@ -13,10 +13,11 @@ #include "vesicle.h" ts_bool run_simulation(ts_vesicle *vesicle, ts_uint mcsweeps, ts_uint inititer, ts_uint iterations, ts_uint start_iteration){ - ts_uint i, j; + ts_uint i, j,k; ts_double r0; ts_double l1,l2,l3,volume=0.0,area=0.0,vmsr,bfsr, vmsrt, bfsrt; ts_ulong epochtime; + FILE *fd1; // char filename[255]; FILE *fd=fopen("statistics.csv","w"); if(fd==NULL){ @@ -54,6 +55,18 @@ calculateUlm(vesicle); storeUlm2(vesicle); saveAvgUlm2(vesicle); + fd1=fopen("state.dat","w"); + fprintf(fd1,"%e %e\n",vesicle->volume, getR0(vesicle)); + for(k=0;k<vesicle->vlist->n;k++){ + fprintf(fd1,"%e %e %e %e %e\n", + vesicle->vlist->vtx[k]->x, + vesicle->vlist->vtx[k]->y, + vesicle->vlist->vtx[k]->z, + vesicle->vlist->vtx[k]->solAngle, + vesicle->vlist->vtx[k]->relR + ); + } + fclose(fd1); } fprintf(fd, "%lu %u %e %e %1.16e %1.16e %1.16e %1.16e %1.16e\n",epochtime,i,vmsr,bfsr,volume, area,l1,l2,l3); -- Gitblit v1.9.3