From 27d07bd7fc4b8166dfcfc6177101b778e6b1048c Mon Sep 17 00:00:00 2001 From: hackbard Date: Mon, 20 Oct 2003 11:48:17 +0000 Subject: [PATCH] added -g (continue from file at certain step feature) good for power interrupts ;) --- nlsop.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/nlsop.c b/nlsop.c index edbc860..5b160bc 100644 --- a/nlsop.c +++ b/nlsop.c @@ -55,6 +55,7 @@ int usage(void) printf("-D \t diffusion rate from cryst to amorph cells (default %f)\n",DR_AC); printf("-c \t diffusion rate in cryst cells (default %f)\n",DR_CC); printf("-e \t do diffusion every steps (default %d)\n",DIFF_RATE); + puts("-g \t continue simulation from file and step (step > 0)!"); printf("-W \t write every steps to save file (default %d)\n",RESAVE); puts("-C \t convert file to gnuplot format"); puts("-L \t load from file"); @@ -612,6 +613,7 @@ int main(int argc,char **argv) 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]; @@ -671,6 +673,7 @@ int main(int argc,char **argv) quit=0; escape=0; switchmode=0; + c_step=0; strcpy(s_file,""); strcpy(l_file,""); strcpy(c_file,""); @@ -765,6 +768,10 @@ int main(int argc,char **argv) case 'P': strcpy(p_file,argv[++i]); break; + case 'g': + strcpy(l_file,argv[++i]); + if(i