131 lines
3.6 KiB
Diff
131 lines
3.6 KiB
Diff
*** /home/muntwiler_m/mnt/pearl_data/software/edac/edac_all.cpp 2011-04-14 23:38:44.000000000 +0200
|
|
--- edac_all.cpp 2016-02-11 12:15:45.322049772 +0100
|
|
***************
|
|
*** 10117,10122 ****
|
|
--- 10117,10123 ----
|
|
void scan_imfp(char *name);
|
|
void scan_imfp(FILE *fout);
|
|
numero iimfp_TPP(numero kr);
|
|
+ numero iimfp_SD(numero kr);
|
|
numero TPP_rho, TPP_Nv, TPP_Ep, TPP_Eg;
|
|
numero screening_length;
|
|
int scattering_so;
|
|
***************
|
|
*** 10230,10235 ****
|
|
--- 10231,10237 ----
|
|
|
|
int n_th;
|
|
int n_fi;
|
|
+ int n_ang;
|
|
numero *th, *fi;
|
|
|
|
numero *th_out,
|
|
***************
|
|
*** 10239,10244 ****
|
|
--- 10241,10247 ----
|
|
void free(void);
|
|
void init_th(numero thi, numero thf, int nth);
|
|
void init_phi(numero fii, numero fif, int nfi);
|
|
+ void read_angles(FILE *fin, char *my_file);
|
|
void init_refraction(
|
|
numero refraction);
|
|
void init_transmission(
|
|
***************
|
|
*** 12485,12490 ****
|
|
--- 12488,12494 ----
|
|
else {
|
|
kr=sqrt(sqr(calc.k[ik])+2*V0);
|
|
if(iimfp_flag==0) ki=iimfp.val(kr)/2;
|
|
+ else if(iimfp_flag==3) ki=iimfp_SD(kr)/2;
|
|
else ki=iimfp_TPP(kr)/2;
|
|
set_k(complex(kr,ki));
|
|
} } else if(calc.k_flag==2) set_k(calc.kc[ik]);
|
|
***************
|
|
*** 12507,12512 ****
|
|
--- 12511,12522 ----
|
|
numero imfp=E/(TPP_Ep*TPP_Ep*(beta*log(gamma*E)-C/E+D/(E*E)))/a0_au;
|
|
return 1/imfp;
|
|
}
|
|
+ numero propagation::iimfp_SD(numero kr)
|
|
+ {
|
|
+ numero E=sqr(kr)/2*au_eV;
|
|
+ numero imfp = (1.43e3/sqr(E) + 0.54*sqrt(E))/a0_au;
|
|
+ return 1/imfp;
|
|
+ }
|
|
void propagation::scan_imfp(char *name)
|
|
{
|
|
FILE *fout=NULL;
|
|
***************
|
|
*** 13202,13208 ****
|
|
}
|
|
final_state::final_state(void)
|
|
{
|
|
! n_th=n_fi=0;
|
|
n_1=n_2=0;
|
|
Ylm0_th_flag=Ylm0_fi_flag=0;
|
|
mesh_flag=0;
|
|
--- 13212,13218 ----
|
|
}
|
|
final_state::final_state(void)
|
|
{
|
|
! n_th=n_fi=n_ang=0;
|
|
n_1=n_2=0;
|
|
Ylm0_th_flag=Ylm0_fi_flag=0;
|
|
mesh_flag=0;
|
|
***************
|
|
*** 13233,13238 ****
|
|
--- 13243,13271 ----
|
|
if(n_fi==1) fi[0]=fii;
|
|
else for(j=0; j<n_fi; j++) fi[j]=fii+j*(fif-fii)/(n_fi-1);
|
|
} }
|
|
+ void final_state::read_angles(FILE *fin, char *my_file)
|
|
+ {
|
|
+ FILE *fang; int i, nang;
|
|
+ if(!strcmpC(my_file,"inline")) fang=fin;
|
|
+ else fang=open_file(foutput,my_file,"r");
|
|
+ nang=read_int(fang);
|
|
+ free_mesh();
|
|
+ if(nang>1) {
|
|
+ delete [] th; delete [] th_out; delete [] transmission; delete [] fi;
|
|
+ n_th=nang;
|
|
+ th=new numero [n_th];
|
|
+ th_out=new numero [n_th];
|
|
+ transmission=new numero [n_th];
|
|
+ n_fi=nang;
|
|
+ fi=new numero [n_fi];
|
|
+ for(i=0; i<nang; i++) {
|
|
+ th[i]=th_out[i]=read_numero(fang);
|
|
+ transmission[i]=1;
|
|
+ fi[i]=read_numero(fang);
|
|
+ }
|
|
+ }
|
|
+ if(strcmpC(my_file,"inline")) fclose(fang);
|
|
+ }
|
|
void final_state::init_refraction(numero refraction)
|
|
{
|
|
int i;
|
|
***************
|
|
*** 14743,14748 ****
|
|
--- 14776,14783 ----
|
|
|| scat.TPP_Ep<=0 || scat.TPP_Eg<0)
|
|
on_error(foutput,"(input) imfp TPP-2M", "wrong parameters");
|
|
scat.iimfp_flag=1;
|
|
+ } else if(!strcmpC(name,"SD-UC")) {
|
|
+ scat.iimfp_flag=3;
|
|
} else {
|
|
scat.read_imfp(fprog,name);
|
|
scat.iimfp_flag=0;
|
|
***************
|
|
*** 15162,15164 ****
|
|
--- 15197,15206 ----
|
|
fprintf(foutput,"That's all, folks!\n");
|
|
return 0;
|
|
}
|
|
+ int run_script(char *scriptfile)
|
|
+ {
|
|
+ particle_type=electrones;
|
|
+ init_fact();
|
|
+ electron.program(scriptfile);
|
|
+ return 0;
|
|
+ }
|