From: hackbard Date: Tue, 12 Feb 2008 16:56:35 +0000 (+0100) Subject: extended debugging, implemented fixed position attribute X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f828bb665c033d828c520c68a98abdb6fa63a83a;p=physik%2Fposic.git extended debugging, implemented fixed position attribute --- diff --git a/moldyn.c b/moldyn.c index e2c84a5..80cf572 100644 --- a/moldyn.c +++ b/moldyn.c @@ -1738,6 +1738,9 @@ int velocity_verlet(t_moldyn *moldyn) { tau_square=moldyn->tau_square; for(i=0;if.x,itom->f.y,itom->f.z); if(moldyn->time>DSTART&&moldyn->timeatom[5832].f.x); - printf(" y: %0.40f\n",moldyn->atom[5832].f.y); - printf(" z: %0.40f\n",moldyn->atom[5832].f.z); + printf(" x: %0.40f\n",moldyn->atom[DATOM].f.x); + printf(" y: %0.40f\n",moldyn->atom[DATOM].f.y); + printf(" z: %0.40f\n",moldyn->atom[DATOM].f.z); } #endif diff --git a/potentials/albe.c b/potentials/albe.c index fea7ba8..bab0e27 100644 --- a/potentials/albe.c +++ b/potentials/albe.c @@ -81,8 +81,6 @@ int albe_mult_3bp_j1(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc) { moldyn->run3bp=0; return 0; } -//if(ai==&(moldyn->atom[5832])) -// printf(" %d: %d (%f)\n",ai->tag,aj->tag,moldyn->time); /* d_ij */ d_ij=sqrt(d_ij2); @@ -285,16 +283,16 @@ int albe_mult_3bp_j2(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc) { #ifdef DEBUG if(moldyn->time>DSTART&&moldyn->timeatom[5832]))|(aj==&(moldyn->atom[5832]))) { + if((ai==&(moldyn->atom[DATOM]))|(aj==&(moldyn->atom[DATOM]))) { printf("force 3bp (j2): [%d %d sum]\n",ai->tag,aj->tag); - printf("adding %f %f %f\n",force.x,force.y,force.z); + printf(" adding %f %f %f\n",force.x,force.y,force.z); if(ai==&(moldyn->atom[0])) - printf("total i: %f %f %f\n",ai->f.x,ai->f.y,ai->f.z); + printf(" total i: %f %f %f\n",ai->f.x,ai->f.y,ai->f.z); if(aj==&(moldyn->atom[0])) - printf("total j: %f %f %f\n",aj->f.x,aj->f.y,aj->f.z); - printf("energy: %f = %f %f %f %f\n",0.5*f_c*(b*f_a+f_r), + printf(" total j: %f %f %f\n",aj->f.x,aj->f.y,aj->f.z); + printf(" energy: %f = %f %f %f %f\n",0.5*f_c*(b*f_a+f_r), f_c,b,f_a,f_r); - printf(" %f %f %f\n",exchange->zeta_ij,.0,.0); + printf(" %f %f %f\n",exchange->zeta_ij,.0,.0); } } #endif @@ -403,10 +401,12 @@ int albe_mult_3bp_k2(t_moldyn *moldyn, #ifdef DEBUG if(moldyn->time>DSTART&&moldyn->timeatom[5832])) { + if(ai==&(moldyn->atom[DATOM])) { printf("force 3bp (k2): [%d %d %d]\n",ai->tag,aj->tag,ak->tag); - printf("adding %f %f %f\n",force.x,force.y,force.z); - printf("total i: %f %f %f\n",ai->f.x,ai->f.y,ai->f.z); + printf(" adding %f %f %f\n",force.x,force.y,force.z); + printf(" total i: %f %f %f\n",ai->f.x,ai->f.y,ai->f.z); + printf(" angle: %f\n",acos(cos_theta)*360.0/(2*M_PI)); + printf(" d ij ik = %f %f\n",d_ij,d_ik); } } #endif @@ -422,10 +422,12 @@ if(moldyn->time>DSTART&&moldyn->timetime>DSTART&&moldyn->timeatom[5832])) { + if(aj==&(moldyn->atom[DATOM])) { printf("force 3bp (k2): [%d %d %d]\n",ai->tag,aj->tag,ak->tag); - printf("adding %f %f %f\n",force.x,force.y,force.z); - printf("total j: %f %f %f\n",aj->f.x,aj->f.y,aj->f.z); + printf(" adding %f %f %f\n",force.x,force.y,force.z); + printf(" total j: %f %f %f\n",aj->f.x,aj->f.y,aj->f.z); + printf(" angle: %f\n",acos(cos_theta)*360.0/(2*M_PI)); + printf(" d ij ik = %f %f\n",d_ij,d_ik); } } #endif @@ -445,10 +447,12 @@ if(moldyn->time>DSTART&&moldyn->timetime>DSTART&&moldyn->timeatom[5832])) { + if(ak==&(moldyn->atom[DATOM])) { printf("force 3bp (k2): [%d %d %d]\n",ai->tag,aj->tag,ak->tag); - printf("adding %f %f %f\n",force.x,force.y,force.z); - printf("total k: %f %f %f\n",ak->f.x,ak->f.y,ak->f.z); + printf(" adding %f %f %f\n",force.x,force.y,force.z); + printf(" total k: %f %f %f\n",ak->f.x,ak->f.y,ak->f.z); + printf(" angle: %f\n",acos(cos_theta)*360.0/(2*M_PI)); + printf(" d ij ik = %f %f\n",d_ij,d_ik); } } #endif