printf("-D <value> \t diffusion rate from cryst to amorph cells (default %f)\n",DR_AC);
printf("-c <value> \t diffusion rate in cryst cells (default %f)\n",DR_CC);
printf("-e <value> \t do diffusion every <value> steps (default %d)\n",DIFF_RATE);
+ puts("-g <file> <step> \t continue simulation from file and step (step > 0)!");
printf("-W <value> \t write every <value> steps to save file (default %d)\n",RESAVE);
puts("-C <file> \t convert file to gnuplot format");
puts("-L <file> \t load from file");
u32 x,y,z,x_c,y_c,z_c;
int i,quit,escape,switchmode,nowait,bmp;
int refresh,resave;
+ int c_step;
char s_file[MAX_CHARS];
char s_file_tmp[MAX_CHARS];
char l_file[MAX_CHARS];
quit=0;
escape=0;
switchmode=0;
+ c_step=0;
strcpy(s_file,"");
strcpy(l_file,"");
strcpy(c_file,"");
case 'P':
strcpy(p_file,argv[++i]);
break;
+ case 'g':
+ strcpy(l_file,argv[++i]);
+ if(i<argc-1) if(argv[i+1][0]!='-') c_step=atoi(argv[++i]);
+ break;
default:
usage();
return -1;
return 1;
}
#ifdef USE_DFB_API
- else d3_lattice_init(&argc,argv,&d3_l);
+ else d3_lattice_init(&argc,argv,&d3_l);
#endif
}
arg_v[25]=dr_cc_txt;
#endif
- if(!strcmp(l_file,""))
+ if((!strcmp(l_file,""))||(c_step))
{
if(get_c_ratio(&c_ratio,p_file,&my_info,&d3_l)!=1)
{
puts("failed calculating ratio");
return -1;
}
- i=0;
+ i=(c_step?c_step:0);
while((i<my_info.steps) && (quit==0) && (escape==0))
{
x_c=get_rand(d3_l.max_x);