optimized defaults, added sputter condition
authorhackbard <hackbard>
Thu, 29 Sep 2005 07:11:23 +0000 (07:11 +0000)
committerhackbard <hackbard>
Thu, 29 Sep 2005 07:11:23 +0000 (07:11 +0000)
nlsop.c
nlsop.h

diff --git a/nlsop.c b/nlsop.c
index b8c9e28..146c4ee 100644 (file)
--- 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;
  d3_lattice d3_l;
  info my_info;
  unsigned char mode;
//double c_ratio;
+ double c_ratio;
 #ifdef USE_DFB_API
  int max_extra;
 #endif
 #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;
  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;
 
  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;
  sai=0;
  sacl=0;
  eacl=0;
+ do_sputter=1;
 
 #ifdef MORE_PRINTF
  printf("reading argv ...");
 
 #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);
   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 */
   }
   /* 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)
 
   /* 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++;
 #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 (file)
--- a/nlsop.h
+++ b/nlsop.h
@@ -32,7 +32,7 @@ typedef struct __info
 
 #define CC 0
 
 
 #define CC 0
 
-#define DR_AC .005
+#define DR_AC .05
 #define DIFF_RATE 1000000
 
 #define S_D .0001
 #define DIFF_RATE 1000000
 
 #define S_D .0001