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++)
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);
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;
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]);
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");
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;