From: hackbard Date: Wed, 29 Nov 2006 16:25:08 +0000 (+0000) Subject: more updates -> testing X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=3ce21f4433c04699bb6f47f0332a6f0e3c462f5e;p=physik%2Fposic.git more updates -> testing --- diff --git a/moldyn.c b/moldyn.c index a978541..eb2c606 100644 --- a/moldyn.c +++ b/moldyn.c @@ -618,10 +618,6 @@ int moldyn_integrate(t_moldyn *moldyn) { /* calculate initial forces */ potential_force_calc(moldyn); - /* accuracy check */ - ds=0.5*moldyn->tau_square*v3_norm(&(atom[0].f))/atom[0].mass; - if(ds>moldyn->lc. - /* zero absolute time */ moldyn->time=0.0; diff --git a/run b/run index 841b377..b1a2ceb 100755 --- a/run +++ b/run @@ -1,6 +1,6 @@ mkdir -p saves video ./clean -./posic $@ +./sic $@ if [ "$?" == "0" ]; then ./perms argv="`echo $@ | grep -- '-V'`" diff --git a/sic.c b/sic.c index 9cb2c55..5d85534 100644 --- a/sic.c +++ b/sic.c @@ -25,7 +25,7 @@ int main(int argc,char **argv) { /* potential parameters */ t_lj_params lj; t_ho_params ho; - t_tersoff_mult_params tp; + //t_tersoff_mult_params tp; /* misc variables, mainly to initialize stuff */ t_3dvec r,v; @@ -64,11 +64,12 @@ int main(int argc,char **argv) { /* cutoff radius */ printf("[sic] setting cutoff radius\n"); - set_cutoff(&md,LC_SI); + set_cutoff(&md,5*LC_SI); /* 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"); @@ -83,10 +84,6 @@ int main(int argc,char **argv) { add_atom(&md,SI,M_SI,0,ATOM_ATTR_2BP,&r,&v); r.x=-r.x; add_atom(&md,SI,M_SI,0,ATOM_ATTR_2BP,&r,&v); - printf("[sic] check: there are %d atoms\n",md.count); - printf("[sic] check: atoms x pos: %.15f %.15f\n",md.atom[0].r.x,md.atom[1].r.x); - printf("[sic] check: atoms x vel: %.15f %.15f\n",md.atom[0].v.x,md.atom[1].v.x); - printf("[sic] check: atoms mass: %.35f %.35f\n",md.atom[0].mass,md.atom[1].mass); /* set temperature */ printf("[sic] setting temperature\n"); @@ -95,18 +92,15 @@ int main(int argc,char **argv) { /* initial thermal fluctuations of particles */ printf("[sic] thermal init\n"); thermal_init(&md); - printf("[sic] check: there are %d atoms\n",md.count); - printf("[sic] check: atoms x pos: %.15f %.15f\n",md.atom[0].r.x,md.atom[1].r.x); - printf("[sic] check: atoms x vel: %.15f %.15f\n",md.atom[0].v.x,md.atom[1].v.x); /* create the simulation schedule */ printf("[sic] adding schedule\n"); - moldyn_add_schedule(&md,10000,1.0e-12); + moldyn_add_schedule(&md,10000,1.0e-15); /* activate logging */ printf("[sic] activate logging\n"); - moldyn_set_log(&md,LOG_TOTAL_ENERGY,"saves/test-energy",1); - moldyn_set_log(&md,VISUAL_STEP,"saves/test-visual",1); + moldyn_set_log(&md,LOG_TOTAL_ENERGY,"saves/test-energy",100); + moldyn_set_log(&md,VISUAL_STEP,"saves/test-visual",100); /* * let's do the actual md algorithm now diff --git a/visual/visual.c b/visual/visual.c index d675c5d..427e765 100644 --- a/visual/visual.c +++ b/visual/visual.c @@ -55,8 +55,6 @@ int visual_init(t_visual *v,char *filebase) { } dprintf(v->fd,"set write on\n"); - memset(&(v->dim),0,sizeof(t_3dvec)); - return 0; }