From: hackbard Date: Thu, 29 Sep 2005 07:11:23 +0000 (+0000) Subject: optimized defaults, added sputter condition X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65f454e2e690473128d65b9f6859e4a354a1e38a;p=physik%2Fnlsop.git optimized defaults, added sputter condition --- diff --git a/nlsop.c b/nlsop.c index b8c9e28..146c4ee 100644 --- a/nlsop.c +++ b/nlsop.c @@ -1140,7 +1140,7 @@ int main(int argc,char **argv) d3_lattice d3_l; info my_info; unsigned char mode; - //double c_ratio; + double c_ratio; #ifdef USE_DFB_API int max_extra; #endif @@ -1148,6 +1148,7 @@ int main(int argc,char **argv) u32 *n_e_loss; u32 ne_max,ip_max; u32 nel_z; + unsigned char do_sputter; d3_l.max_x=_X; d3_l.max_y=_Y; @@ -1182,6 +1183,7 @@ int main(int argc,char **argv) sai=0; sacl=0; eacl=0; + do_sputter=1; #ifdef MORE_PRINTF printf("reading argv ..."); @@ -1407,16 +1409,14 @@ int main(int argc,char **argv) if(c_profile[d3_l.max_z-1]!=0) { printf("max_z (%d) too small - sputtering not possible\n",d3_l.max_z); - #ifndef DEBUG_RAND - return -1; - #endif + do_sputter=0; } /* calculate ratio of c_simwindow / c_total */ - //if(get_c_ratio(&c_ratio,p_file,&my_info,&d3_l)!=1) - //{ - // puts("failed calculating ratio"); - // return -1; - //} + if(!do_sputter) + { + get_c_ratio(&c_ratio,p_file,&my_info,&d3_l); + printf("calculated c ratio: %f\n",c_ratio); + } /* sputtering realy possible ?*/ if(n_e_loss[d3_l.max_z-1]!=0) @@ -1487,7 +1487,7 @@ int main(int argc,char **argv) #endif } i++; - if(i%my_info.s_rate==0) sputter(&d3_l); + if((do_sputter)&(i%my_info.s_rate==0)) sputter(&d3_l); } } diff --git a/nlsop.h b/nlsop.h index b18b966..dc4b954 100644 --- a/nlsop.h +++ b/nlsop.h @@ -32,7 +32,7 @@ typedef struct __info #define CC 0 -#define DR_AC .005 +#define DR_AC .05 #define DIFF_RATE 1000000 #define S_D .0001