]> hackdaworld.org Git - physik/nlsop.git/commitdiff
fixed cryst->amorph z direction diffusion bug
authorhackbard <hackbard>
Wed, 25 Jun 2003 12:29:48 +0000 (12:29 +0000)
committerhackbard <hackbard>
Wed, 25 Jun 2003 12:29:48 +0000 (12:29 +0000)
nlsop.c

diff --git a/nlsop.c b/nlsop.c
index 69e8bcb404d2a551e4da697a1c27fcb9595285a9..d61d2aca2868b7a95b4941198adcabb7c996ffb3 100644 (file)
--- 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 */