added nuclear energy loss profile + new random calculation according to nel. default...
authorhackbard <hackbard>
Wed, 23 Jun 2004 09:48:23 +0000 (09:48 +0000)
committerhackbard <hackbard>
Wed, 23 Jun 2004 09:48:23 +0000 (09:48 +0000)
nel-profile.txt [new file with mode: 0644]
nlsop.c
nlsop.h
runs.txt

diff --git a/nel-profile.txt b/nel-profile.txt
new file mode 100644 (file)
index 0000000..caf8dd3
--- /dev/null
@@ -0,0 +1,100 @@
+800100,E-04    3216,79E-03
+160010,E-03    3075,05E-03
+240010,E-03    3143,18E-03
+320010,E-03    3219,79E-03
+400010,E-03    3376,13E-03
+480010,E-03    3372,10E-03
+560010,E-03    3355,78E-03
+640010,E-03    3464,64E-03
+720010,E-03    3500,30E-03
+800010,E-03    3682,39E-03
+880010,E-03    3613,67E-03
+960010,E-03    3767,24E-03
+104001,E-02    3782,77E-03
+112001,E-02    3712,38E-03
+120001,E-02    3898,09E-03
+128001,E-02    4098,88E-03
+136001,E-02    4024,27E-03
+144001,E-02    4236,01E-03
+152001,E-02    4271,16E-03
+160001,E-02    4350,11E-03
+168001,E-02    4445,08E-03
+176001,E-02    4541,91E-03
+184001,E-02    4743,65E-03
+192001,E-02    4793,74E-03
+200001,E-02    4858,77E-03
+208001,E-02    5082,54E-03
+216001,E-02    5132,66E-03
+224001,E-02    5264,37E-03
+232001,E-02    5168,46E-03
+240001,E-02    5353,25E-03
+248001,E-02    5545,37E-03
+256001,E-02    5933,99E-03
+264001,E-02    6036,05E-03
+272001,E-02    6070,48E-03
+280001,E-02    6344,41E-03
+288001,E-02    6544,72E-03
+296001,E-02    6824,88E-03
+304001,E-02    6935,89E-03
+312001,E-02    6929,64E-03
+320001,E-02    7110,25E-03
+328001,E-02    7174,12E-03
+336001,E-02    7435,69E-03
+344001,E-02    7778,75E-03
+352001,E-02    8014,75E-03
+360001,E-02    8066,68E-03
+368001,E-02    8316,20E-03
+376001,E-02    8465,42E-03
+384001,E-02    8595,79E-03
+392001,E-02    8806,10E-03
+400001,E-02    8891,96E-03
+408001,E-02    8915,27E-03
+416001,E-02    9092,26E-03
+424001,E-02    8958,24E-03
+432001,E-02    8918,95E-03
+440001,E-02    8811,51E-03
+448001,E-02    8707,25E-03
+456001,E-02    8732,42E-03
+464001,E-02    8491,13E-03
+472001,E-02    8208,35E-03
+480001,E-02    7891,68E-03
+488001,E-02    7435,04E-03
+496001,E-02    7195,51E-03
+504001,E-02    6656,11E-03
+512001,E-02    6131,67E-03
+520001,E-02    5561,24E-03
+528001,E-02    5154,09E-03
+536001,E-02    4589,91E-03
+544001,E-02    4025,89E-03
+552001,E-02    3515,17E-03
+560001,E-02    3063,79E-03
+568001,E-02    2616,11E-03
+576001,E-02    2172,26E-03
+584001,E-02    1758,54E-03
+592001,E-02    1439,73E-03
+600001,E-02    1135,96E-03
+608001,E-02    8795,44E-04
+616001,E-02    6934,24E-04
+624001,E-02    5123,25E-04
+632001,E-02    3924,54E-04
+640001,E-02    2757,85E-04
+648001,E-02    2022,33E-04
+656001,E-02    1394,18E-04
+664001,E-02    9877,09E-05
+672001,E-02    6246,92E-05
+680001,E-02    4447,48E-05
+688001,E-02    2404,19E-05
+696001,E-02    2221,25E-05
+704001,E-02    1360,45E-05
+712001,E-02    8023,02E-06
+720001,E-02    5441,88E-06
+728001,E-02    4821,42E-06
+736001,E-02    1955,61E-06
+744001,E-02    1111,77E-06
+752001,E-02    1880,49E-07
+760001,E-02    2346,72E-07
+768001,E-02    1273,80E-07
+776001,E-02    0000,00E+00
+784001,E-02    0000,00E+00
+792001,E-02    0000,00E+00
+800001,E-02    0000,00E+00
diff --git a/nlsop.c b/nlsop.c
index 9f1a6de..da983b3 100644 (file)
--- a/nlsop.c
+++ b/nlsop.c
@@ -78,6 +78,7 @@ int usage(void)
  puts("-S <file> \t save to file");
  puts("-R <file> \t read from random file");
  puts("-P <file> \t specify implantation profile file");
