From ce4e91a47ee03976faace750dc62b6ac00e6f301 Mon Sep 17 00:00:00 2001 From: hackbard Date: Tue, 10 Jun 2003 00:24:44 +0000 Subject: [PATCH] NODFB mode completed --- nlsop.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/nlsop.c b/nlsop.c index f548b54..9f25c7a 100644 --- a/nlsop.c +++ b/nlsop.c @@ -567,6 +567,7 @@ int main(int argc,char **argv) d3_event_init(&d3_l); #endif +#ifdef USE_DFB_API strcpy(a_txt,"args:"); sprintf(s_txt,"steps: %d",my_info.steps); sprintf(r_txt,"pressure range: %d",my_info.range); @@ -601,6 +602,7 @@ int main(int argc,char **argv) arg_v[22]=cd_txt; arg_v[23]=cd2_txt; arg_v[24]=dr_txt; +#endif if(!strcmp(l_file,"")) { @@ -612,6 +614,7 @@ int main(int argc,char **argv) z_c=get_rand_lgp(d3_l.max_z,my_info.a_el,my_info.b_el); distrib_c(&d3_l,my_info.d_r,my_info.a_cd,my_info.b_cd); process_cell(&d3_l,x_c,y_c,z_c,my_info.range,my_info.a_ap,my_info.b_ap,&(my_info.cc)); +#ifdef USE_DFB_API if(i%refresh==0) { sprintf(x_txt,"x: %d",x+1); @@ -621,22 +624,28 @@ int main(int argc,char **argv) sprintf(conc_txt,"conc: %d",*(d3_l.extra+x+y*d3_l.max_x+z*d3_l.max_x*d3_l.max_y)); sprintf(steps_txt,"step: %d",i); sprintf(cc_txt,"total c: %d",my_info.cc); -#ifdef USE_DFB_API d3_lattice_draw(&d3_l,x,y,z,24,arg_v); -#endif - // scan_event(&d3_l,&x,&y,&z,&quit,&escape); } +#endif if(i%resave==0 && strcmp(s_file,"") && resave!=0) { sprintf(s_file_tmp,"%s_%d_of_%d",s_file,i,my_info.steps); save_to_file(s_file_tmp,&d3_l,&my_info); +#ifdef NODFB + printf("saved %s\n",s_file_tmp); +#endif } i++; } } - if(strcmp(s_file,"")) save_to_file(s_file,&d3_l,&my_info); + if(strcmp(s_file,"")) + { + printf("saved %s\n",s_file); + save_to_file(s_file,&d3_l,&my_info); + } +#ifdef USE_DFB_API while((quit==0) && (escape==0) && (nowait==0)) { sprintf(x_txt,"x: %d",x+1); @@ -646,13 +655,10 @@ int main(int argc,char **argv) sprintf(conc_txt,"conc: %d",*(d3_l.extra+x+y*d3_l.max_x+z*d3_l.max_x*d3_l.max_y)); strcpy(steps_txt,"step: end!"); sprintf(cc_txt,"total c: %d",my_info.cc); -#ifdef USE_DFB_API d3_lattice_draw(&d3_l,x,y,z,24,arg_v); scan_event(&d3_l,&x,&y,&z,&quit,&escape); -#endif } -#ifdef USE_DFB_API d3_lattice_release(&d3_l); #endif -- 2.39.2