From: hackbard Date: Thu, 22 Jul 2004 10:41:49 +0000 (+0000) Subject: changed layout of info box X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9160d1de6debb4b30ea196f6c05287eca7cc0366;p=physik%2Fnlsop.git changed layout of info box --- diff --git a/nlsop.c b/nlsop.c index 2945c14..26ba461 100644 --- a/nlsop.c +++ b/nlsop.c @@ -132,10 +132,7 @@ int distrib_c(d3_lattice *d3_l,info *my_info,int step,double c_ratio,u32 rj_m,u3 { x=get_rand(d3_l->max_x); y=get_rand(d3_l->max_y); - // printf("nd: %d %d\n",x,y); - // z=get_rand_lgp(d3_l->max_z,my_info->a_cd,my_info->b_cd); z=get_rand_reject(d3_l->max_z,rj_m,rj_g); - // printf("%d\n",z); *(d3_l->extra+x+y*d3_l->max_x+z*d3_l->max_x*d3_l->max_y)+=1; (my_info->cc)++; } @@ -840,8 +837,10 @@ u32 get_reject_graph(info *my_info,d3_lattice *d3_l,char *file,u32 *graph) { free(flag); - // printf("debug: (interpolated c profile)\n"); - // for(i=0;imax_z;i++) printf("%d %d\n",i,graph[i]); +#ifdef DEBUG_INTERPOL_PROFILE + printf("debug: (interpolated c profile)\n"); + for(i=0;imax_z;i++) printf("%d %d\n",i,graph[i]); +#endif return max; } @@ -879,6 +878,8 @@ int main(int argc,char **argv) char dr_cc_txt[MAX_TXT]; char dose_txt[MAX_TXT]; char mode_txt[MAX_TXT]; + char hpi_txt[MAX_TXT]; + char csat_txt[MAX_TXT]; char *arg_v[MAX_ARGV]; #endif d3_lattice d3_l; @@ -1105,31 +1106,33 @@ int main(int argc,char **argv) sprintf(zdiff_txt,"diffusion in z direction: %c",my_info.z_diff?'y':'n'); sprintf(diff_txt,"diffusion every %d steps",my_info.diff_rate); strcpy(mode_txt,"view: a/c mode"); - arg_v[1]=xyz_txt; - arg_v[2]=NULL; + sprintf(hpi_txt,"hits per ion: %d",my_info.cpi); + sprintf(csat_txt,"carbon saturation: %d",my_info.c_sat); + arg_v[1]=mode_txt; + arg_v[2]=xyz_txt; arg_v[3]=status_txt; arg_v[4]=conc_txt; arg_v[5]=NULL; - arg_v[6]=mode_txt; - arg_v[7]=NULL; - arg_v[8]=steps_txt; - arg_v[9]=cc_txt; - arg_v[10]=NULL; - arg_v[11]=diff_txt; - arg_v[12]=zdiff_txt; - arg_v[13]=NULL; - arg_v[14]=a_txt; - 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; - arg_v[22]=cp_txt; + arg_v[6]=steps_txt; + arg_v[7]=cc_txt; + arg_v[8]=NULL; + arg_v[9]=a_txt; + arg_v[10]=s_txt; + arg_v[11]=dose_txt; + arg_v[12]=diff_txt; + arg_v[13]=zdiff_txt; + arg_v[14]=r_txt; + arg_v[15]=ap_txt; + arg_v[16]=el_txt; + arg_v[17]=cd_txt; + arg_v[18]=cp_txt; + arg_v[19]=dr_ac_txt; + arg_v[20]=dr_cc_txt; + arg_v[21]=hpi_txt; + arg_v[22]=csat_txt; arg_v[23]=NULL; - arg_v[24]=dr_ac_txt; - arg_v[25]=dr_cc_txt; + arg_v[24]=NULL; + arg_v[25]=NULL; #endif if((!strcmp(l_file,""))||(c_step)) @@ -1162,6 +1165,9 @@ int main(int argc,char **argv) #endif #ifdef DEBUG_NEL printf("%d\n",get_rand_reject(d3_l.max_z,ne_max,n_e_loss)); +#endif +#ifdef DEBUG_NORM + printf("%d\n",get_rand(d3_l.max_z)); #endif } #endif @@ -1173,7 +1179,6 @@ int main(int argc,char **argv) { x_c=get_rand(d3_l.max_x); y_c=get_rand(d3_l.max_y); - // z_c=get_rand_lgp(d3_l.max_z,my_info.a_el,my_info.b_el); z_c=get_rand_reject(d3_l.max_z,ne_max,n_e_loss); process_cell(&d3_l,x_c,y_c,z_c,&my_info); }