51 integer,
parameter ::
n_e0 = 38
55 real(kind=ESPUTR_DP),
dimension(N_E0),
parameter ::
e0 = (/ (
i_,
i_=0,200,10),(
i_,
i_=300,900,100),(
i_,
i_=1000,10000,1000) /)
57 character(10),
dimension(3, N_COMBINATIONS),
parameter ::
combinations = reshape (&
59 "D ",
"Be ",
"Beryllium ", &
60 "T ",
"Be ",
"Beryllium ", &
61 "D ",
"Fe ",
"Iron ", &
62 "T ",
"Fe ",
"Iron ", &
63 "D ",
"Mo ",
"Molybdenum", &
64 "T ",
"Mo ",
"Molybdenum", &
65 "D ",
"W ",
"Tungsten ", &
66 "T ",
"W ",
"Tungsten " &
70 real(kind=ESPUTR_DP),
dimension(N_E0, N_COMBINATIONS),
parameter ::
expected2001 = reshape (&
73 0.000000000e+00, 3.517315511e-06, 2.784769387e-03, 1.167176911e-02, 2.174908020e-02, &
74 2.902745247e-02, 3.348122594e-02, 3.609674400e-02, 3.762438536e-02, 3.850689496e-02, &
75 3.899485826e-02, 3.923256282e-02, 3.930602035e-02, 3.926849578e-02, 3.915420134e-02, &
76 3.898585217e-02, 3.877897881e-02, 3.854447478e-02, 3.829015189e-02, 3.802171932e-02, &
77 3.774341740e-02, 3.485880922e-02, 3.224377567e-02, 2.999997837e-02, 2.807864040e-02, &
78 2.642054938e-02, 2.497583199e-02, 2.370519061e-02, 2.257802451e-02, 1.569601667e-02, &
79 1.231223625e-02, 1.024762756e-02, 8.837389011e-03, 7.804281917e-03, 7.010352244e-03, &
80 6.378575769e-03, 5.862291863e-03, 5.431454448e-03, &
82 0.000000000e+00, 1.580435292e-05, 2.852500540e-03, 1.011495035e-02, 1.933632321e-02, &
83 2.787885884e-02, 3.462810870e-02, 3.957349789e-02, 4.308016264e-02, 4.553196702e-02, &
84 4.723158029e-02, 4.839660982e-02, 4.917888101e-02, 4.968387131e-02, 4.998539201e-02, &
85 5.013573645e-02, 5.017248698e-02, 5.012305314e-02, 5.000771257e-02, 4.984166982e-02, &
86 4.963646831e-02, 4.669012511e-02, 4.355490822e-02, 4.073809575e-02, 3.827303946e-02, &
87 3.611787579e-02, 3.422330378e-02, 3.254600972e-02, 3.105042704e-02, 2.179001573e-02, &
88 1.716786416e-02, 1.432772094e-02, 1.237930677e-02, 1.094761704e-02, 9.844882790e-03, &
89 8.965805968e-03, 8.246386677e-03, 7.645305840e-03, &
91 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, &
92 5.100112103e-04, 1.580374898e-03, 3.048681993e-03, 4.802776536e-03, 6.730775099e-03, &
93 8.732937593e-03, 1.072966503e-02, 1.266357317e-02, 1.449747440e-02, 1.621044766e-02, &
94 1.779355957e-02, 1.924607465e-02, 2.057246175e-02, 2.178020349e-02, 2.287828420e-02, &
95 2.387619842e-02, 3.010666093e-02, 3.285989703e-02, 3.423599482e-02, 3.495546787e-02, &
96 3.531556539e-02, 3.545963241e-02, 3.546527637e-02, 3.537826289e-02, 3.285087530e-02, &
97 3.004954688e-02, 2.764256700e-02, 2.561826456e-02, 2.390488458e-02, 2.243808759e-02, &
98 2.116778111e-02, 2.005591807e-02, 1.907351427e-02, &
100 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 4.030583889e-05, 1.206100604e-03, &
101 3.339086754e-03, 6.201780630e-03, 9.545002187e-03, 1.312860844e-02, 1.675507742e-02, &
102 2.028213798e-02, 2.361965885e-02, 2.671911408e-02, 2.956161820e-02, 3.214754907e-02, &
103 3.448870262e-02, 3.660286430e-02, 3.851029752e-02, 4.023160837e-02, 4.178653569e-02, &
104 4.319333400e-02, 5.196015755e-02, 5.591999659e-02, 5.795086136e-02, 5.903358165e-02, &
105 5.958253822e-02, 5.980301530e-02, 5.980890673e-02, 5.966880322e-02, 5.556524319e-02, &
106 5.095034766e-02, 4.695330807e-02, 4.357481794e-02, 4.070511218e-02, 3.824184196e-02, &
107 3.610405635e-02, 3.422970473e-02, 3.257122255e-02, &
109 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, &
110 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, &
111 3.764200472e-06, 5.671733972e-05, 1.535095689e-04, 2.899499471e-04, 4.639264579e-04, &
112 6.731062010e-04, 9.145875173e-04, 1.184908048e-03, 1.480169221e-03, 1.796202192e-03, &
113 2.128740151e-03, 5.586945212e-03, 8.143701414e-03, 9.724548975e-03, 1.070060098e-02, &
114 1.132629886e-02, 1.174256898e-02, 1.202710596e-02, 1.222455063e-02, 1.250755077e-02, &
115 1.203880448e-02, 1.147754165e-02, 1.093174817e-02, 1.042626758e-02, 9.964900289e-03, &
116 9.545251066e-03, 9.163228355e-03, 8.814552903e-03, &
118 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, &
119 0.000000000e+00, 0.000000000e+00, 7.457209864e-06, 9.347281503e-05, 2.603873988e-04, &
120 5.080951344e-04, 8.368249243e-04, 1.244684607e-03, 1.727395430e-03, 2.278518905e-03, &
121 2.889891433e-03, 3.552152515e-03, 4.255292454e-03, 4.989164748e-03, 5.743925250e-03, &
122 6.510376587e-03, 1.350334871e-02, 1.805931524e-02, 2.075911820e-02, 2.241112917e-02, &
123 2.347277421e-02, 2.418274363e-02, 2.467008950e-02, 2.500873141e-02, 2.542150891e-02, &
124 2.446126804e-02, 2.332673035e-02, 2.222459659e-02, 2.120341922e-02, 2.027073793e-02, &
125 1.942183560e-02, 1.864858809e-02, 1.794246619e-02, &
127 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, &
128 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, &
129 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, &
130 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, &
131 0.000000000e+00, 1.674048481e-04, 7.083969098e-04, 1.466363038e-03, 2.287401706e-03, &
132 3.062518277e-03, 3.740490999e-03, 4.309932970e-03, 4.779033480e-03, 6.655863423e-03, &
133 6.984090248e-03, 6.997561625e-03, 6.908640396e-03, 6.779674552e-03, 6.634937646e-03, &
134 6.485423360e-03, 6.336530438e-03, 6.191000809e-03, &
136 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, &
137 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, &
138 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, 0.000000000e+00, &
139 0.000000000e+00, 8.705827047e-06, 4.259283291e-05, 9.613860211e-05, 1.681050765e-04, &
140 2.580041112e-04, 2.020298542e-03, 4.658360328e-03, 7.210635189e-03, 9.268944194e-03, &
141 1.082291151e-02, 1.198094226e-02, 1.285167311e-02, 1.351735066e-02, 1.592019769e-02, &
142 1.626619939e-02, 1.616626938e-02, 1.590805439e-02, 1.558613799e-02, 1.524037746e-02, &
147 character(10),
dimension(2, N_COMBINATIONS_THETA),
parameter ::
combinations_th = reshape (&
163 real(kind=ESPUTR_DP),
dimension(N_COMBINATIONS_THETA) ::
etheta=(/ &
178 real(kind=ESPUTR_DP),
dimension(N_COMBINATIONS_THETA) ::
thetamax=(/ &
193 real(kind=ESPUTR_DP),
dimension(N_COMBINATIONS_THETA) ::
ythetamax=(/ &
212 integer,
dimension(4) :: err
213 call esputr2001_init(
"/__FOO_test_wrong_file_2001",
"../data/ECKSTEIN2007TH", err(1))
215 call esputr2001_init(
"ECKSTEIN2007N",
"/__FOO_test_wrong_file_2001~2", err(3))
218 print *,
"test_wrong_file:", err
224 integer,
dimension(8) :: err
225 real(kind=ESPUTR_DP) :: crap
234 print *,
"test_wrong_ids:", err
240 integer,
dimension(7) :: err
248 print *,
"test_double_init:", err
254 integer,
dimension(4) :: err
255 integer :: icrap,icrap2
256 real(kind=ESPUTR_DP) :: rcrap
261 print *,
"test_call_uninitialized:", err
267 integer,
dimension(4) :: err
273 print *,
"test_unknown_elements:", err
279 integer,
dimension(4) :: err
281 real(kind=ESPUTR_DP) :: crap
286 print *,
"test_negative_energy:", err
292 integer,
dimension(6) :: err
294 real(kind=ESPUTR_DP) :: crap
301 print *,
"test_wrong_angle", err
307 logical,
dimension(N_COMBINATIONS) :: results
311 if(err /= 0)
goto 2000
316 print *,
"test_2001: ", results
320 if(err /= 0)
goto 2000
324 2000 print *,
"FAILURE in esputr2001_test_N: unexpected err value", err
333 logical function test_2001(expected, proj, targ)
334 real(kind=ESPUTR_DP),
dimension(N_E0),
intent(in) :: expected
335 character(*),
intent(in) :: proj, targ
336 integer :: projTargId, err
337 real(kind=ESPUTR_DP),
dimension(N_E0) :: Y
338 logical,
dimension(N_E0) :: passed
342 if(err /= 0)
goto 2000
345 if(err /= 0)
goto 2000
350 test_2001 = all(passed)
353 2000 print *,
"FAILURE in esputr2001_test_N: unexpected err value", err
356 end function test_2001
367 integer :: j, projTargId1, projTargId2, err
368 real(kind=ESPUTR_DP) :: Y
371 if(err /= 0)
goto 3000
374 ,projtargid1, projtargid2, err)
375 if(err /= 0)
goto 3000
377 if(err /= 0)
goto 3000
379 print *,
"FAILURE in esputr2001_test_theta: expected 1, got", y
384 if(err /= 0)
goto 3000
386 print *,
"FAILURE in esputr2001_test_theta: expected ",
ythetamax(j),
" got", y
393 if(err /= 0)
goto 3000
395 print *,
"test_2001_theta: ", .true.
399 3000 print *,
"FAILURE in esputr2001_test_theta: unexpected err value", err
407 integer :: err, projTarg_id
408 real(kind=ESPUTR_DP) :: Eth
411 if(err /= 0)
goto 6100
413 if(err /= 0)
goto 6100
415 if(err /= 0)
goto 6100
419 print *,
"FAILURE in esputr2001_test_ETH: ", eth
422 if(err /= 0)
goto 6100
424 6100 print *,
"FAILURE in esputr2001_test_ETH: unexpected err value", err
431 logical :: initialized
434 if(err == 0)
goto 8100
436 if(err /= 0)
goto 8100
438 if(err /= 0)
goto 8100
440 if(err /= 0)
goto 8100
442 if(.not. initialized)
goto 8100
444 if(err /= 0)
goto 8100
447 8100 print *,
"FAILURE in esputr2001_test_initialized"
455 real(kind=ESPUTR_DP) :: Emin, Emax
457 if(err == 0)
goto 9100
459 if(err /= 0)
goto 9100
461 if(err /= 0)
goto 9100
463 if(err /= 0 .or. abs(10-emin) > 1 .or. abs(3000-emax) > 1)
goto 9100
465 if(err == 0)
goto 9100
467 if(err == 0)
goto 9100
469 if(err == 0)
goto 9100
473 9100 print *,
"FAILURE in esputr2001_test_availableEnergyRange"
481 integer,
parameter :: n=10
482 real(kind=ESPUTR_DP) :: theta(n)=(/0,10,20,30,40,50,60,70,80,90/)
483 real(kind=ESPUTR_DP) :: Emin, Emax,E,ym,yex
487 if(err /= 0)
goto 100
489 if(err /= 0)
goto 100
491 if(err /= 0)
goto 100
498 if(err /= 0)
goto 100
501 if(err /= 0)
goto 100
503 print *,
"FAILURE in esputr2001_test_extrapolate_angular: ",&
504 "initial and extrapolated values are different"
505 print *,
" theta, Emin, E ",theta(i),emin,e
506 print *,
" Y_min, Y_extrap ",ym,yex
511 if(err /= 0)
goto 100
514 if(err /= 0)
goto 100
516 print *,
"FAILURE in esputr2001_test_extrapolate_angular: ",&
517 "initial and extrapolated values are different"
518 print *,
" theta, Emax, E ",theta(i),emax,e
519 print *,
" Y_max, Y_extrap ",ym,yex
525 print *,
"esputr2001_test_extrapolate_angular: ", .true.
529 100 print *,
"FAILURE in esputr2001_test_extrapolate_angular"
558 print *,
"ESPUTR2001_TEST COMPLETED"
integer, parameter n_e0
Number of tested values of incident energy.
logical function, public esputr2001_test_n()
Test that expected values come out of esputr2001_yn.
real(kind=esputr_dp), dimension(n_combinations_theta) ythetamax
Values of Y(E,ThetaMax)/Y(E,0) for test of the angular dependence.
logical function, public esputr2001_test_wrong_file()
Test for correct error codes if given file does not exist or is corrupted.
character(10), dimension(2, n_combinations_theta), parameter combinations_th
Projectile-target combinations for tests of the angular dependence.
real(kind=esputr_dp), dimension(n_e0, n_combinations), parameter expected2001
Reference values for comparison: sputtering yield for normal incidence.
logical function, public esputr2001_test_double_init()
Test for correct error codes if 2001 model is initialized or deallocateted more than once...
subroutine, public printfailed(expected, calculated, passed)
Print pairs of values (expected(i),calculated(i)) for which passed(i)=.false.
subroutine, public esputr2001_getavailableenergyrange(projTargStartId, projTargEndId, Emin, Emax, err)
Get the minimum and maximum energies for which the angular dependency factor is defined.
character(10), dimension(3, n_combinations), parameter combinations
List of projectile-target combinations for which the reference values of Y(E,0) are defined...
subroutine, public esputr2001_initn(fileNName, err)
logical function, public esputr2001_test_negative_energy()
Test for correct error codes if projectile energy is negative.
integer, parameter n_combinations
Number of tested projectile-target combinations.
logical function, public esputr2001_test_unknown_elements()
test for correct error codes if ID of an unknown (chemical) element is requested
real(kind=esputr_dp), dimension(n_e0), parameter e0
Values of incident energy for which the yields are tested (eV)
logical function, public esputr2001_test_theta()
Regression test for the angular dependence.
integer, parameter n_combinations_theta
Number of projectile-target-energy combinations for test of the angular dependence.
real(esputr_dp), parameter, public esputr_pi
Pi number.
logical elemental function, public ispassed(expected, calculated)
logical function, public esputr2001_test_wrong_ids()
Test for correct error codes if projectile/target IDs do not exist.
subroutine, public esputr2001_deallocate(err)
Deallocate dynamic arrays used by this module.
logical function, public esputr2001_if_initialized()
Return .true. if module esputr2001 is initialized.
real(esputr_dp) function, public esputr2001_yth(E0, theta, projTargStartId, projTargEndId, err)
Angular dependence of sputtering yield in 2001-model for given incident angle and energy...
integer function, public esputr2001_getprojectiletargetidn(proj, targ, err)
Return ID for a projectile-target combination for 2001-model for normal incidence.
logical function, public esputr2001_test_initialized()
Check esputr2001_if_initialized.
character(*), parameter sputer2001_n_fitvalues_file
Dafault paths to the input files.
logical function, public esputr2001_test_eth()
Check esputr2001_Eth.
logical function, public esputr2001_test_call_uninitialized()
Test for correct error codes if functions are used w/o initialization of the module.
logical function, public esputr2001_test_extrapolate_angular()
Check ESPUTR2001_EXTRAPOLATE_ANGULAR=.TRUE.
logical function, public esputr2001_test_availableenergyrange()
Check test_availableEnergyRange.
real(esputr_dp) function, public esputr2001_eth(projectileTarget_id, err)
Return the threshold energy E_th for the given projectile-target combination.
logical function, public esputr2001_test_wrong_angle()
Test for correct error codes if incident angle is out of bounds.
logical, save, public esputr2001_extrapolate_angular
Switch for extrapolation of the angular dependency to energies for which no data are defined...
real(kind=esputr_dp), dimension(n_combinations_theta) etheta
Incident energy (eV) for test of the angular dependence.
character(*), parameter sputer2001_th_fitvalues_file
real(esputr_dp) function, public esputr2001_yn(E0, projectileTarget_id, err)
Calculate sputtering yield for normal incidence with 2001-model for given incident energy and target-...
subroutine, public esputr2001_getprojectiletargetidsth(proj, targ, thLower, thUpper, err)
Return two IDs for a projectile-target combination for 2001-model for angular dependence.
subroutine, public esputr2001_init(fileNName, fileThName, err)
Initialization of the 2001-model.
real(kind=esputr_dp), dimension(n_combinations_theta) thetamax
Angle of maximum for tests of the angular dependence.
integer, save, public esputr_unit
Index of the unit for standard output, default value 6.