5 REAL, SAVE :: Rqd_Base
, Rqd_Top
, Hqd
, DWL
6 REAL, ALLOCATABLE
, DIMENSION (:), SAVE :: XR
, XZ
7 INTEGER, SAVE :: Ishape
11 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12 ! Profile of the quantum dot !
14 ! ISHAPE = 1 ! TRUNCATED CONE !
15 ! ! Rqd_Top=0 -> CONE !
16 ! ! Rqd_Top=Rqd_Base -> CYLINDER !
19 ! SHAPERTOZ calculates XZ (given XR) !
20 ! SHAPEZTOR calculates XR (given XZ) !
22 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
24 SUBROUTINE SHAPERTOZ(XR
,XZ
)
27 REAL, INTENT(IN
) :: XR
28 REAL, INTENT( OUT
) :: XZ
32 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
34 IF (XR
.GT
.Rqd_Base
) THEN
35 WRITE(6,*) 'ERROR IN SHAPERTOZ: XR OUTSIDE THE DOT'
36 WRITE(6,*) XR
,Rqd_Base
44 IF (XR
.LE
.Rqd_Top
) THEN
47 XZ
= - ( Hqd
/(Rqd_Base
-Rqd_Top
) )*(XR
-Rqd_Top
)+Hqd
51 IF (XR
.LE
.Rqd_Top
) THEN
54 R0
= Rqd_Top
**2+((Rqd_Base
**2-Rqd_Top
**2+Hqd
**2)/(2.E0
*Hqd
))**2
55 XZ
= sqrt(R0
-XR
**2)-Sqrt(R0
-Rqd_Top
**2)+Hqd
61 END SUBROUTINE SHAPERTOZ
63 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
65 SUBROUTINE SHAPEZTOR(XR
,XZ
)
68 REAL, INTENT( OUT
) :: XR
69 REAL, INTENT(IN
) :: XZ
73 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
76 WRITE(6,*) 'ERROR IN SHAPERTOZ: XR OUTSIDE THE DOT'
85 XR
= - ( (Rqd_Base
-Rqd_Top
)/Hqd
)*XZ
+ Rqd_Base
88 R0
= Rqd_Top
**2+((Rqd_Base
**2-Rqd_Top
**2+Hqd
**2)/(2.E0
*Hqd
))**2
89 XR
= SQRT( R0
-( XZ
-Hqd
+SQRT(R0
-Rqd_Top
**2) )**2 )
93 END SUBROUTINE SHAPEZTOR
95 END MODULE Dot_Geometry