+ puts("-N <file> \t specify nuclear energy loss profile file");
  printf("-H <value> \t collisions per ion in simulation window (default %d)\n",CPI);
  
  return 1;
@@ -771,6 +772,7 @@ int main(int argc,char **argv)
  char l_file[MAX_CHARS];
  char c_file[MAX_CHARS];
  char p_file[MAX_CHARS];
+ char n_e_file[MAX_CHARS];
  char convert;
  char r_file[MAX_CHARS];
 #ifdef USE_DFB_API
@@ -835,6 +837,7 @@ int main(int argc,char **argv)
  strcpy(l_file,"");
  strcpy(c_file,"");
  strcpy(p_file,IMP_PROFILE);
+ strcpy(n_e_file,NEL_PROFILE);
  convert=0;
  strcpy(r_file,"");
  mode=0;
@@ -928,6 +931,9 @@ int main(int argc,char **argv)
     case 'P':
      strcpy(p_file,argv[++i]);
      break;
+    case 'N':
+     strcpy(n_e_file,argv[++i]);
+     break;
     case 'g':
      strcpy(l_file,argv[++i]);
      if(i<argc-1) if(argv[i+1][0]!='-') c_step=atoi(argv[++i]);
@@ -1057,11 +1063,17 @@ int main(int argc,char **argv)
    return -1;
   }
   ip_max=get_reject_graph(&my_info,&d3_l,p_file,c_profile);
+  ne_max=get_reject_graph(&my_info,&d3_l,n_e_file,n_e_loss);
 
 #ifdef DEBUG_RAND
  while(1)
  {
+#ifdef DEBUG_CP
   printf("%d\n",get_rand_reject(d3_l.max_z,ip_max,c_profile));
+#endif
+#ifdef DEBUG_NEL
+  printf("%d\n",get_rand_reject(d3_l.max_z,ne_max,n_e_loss));
+#endif
  }
 #endif
 
@@ -1072,8 +1084,8 @@ 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);
-    // printf("%d\n",z_c);
+    // 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);
    }
    distrib_c(&d3_l,&my_info,i,c_ratio,ip_max,c_profile);
diff --git a/nlsop.h b/nlsop.h
index 10d2a43..8b4b63a 100644 (file)
--- a/nlsop.h
+++ b/nlsop.h
@@ -24,7 +24,7 @@ typedef struct __info
 
 #define X 64
 #define Y 64
-#define Z 100
+#define Z 233
 
 #define STEPS 100000000
 #define RANGE 5
@@ -50,6 +50,8 @@ typedef struct __info
 #define MAX_ARGV 27
 
 #define IMP_PROFILE "imp-profile.txt"
+#define NEL_PROFILE "nel-profile.txt"
+
 #define CELL_LENGTH 3 /* nm */
 
 #define CPI 20
index 4bccf4a..de11be8 100644 (file)
--- a/runs.txt
+++ b/runs.txt
@@ -2,3 +2,10 @@
 -----------
 
 ./nlsop -S data_17_06_2004/default_z233.save -z 233 -n -i -Z
+
+./nlsop -S data_17_06_2004/default_z233_e100000.save -z 233 -e 100000 -n -i -Z
+
+./nlsop -S data_17_06_2004/default_D0.2_z233_e100000.save -z 233 -D 0.2 -e 100000 -n -i -Z
+
+./nlsop -S data_23_06_2004/default.save -n -i -Z     #### new default z=233 ####
+