From: hackbard Date: Mon, 21 Jul 2003 14:57:29 +0000 (+0000) Subject: fixed dose display X-Git-Tag: fpb~20 X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99e88e953032564c9b4fb80bf23f5acf29515a7f;p=physik%2Fnlsop.git fixed dose display --- diff --git a/nlsop.c b/nlsop.c index 3dafd1b..712702b 100644 --- a/nlsop.c +++ b/nlsop.c @@ -404,6 +404,7 @@ int get_c_ratio(double *c_ratio,char *pfile,info *my_info,d3_lattice *d3_l) } } *c_ratio=d/all; + close(p_fd); return 1; } @@ -437,6 +438,7 @@ int main(int argc,char **argv) char diff_txt[MAX_TXT]; char dr_ac_txt[MAX_TXT]; char dr_cc_txt[MAX_TXT]; + char dose_txt[MAX_TXT]; char mode_txt[MAX_TXT]; char *arg_v[MAX_ARGV]; #endif @@ -625,6 +627,7 @@ int main(int argc,char **argv) #ifdef USE_DFB_API strcpy(a_txt,"args:"); 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(ap_txt,"a_ap: %.2f b_ap: %.3f",my_info.a_ap,my_info.b_ap); sprintf(el_txt,"a_el: %.2f b_el: %.3f",my_info.a_el,my_info.b_el); @@ -649,10 +652,10 @@ int main(int argc,char **argv) arg_v[12]=zdiff_txt; arg_v[13]=NULL; arg_v[14]=a_txt; - arg_v[15]=NULL; - arg_v[16]=s_txt; - arg_v[17]=r_txt; - arg_v[18]=NULL; + arg_v[15]=s_txt; + arg_v[16]=dose_txt; + arg_v[17]=NULL; + arg_v[18]=r_txt; arg_v[19]=ap_txt; arg_v[20]=el_txt; arg_v[21]=cd_txt;