From: hackbard Date: Thu, 30 Nov 2006 18:53:28 +0000 (+0000) Subject: neighbourk fix X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9696b3202fea9d936da68c322517ecbae994597;p=physik%2Fposic.git neighbourk fix --- diff --git a/moldyn.c b/moldyn.c index ed831ae..815fc87 100644 --- a/moldyn.c +++ b/moldyn.c @@ -497,7 +497,6 @@ int link_cell_neighbour_index(t_moldyn *moldyn,int i,int j,int k,t_list *cell) { count2=27; a=nx*ny; - cell[0]=lc->subcell[i+j*nx+k*a]; for(ci=-1;ci<=1;ci++) { bx=0; @@ -762,8 +761,8 @@ int potential_force_calc(t_moldyn *moldyn) { int i,j,k,count; t_atom *atom,*btom,*ktom; t_linkcell *lc; - t_list neighbour[27]; - t_list *this,*thisk,*neighbourk; + t_list neighbour[27],neighbourk[27]; + t_list *this,*thisk; u8 bc,bck; int countn,dnlc; @@ -824,13 +823,11 @@ int potential_force_calc(t_moldyn *moldyn) { !(btom->attr&ATOM_ATTR_3BP)) continue; -printf("DEBUG: problem exists here ...\n"); link_cell_neighbour_index(moldyn, (btom->r.x+moldyn->dim.x/2)/lc->x, (btom->r.y+moldyn->dim.y/2)/lc->y, (btom->r.z+moldyn->dim.z/2)/lc->z, neighbourk); -printf("DEBUG: as you won't see that!\n"); for(k=0;kcountn;k++) {