X-Git-Url: https://hackdaworld.org/gitweb/?p=physik%2Fnlsop.git;a=blobdiff_plain;f=nlsop.c;h=07313e43f3e3a39f593ed769b012df62c9a18ebd;hp=2b3a49b11def209758de15f6873479e85c0309b2;hb=30343b61fc28bccc04af479729a1529fa824a85a;hpb=d4ed8b66408122dc0d98f0861236554e21b5bbb3 diff --git a/nlsop.c b/nlsop.c index 2b3a49b..07313e4 100644 --- a/nlsop.c +++ b/nlsop.c @@ -80,6 +80,7 @@ int usage(void) puts("-P \t specify implantation profile file"); puts("-N \t specify nuclear energy loss profile file"); printf("-H \t collisions per ion in simulation window (default %d)\n",CPI); + puts("-m \t specify c->a carbon saturation"); return 1; } @@ -150,7 +151,7 @@ int distrib_c(d3_lattice *d3_l,info *my_info,int step,double c_ratio,u32 rj_m,u3 { offset=i+j*d3_l->max_x+k*d3_l->max_x*d3_l->max_y; /* case amorph: amorph <- cryst diffusion */ - if(*(d3_l->status+offset)&AMORPH) + if(*(d3_l->status+offset)&AMORPH && *(d3_l->extra+offset)c_sat) { for(c=-1;c<=1;c++) { @@ -335,7 +336,7 @@ int calc_max_extra(d3_lattice *d3_l) int write_ac_distr(d3_lattice *d3_l,int ac_distr) { int fd,x,y,z; - int count=0,offset; + int count,offset; char file[16]; if(ac_distr==1) strcpy(file,"a.plot"); @@ -350,6 +351,7 @@ int write_ac_distr(d3_lattice *d3_l,int ac_distr) for(z=0;zmax_z;z++) { + count=0; for(x=0;xmax_x;x++) { for(y=0;ymax_y;y++) @@ -828,6 +830,7 @@ int main(int argc,char **argv) my_info.dr_cc=DR_CC; my_info.diff_rate=DIFF_RATE; my_info.cpi=CPI; + my_info.c_sat=C_SAT; nowait=0; quit=0; escape=0; @@ -941,6 +944,9 @@ int main(int argc,char **argv) case 'H': my_info.cpi=atoi(argv[++i]); break; + case 'm': + my_info.c_sat=atoi(argv[++i]); + break; default: usage(); return -1;