From b25d90b278009fd32c8249b698fa7403783de563 Mon Sep 17 00:00:00 2001 From: hackbard Date: Wed, 6 Aug 2003 10:55:47 +0000 Subject: [PATCH] dr_cc added to diffusion part --- nlsop.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); -- 2.39.2