From: hackbard Date: Wed, 6 Aug 2003 10:55:47 +0000 (+0000) Subject: dr_cc added to diffusion part X-Git-Tag: fpb~17 X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b25d90b278009fd32c8249b698fa7403783de563;p=physik%2Fnlsop.git dr_cc added to diffusion part --- diff --git a/nlsop.c b/nlsop.c index 9f0e08c..26a6e61 100644 --- a/nlsop.c +++ b/nlsop.c @@ -194,7 +194,7 @@ int distrib_c(d3_lattice *d3_l,info *my_info,int step,double c_ratio) carry=0; if(!(*(d3_l->status+off)&AMORPH)) { - carry=(*(d3_l->extra+off)-*(d3_l->extra+offset))/2; + carry=(int)(my_info->dr_cc*(*(d3_l->extra+off)-*(d3_l->extra+offset))/2); if(carry!=0) { *(d3_l->extra+offset)+=carry; @@ -211,7 +211,7 @@ int distrib_c(d3_lattice *d3_l,info *my_info,int step,double c_ratio) carry=0; if(!(*(d3_l->status+off)&AMORPH)) { - carry=(*(d3_l->extra+off)-*(d3_l->extra+offset))/2; + carry=(int)(my_info->dr_cc*(*(d3_l->extra+off)-*(d3_l->extra+offset))/2); if(carry!=0) { *(d3_l->extra+offset)+=carry; @@ -675,9 +675,9 @@ int main(int argc,char **argv) 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); - sprintf(cd_txt,"a_cd: %.2f b_cd: %.3f",my_info.a_cd,my_info.b_cd); + sprintf(ap_txt,"a_ap: %.3f b_ap: %.3f",my_info.a_ap,my_info.b_ap); + sprintf(el_txt,"a_el: %.3f b_el: %.3f",my_info.a_el,my_info.b_el); + sprintf(cd_txt,"a_cd: %.3f b_cd: %.3f",my_info.a_cd,my_info.b_cd); sprintf(cp_txt,"a_cp: %.4f",my_info.a_cp); sprintf(dr_ac_txt,"a/c diffusion rate: %.4f",my_info.dr_ac); sprintf(dr_cc_txt,"c/c diffusion rate: %.4f",my_info.dr_cc);