From: hackbard Date: Wed, 29 Nov 2006 19:10:55 +0000 (+0000) Subject: more foo X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=76f807f6dda48b6d606309cea79005e612e4f665;p=physik%2Fposic.git more foo --- diff --git a/moldyn.c b/moldyn.c index eb2c606..9d782d6 100644 --- a/moldyn.c +++ b/moldyn.c @@ -41,9 +41,9 @@ int moldyn_init(t_moldyn *moldyn,int argc,char **argv) { int moldyn_shutdown(t_moldyn *moldyn) { + printf("[moldyn] shutdown\n"); moldyn_log_shutdown(moldyn); link_cell_shutdown(moldyn); - moldyn_log_shutdown(moldyn); rand_close(&(moldyn->random)); free(moldyn->atom); @@ -171,9 +171,10 @@ int moldyn_set_log(t_moldyn *moldyn,u8 type,char *fb,int timer) { int moldyn_log_shutdown(t_moldyn *moldyn) { + printf("[moldyn] log shutdown\n"); if(moldyn->efd) close(moldyn->efd); if(moldyn->mfd) close(moldyn->mfd); - if(moldyn->visual) visual_tini(moldyn->visual); + if(&(moldyn->vis)) visual_tini(&(moldyn->vis)); return 0; } diff --git a/moldyn.h b/moldyn.h index 947467c..a2855a7 100644 --- a/moldyn.h +++ b/moldyn.h @@ -109,7 +109,7 @@ typedef struct s_moldyn { int mfd; /* fd for momentum log */ unsigned int vwrite; /* how often to visualize atom information */ char vfb[64]; /* visualization file name base */ - void *visual; /* pointer (hack!) */ + //void *visual; /* pointer (hack!) */ unsigned int swrite; /* how often to create a save file */ char sfb[64]; /* visualization file name base */ diff --git a/run b/run index b1a2ceb..264a4ac 100755 --- a/run +++ b/run @@ -1,13 +1,10 @@ mkdir -p saves video ./clean -./sic $@ +./sic if [ "$?" == "0" ]; then ./perms - argv="`echo $@ | grep -- '-V'`" - if [ "$argv" ] ; then - base=`echo $argv | awk -F'-V' '{ print $2 }' | \ - awk '{ print $2 }'` - rasmol -nodisplay < ${base}.scr > /dev/null 2>&1 + if [ "$1" ] ; then + rasmol -nodisplay < $1.scr > /dev/null 2>&1 ./ppm2avi fi fi diff --git a/sic.c b/sic.c index 5d85534..b5a8d93 100644 --- a/sic.c +++ b/sic.c @@ -69,7 +69,6 @@ int main(int argc,char **argv) { /* set (initial) dimensions of simulation volume */ printf("[sic] setting dimensions\n"); set_dim(&md,10*LC_SI,10*LC_SI,10*LC_SI,TRUE); - printf("%.15f <---\n",md.vis.dim.x); /* set periodic boundary conditions in all directions */ printf("[sic] setting periodic boundary conditions\n");