]> hackdaworld.org Git - physik/nlsop.git/commitdiff
changed variable names
authorhackbard <hackbard>
Thu, 30 Sep 2004 17:19:40 +0000 (17:19 +0000)
committerhackbard <hackbard>
Thu, 30 Sep 2004 17:19:40 +0000 (17:19 +0000)
nlsop.c
nlsop.h

diff --git a/nlsop.c b/nlsop.c
index 350868e536751af130b839c9f4f87f9140c24b81..de46dc06322234a654992fa7fcbc7dfc292f8b4b 100644 (file)
--- a/nlsop.c
+++ b/nlsop.c
@@ -91,7 +91,7 @@ int process_cell(d3_lattice *d3_l,u32 x,u32 y,u32 z,info *my_info,u32 nel_z)
 
  thiz=d3_l->status+x+y*d3_l->max_x+z*d3_l->max_x*d3_l->max_y;
  conc=d3_l->extra+x+y*d3_l->max_x+z*d3_l->max_x*d3_l->max_y;
- p=my_info->b_ap*nel_z;
+ p=my_info->b*nel_z;
  for(i=-(my_info->range);i<=my_info->range;i++)
  {
   for(j=-(my_info->range);j<=my_info->range;j++)
@@ -99,11 +99,11 @@ int process_cell(d3_lattice *d3_l,u32 x,u32 y,u32 z,info *my_info,u32 nel_z)
    if(!(i==0 && j==0))
    {
     off=((x+d3_l->max_x+i)%d3_l->max_x)+((y+d3_l->max_y+j)%d3_l->max_x)*d3_l->max_x+z*d3_l->max_x*d3_l->max_y;
-    if(*(d3_l->status+off)&AMORPH) p+=my_info->a_ap*(*(d3_l->extra+off))*URAND_MAX/(i*i+j*j);
+    if(*(d3_l->status+off)&AMORPH) p+=my_info->s*(*(d3_l->extra+off))*URAND_MAX/(i*i+j*j);
    } 
   }
  }
- p+=*conc*my_info->a_cp*URAND_MAX;
+ p+=*conc*my_info->c*URAND_MAX;
  if(!(*thiz&AMORPH))
  {
   if(get_rand(URAND_MAX)<=p) MAKE_AMORPH(thiz);
@@ -1145,9 +1145,9 @@ int main(int argc,char **argv)
  resave=RESAVE;
  my_info.z_diff=0;
  my_info.c_diff=1;
- my_info.a_ap=A_AP;
- my_info.b_ap=B_AP;
- my_info.a_cp=A_CP;
+ my_info.s=A_AP;
+ my_info.b=B_AP;
+ my_info.c=A_CP;
  my_info.cc=CC;
  my_info.dr_ac=DR_AC;
  my_info.dr_cc=DR_CC;
@@ -1208,13 +1208,13 @@ int main(int argc,char **argv)
      my_info.range=atoi(argv[++i]);
      break;
     case 'f':
-     my_info.a_ap=atof(argv[++i]);
+     my_info.s=atof(argv[++i]);
      break;
     case 'p':
-     my_info.b_ap=atof(argv[++i]);
+     my_info.b=atof(argv[++i]);
      break;
     case 'F':
-     my_info.a_cp=atof(argv[++i]);
+     my_info.c=atof(argv[++i]);
      break;
     case 'W':
      resave=atoi(argv[++i]);
@@ -1323,9 +1323,9 @@ int main(int argc,char **argv)
  sprintf(s_txt,"steps: %d",my_info.steps);
  sprintf(dose_txt,"dose: %.2fe+17 C/cm²",my_info.steps*1.0/(d3_l.max_x*d3_l.max_y*CELL_LENGTH*CELL_LENGTH*1000));
  sprintf(r_txt,"pressure range: %d",my_info.range);
- sprintf(stress_txt,"stress term: %f",my_info.a_ap);
- sprintf(ballistic_txt,"ballistic term: %f",my_info.b_ap);
- sprintf(carbon_txt,"carbon term: %f",my_info.a_cp);
+ sprintf(stress_txt,"stress term: %f",my_info.s);
+ sprintf(ballistic_txt,"ballistic term: %f",my_info.b);
+ sprintf(carbon_txt,"carbon term: %f",my_info.c);
  sprintf(dr_ac_txt,"a/c diffusion rate: %f",my_info.dr_ac);
  if(my_info.c_diff!=0) sprintf(dr_cc_txt,"c/c diffusion rate: %f",my_info.dr_cc);
  else sprintf(dr_cc_txt,"c/c diffusion rate: none");
diff --git a/nlsop.h b/nlsop.h
index 3440c0c65fd4025ade9a865780264b087e7f1ce0..0bc900924a1275d5eb522ffe354cafb7f2c1e5a2 100644 (file)
--- a/nlsop.h
+++ b/nlsop.h
@@ -16,7 +16,7 @@ typedef unsigned int u32;
 typedef struct __info
 {
  int cc,steps,range,diff_rate,cpi,c_sat;
- double a_ap,b_ap,a_cp,dr_ac,dr_cc;
+ double s,b,c,dr_ac,dr_cc;
  char z_diff,c_diff;
 } info;