From: hackbard Date: Wed, 25 Jun 2003 12:29:48 +0000 (+0000) Subject: fixed cryst->amorph z direction diffusion bug X-Git-Tag: fpb~30 X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f271c1142da782420ef76f1f85750949094e4269;p=physik%2Fnlsop.git fixed cryst->amorph z direction diffusion bug --- diff --git a/nlsop.c b/nlsop.c index 69e8bcb..d61d2ac 100644 --- a/nlsop.c +++ b/nlsop.c @@ -217,11 +217,11 @@ int distrib_c(d3_lattice *d3_l,double d_r,double a,double b,char z_diff) { off=i+j*d3_l->max_x+((k+c+d3_l->max_z)%d3_l->max_z)*d3_l->max_x*d3_l->max_y; carry=0; - if(*(d3_l->status+off)&AMORPH) carry=(int)(d_r*(*(d3_l->extra+off))); + if(*(d3_l->status+off)&AMORPH) carry=(int)(d_r*(*(d3_l->extra+offset))); if(carry!=0) { - *(d3_l->extra+offset)+=carry; - *(d3_l->extra+off)-=carry; + *(d3_l->extra+offset)-=carry; + *(d3_l->extra+off)+=carry; } } } /* if z_diff */