2 SUBROUTINE POTENTIAL_WZ(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
3 ESOUP
,ESODW
,ELAST
,EXX
,EYY
,&
9 Use Auxiliar_Procedures
, ONLY
: AISO
13 !!!!! 'dummy' and local variables !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15 REAL,DIMENSION(:,:,:),OPTIONAL
:: EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
,POT
17 REAL,DIMENSION(:,:,:) :: EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
20 REAL ZM
,THETA
,CTHETA
,STHETA
, &
23 INTEGER I_X
,I_Y
,I_Z
,I_N1
,I_N2
,I_N3
,CHI
25 REAL, DIMENSION(3) :: R_SL
,X_VEC
,XI_VEC
27 REAL :: POTBE
,POTBHH
,POTBLH
,POTBSO
,POTBLS
,&
28 POTWE
,POTWHH
,POTWLH
,POTWSO
,POTWLS
,&
29 VBIEL
,VBIHH
,VBILH
,VBISO
,VBILS
31 REAL,DIMENSION(0:1) :: POTE
, POTHH
, POTLH
, POTSO
, POTLS
, &
32 PC1
, PC2
, PD1
, PD2
, PD3
, PD4
, PD5
, PD6
34 REAL, DIMENSION(1:8) :: ENERGY
36 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
38 CALL ENER_CONSTANTS_WZ( )
41 ! WRITE(16,'(A,I3,A,I3)')"I_Z ",I_Z," of ",ZDIM
42 Z
=Z_Min
+REAL(I_Z
-1)*Z_Inc
44 Y
=Y_Min
+REAL(I_Y
-1)*Y_Inc
46 X
=X_Min
+REAL(I_X
-1)*X_Inc
52 I_N1
=0; I_N2
=0; I_N3
=0
54 R_SL
=REAL(I_N1
)*A1_S
+REAL(I_N2
)*A2_S
+REAL(I_N3
)*A3_S
58 RHO
=SQRT(XI_VEC(1)**2+XI_VEC(2)**2)/RC
59 IF(XI_VEC(1).EQ
.0.E0
.AND
.XI_VEC(2).EQ
.0.E0
) THEN
60 CTHETA
=1.E0
/SQRT(2.E0
); STHETA
=1.E0
/SQRT(2.E0
) ! It is not the Mathematical limit
62 THETA
=ATAN(XI_VEC(2)/XI_VEC(1))
63 CTHETA
=Cos(THETA
); STHETA
=Sin(THETA
)
68 CALL SHAPERTOZ(MIN(RHO
*RC
,Rqd_Base
),ZMAUX
)
74 IF (abs(zeta
) .EQ
. 0.E0
.OR
. ZETA
.EQ
. ZM
) THEN
79 IF (ZETA
.GE
.-D
.AND
.ZETA
.LE
.ZM
) THEN
81 IF(I_N1
.NE
.0.OR
.I_N2
.NE
.0.OR
.I_N3
.NE
.0) THEN
82 WRITE(16,*)I_N1
,I_N2
,I_N3
83 WRITE(16,*)X_VEC(3),ZETA
*ZC
,ZM
*ZC
87 IF (KPBASIS
.EQ
. 0) THEN ! Winkler basis
89 CALL POT_CALC_CAR_WZ(CHI
,ENERGY
)
91 CALL POT_CALC_CYL_WZ(CHI
,ENERGY
)
95 CALL POT_CALC_CAR_CH_WZ(CHI
,ENERGY
)
97 CALL POT_CALC_CYL_CH_WZ(CHI
,ENERGY
)
101 EEL(I_X
,I_Y
,I_Z
) = ENERGY(1)
102 EHHUP(I_X
,I_Y
,I_Z
) = ENERGY(2)
103 ELHUP(I_X
,I_Y
,I_Z
) = ENERGY(3)
104 ELHDW(I_X
,I_Y
,I_Z
) = ENERGY(4)
105 EHHDW(I_X
,I_Y
,I_Z
) = ENERGY(5)
106 ESOUP(I_X
,I_Y
,I_Z
) = ENERGY(6)
107 ESODW(I_X
,I_Y
,I_Z
) = ENERGY(7)
108 ELAST(I_X
,I_Y
,I_Z
) = ENERGY(8)
110 ! WRITE(26,'(10(E15.8,1X))')Z,ENERGY(1:8)
122 SUBROUTINE ENER_CONSTANTS_WZ( )
125 REAL, DIMENSION(3) :: EW
,EB
126 REAL :: EVW
,EVB
,ECW
,ECB
127 INTEGER, DIMENSION(1) :: AUX
133 EW(2)=EVW
+(DW1
-DW2
)/2.E0
+SQRT(((DW1
-DW2
)/2.E0
)**2+2.E0
*DW3
**2)
134 EW(3)=EVW
+(DW1
-DW2
)/2.E0
-SQRT(((DW1
-DW2
)/2.E0
)**2+2.E0
*DW3
**2)
137 EB(2)=EVB
+(DB1
-DB2
)/2.E0
+SQRT(((DB1
-DB2
)/2.E0
)**2+2.E0
*DB3
**2)
138 EB(3)=EVB
+(DB1
-DB2
)/2.E0
-SQRT(((DB1
-DB2
)/2.E0
)**2+2.E0
*DB3
**2)
140 AUX
=MAXLOC(EW
); NW
=AUX(1)
141 AUX
=MAXLOC(EB
); NB
=AUX(1)
144 EVW
=VBO
+EB(NB
)-EW(NW
)
147 EW(2)=EVW
+(DW1
-DW2
)/2.E0
+SQRT(((DW1
-DW2
)/2.E0
)**2+2.E0
*DW3
**2)
148 EW(3)=EVW
+(DW1
-DW2
)/2.E0
-SQRT(((DW1
-DW2
)/2.E0
)**2+2.E0
*DW3
**2)
151 EB(2)=EVB
+(DB1
-DB2
)/2.E0
+SQRT(((DB1
-DB2
)/2.E0
)**2+2.E0
*DB3
**2)
152 EB(3)=EVB
+(DB1
-DB2
)/2.E0
-SQRT(((DB1
-DB2
)/2.E0
)**2+2.E0
*DB3
**2)
160 ! Definition of parameters for Barrier and Well
164 POTWHH
= (VWH
+DW1
+DW2
)
166 POTBHH
= (VBH
+DB1
+DB2
)
168 IF (KPBASIS
== 0) THEN
169 POTWLH
= (VWH
+(DW1
-DW2
+4.E0
*DW3
)/3.E0
)
170 POTWSO
= (VWH
+2.E0
*(DW1
-DW2
-2.E0
*DW3
)/3.E0
)
171 POTWLS
= (DW1
-DW2
+DW3
)
172 POTBLH
= (VBH
+(DB1
-DB2
+4.E0
*DB3
)/3.E0
)
173 POTBSO
= (VBH
+2.E0
*(DB1
-DB2
-2.E0
*DB3
)/3.E0
)
174 POTBLS
= (DB1
-DB2
+DB3
)
176 POTWLH
= (VWH
+DW1
-DW2
)
179 POTBLH
= (VBH
+DB1
-DB2
)
184 !!!!! Output Potential Profiles !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
186 WRITE(6,*)"PERFILES DE POTENCIAL SIN DEFORMACION:"
187 WRITE(6,*)"POTWE= ",POTWE
," POTBE= ",POTBE
188 WRITE(6,*)"POTWHH= ",POTWHH
," POTBHH= ",POTBHH
189 WRITE(6,*)"POTWLH= ",POTWLH
," POTBLH= ",POTBLH
190 WRITE(6,*)"POTWSO= ",POTWSO
," POTBSO= ",POTBSO
191 WRITE(6,*)"POTWLS= ",POTWLS
," POTBLS= ",POTBLS
192 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
195 !!!!! Output Potential Profiles including strain effect !!!!!!!!!!!!!!!!!!!!!!!!
197 IF(STR_Action
.EQ
.0) THEN
198 IF (KPBASIS
== 0) THEN
199 VBIEL
= ( C2
*BISUM
+ C1
*BIZZ
)
200 VBIHH
= ( (D2
+D4
)*BISUM
+ (D1
+D3
)*BIZZ
)
201 VBILH
= ( (D2
+D4
/3.)*BISUM
+ (D1
+D3
/3.)*BIZZ
)
202 VBISO
=( (D2
+2.*D4
/3.)*BISUM
+ (D1
+2.*D3
/3.)*BIZZ
)
203 VBILS
= ( D4
*BISUM
+ D3
*BIZZ
)
205 VBIEL
= ( C2
*BISUM
+ C1
*BIZZ
)
206 VBIHH
= ( (D2
+D4
)*BISUM
+ (D1
+D3
)*BIZZ
)
207 VBILH
= ( (D2
+D4
)*BISUM
+ (D1
+D3
)*BIZZ
)
208 VBISO
= (D2
*BISUM
+ D1
*BIZZ
)
215 ! Potential edges including strain effect
216 IF(STR_Action
.EQ
.0) THEN
218 POTWHH
= (POTWHH
+VBIHH
)
219 POTWLH
= (POTWLH
+VBILH
)
220 POTWSO
= (POTWSO
+VBISO
)
221 POTWLS
= (POTWLS
+VBILS
)
222 WRITE(6,*)"PERFILES DE POTENCIAL CON DEFORMACION:"
223 WRITE(6,*)"POTWE= ",POTWE
," POTBE= ",POTBE
224 WRITE(6,*)"POTWHH= ",POTWHH
," POTBHH= ",POTBHH
225 WRITE(6,*)"POTWLH= ",POTWLH
," POTBLH= ",POTBLH
226 WRITE(6,*)"POTWSO= ",POTWSO
," POTBSO= ",POTBSO
227 WRITE(6,*)"POTWLS= ",POTWLS
," POTBLS= ",POTBLS
230 POTE(0) = POTBE
; POTE(1) = POTWE
231 POTHH(0) = POTBHH
; POTHH(1) = POTWHH
232 POTLH(0) = POTBLH
; POTLH(1) = POTWLH
233 POTLS(0) = POTBLS
; POTLS(1) = POTWLS
234 POTSO(0) = POTBSO
; POTSO(1) = POTWSO
236 !!!! Deformation potentials for barrier and well are equal
238 PC1(0) = C1
; PC1(1) = C1
239 PC2(0) = C2
; PC2(1) = C2
240 PD1(0) = D1
; PD1(1) = D1
241 PD2(0) = D2
; PD2(1) = D2
242 PD3(0) = D3
; PD3(1) = D3
243 PD4(0) = D4
; PD4(1) = D4
244 PD5(0) = D5
; PD5(1) = D5
245 PD6(0) = D6
; PD6(1) = D6
249 END SUBROUTINE ENER_CONSTANTS_WZ
251 SUBROUTINE POT_CALC_CAR_CH_WZ(CHI
,ENERGY
)
254 REAL, DIMENSION(:) :: ENERGY
255 INTEGER, PARAMETER :: DIMM
=6
256 COMPLEX, DIMENSION(1:DIMM
,1:DIMM
) :: HKANE
257 REAL :: SXX
,SYY
,SZZ
,SXY
,SXZ
,SYZ
,PZO
259 !! DIAGONALIZATION VARIABLES
261 COMPLEX, DIMENSION(1:(2*DIMM
-1)) :: WORK
262 REAL, DIMENSION(1:(3*DIMM
-2)) :: RWORK
263 REAL W(1:DIMM
), ROOT(DIMM
), CARAC(DIMM
)
268 IF(STR_Action
.EQ
.0) THEN
269 SXX
=0.E0
; SYY
=0.E0
; SZZ
=0.E0
270 SXY
=0.E0
; SXZ
=0.E0
; SYZ
=0.E0
279 IF(PZO_Action
.EQ
.0.E0
) THEN
285 HKANE(1,1)=POTHH(CHI
)-PZO
+ &
286 (PD1(CHI
)+PD3(CHI
))*SZZ
+(PD2(CHI
)+PD4(CHI
))*(SXX
+SYY
)
288 HKANE(2,2)=POTLH(CHI
)-PZO
+ &
289 (PD1(CHI
)+PD3(CHI
))*SZZ
+(PD2(CHI
)+PD4(CHI
))*(SXX
+SYY
)
291 HKANE(3,3)=POTSO(CHI
)-PZO
+ &
292 (PD1(CHI
))*SZZ
+(PD2(CHI
))*(SXX
+SYY
)
294 HKANE(4,4)=HKANE(1,1)
295 HKANE(5,5)=HKANE(2,2)
296 HKANE(6,6)=HKANE(3,3)
298 IF(DIAG_Action
.NE
.0) THEN
300 HKANE(1,2)=-PD5(CHI
)*CMPLX(SXX
-SYY
,-2.E0
*SXY
)
301 HKANE(1,3)=-PD6(CHI
)*CMPLX(SXZ
,-SYZ
)
306 HKANE(2,3)=PD6(CHI
)*CMPLX(SXZ
,+SYZ
)
309 HKANE(2,6)= SQRT(2.E0
)*POTLS(CHI
)
312 HKANE(3,5)= SQRT(2.E0
)*POTLS(CHI
)
315 HKANE(4,5)=-PD5(CHI
)*CMPLX(SXX
-SYY
,2.E0
*SXY
)
316 HKANE(4,6)=HKANE(2,3)
317 HKANE(5,6)=HKANE(1,3)
323 HKANE(J
,I
)=CONJG(HKANE(I
,J
))
327 CALL CHEEV('V','U',DIMM
,HKANE
,DIMM
,W
,WORK
,LWORK
,RWORK
,INFO
)
330 write(6,*)"Not Succesful Exit. Stopping. INFO=",INFO
331 write(6,'(2(A,F6.3,1X))')"RHO=",RC
*RHO
,"ZETA=",ZETA
*ZC
335 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
336 !! Ordering Eigenvalues according to the Bloch func. caracter
337 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
342 ! Calculo de la componentes dependientes del spin
344 CARAC(J
)=HKANE(J
,I
)*HKANE(J
,I
)
346 ! Suma de componentes independientemente del spin (hh_up + hh_dw, lh_up + lh_dw)
347 CARAC(1)=CARAC(1)+CARAC(4)
349 CARAC(2)=CARAC(2)+CARAC(5)
351 CARAC(3)=CARAC(3)+CARAC(6)
354 ! Peso de las componentes de las que se extraeran los autovalores.
356 IF (CARAC(1).GE
.CARAC_MAX
) THEN ! HH
359 IF (CARAC(2).GE
.CARAC_MAX
) THEN ! LH
362 IF (CARAC(3).GE
.CARAC_MAX
) THEN ! SO
368 ELSE ! Only the diagonal elements are calculated
373 ROOT(2)=HKANE(6,6) !Redundant
378 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
380 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
382 ENERGY(1) = POTE(CHI
)-PZO
+(PC1(CHI
)*SZZ
+PC2(CHI
)*(SXX
+SYY
))
391 ! ENERGY(7) = CHI ! To save the Structure-profile
393 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
394 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
395 !!!!! Calculation of the Elastic Energy. Since EEL contains no information
396 !!!!! we will use this array to pack the Elastic Energy.
398 !!!!! U=1/2*XLAMB*Tr(e)**2+XMU*(err**2+e00**2+ezz**2+erz**2)
400 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
401 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
403 ENERGY(8) = C11
*(SXX
**2 + SYY
**2)+C33
*SZZ
**2+ &
404 2.E0
*(XLAMB
*(SXX
*SYY
)+C13
*(SXX
+SYY
)*SZZ
+ &
405 (C11
-XLAMB
)*SXY
**2+2.E0
*XMU
*(SXZ
**2+SYZ
**2))
407 ENERGY(8) = ENERGY(8)/2.E0
411 END SUBROUTINE POT_CALC_CAR_CH_WZ
413 SUBROUTINE POT_CALC_CYL_CH_WZ(CHI
,ENERGY
)
416 REAL, DIMENSION(:) :: ENERGY
417 INTEGER, PARAMETER :: DIMM
=6
418 REAL, DIMENSION(1:DIMM
,1:DIMM
) :: HKANE
420 REAL :: SSUM
,SDIF
,SZZ
,SRZ
,SRR
,S00
422 !! DIAGONALIZATION VARIABLES
424 REAL :: W(1:DIMM
), WORK(1:10*DIMM
), AW(1:DIMM
,1:DIMM
), &
425 ROOT(DIMM
), CARAC(DIMM
), SLAMCH
426 INTEGER :: IWORK(DIMM
*5), IFAIL(DIMM
), INFO
, NUM
428 IF(STR_Action
.EQ
.0) THEN
429 SSUM
=0.E0
; SDIF
=0.E0
; SZZ
=0.E0
;
430 SRZ
=0.E0
; SRR
=0.E0
; S00
=0.E0
433 !!! FOR CYLINDRICAL COORDINATES WE CALCULATE ONLY THE X-Z PLANE,
434 !!! THAT MEANS: THETA=0
438 SSUM
=EXX(I_X
,I_Y
,I_Z
)+EYY(I_X
,I_Y
,I_Z
)
439 SDIF
=EXX(I_X
,I_Y
,I_Z
)-EYY(I_X
,I_Y
,I_Z
)
443 IF(PZO_Action
.EQ
.0.E0
) THEN
449 HKANE(1,1)=POTHH(CHI
)-PZO
+ &
450 (PD1(CHI
)+PD3(CHI
))*SZZ
+(PD2(CHI
)+PD4(CHI
))*SSUM
452 HKANE(2,2)=POTLH(CHI
)-PZO
+ &
453 (PD1(CHI
)+PD3(CHI
))*SZZ
+(PD2(CHI
)+PD4(CHI
))*SSUM
455 HKANE(3,3)=POTSO(CHI
)-PZO
+ &
456 PD1(CHI
)*SZZ
+PD2(CHI
)*SSUM
458 HKANE(4,4)=HKANE(1,1)
459 HKANE(5,5)=HKANE(2,2)
460 HKANE(6,6)=HKANE(3,3)
462 IF(DIAG_Action
.NE
.0) THEN
465 HKANE(1,2)=-PD5(CHI
)*SDIF
466 HKANE(1,3)=-PD6(CHI
)*SRZ
471 HKANE(2,3)=PD6(CHI
)*SRZ
474 HKANE(2,6)= SQRT(2.E0
)*POTLS(CHI
)
477 HKANE(3,5)= SQRT(2.E0
)*POTLS(CHI
)
480 HKANE(4,5)=-PD5(CHI
)*SDIF
481 HKANE(4,6)=HKANE(2,3)
482 HKANE(5,6)=HKANE(1,3)
486 HKANE(J
,I
)=HKANE(I
,J
)
490 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
491 !! Analytic solutions for Rho = 0.
492 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
494 ! ZETA = ZMIN+ZINC*IZ ! XZ normalized to ZC
496 ! W(1)=(HKANE(2,2)+HKANE(5,5))+
497 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
498 ! W(2)=(HKANE(2,2)+HKANE(5,5))-
499 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
500 ! write(24,'(4(f18.8,1x))')ZETA,HKANE(1,1),W(1)/2.,W(2)/2.
502 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
505 CALL DSYEVX('V','A','U',DIMM
,HKANE
,DIMM
,0.,0.,2,2, &
506 2*SLAMCH('S'),NUM
,W
,AW
,DIMM
,WORK
,10*DIMM
,IWORK
,IFAIL
,INFO
)
509 write(6,*)"Not Succesful Exit. Stopping. INFO=",INFO
510 write(6,'(A,10(I2,1X))')"IFAIL=",IFAIL(1:DIMM
)
511 write(6,'(2(A,F6.3,1X))')"RHO=",RC
*RHO
,"ZETA=",ZETA
*ZC
515 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
516 !! Ordering Eigenvalues according to the Bloch func. caracter
517 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
523 ! Calculo de la componentes dependientes del spin
525 CARAC(J
)=AW(J
,I
)*AW(J
,I
)
527 ! Suma de componentes independientemente del spin (hh_up + hh_dw, lh_up + lh_dw)
528 CARAC(1)=CARAC(1)+CARAC(4)
530 CARAC(2)=CARAC(2)+CARAC(5)
532 CARAC(3)=CARAC(3)+CARAC(6)
535 ! Peso de las componentes de las que se extraeran los autovalores.
537 IF (CARAC(1).GE
.CARAC_MAX
) THEN ! HH
540 IF (CARAC(2).GE
.CARAC_MAX
) THEN ! LH
543 IF (CARAC(3).GE
.CARAC_MAX
) THEN ! SO
549 ELSE ! Only the diagonal elements are calculated
554 ROOT(2)=HKANE(6,6) !Redundant
558 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
560 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
562 ENERGY(1) = POTE(CHI
)-PZO
+(PC1(CHI
)*SZZ
+PC2(CHI
)*SSUM
)
571 ! ESODW(IR,IZ,IGEO) = CHI ! To save the Structure-profile
573 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
574 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
575 !!!!! Calculation of the Elastic Energy. Since EEL contains no information
576 !!!!! we will use this array to pack the Elastic Energy.
578 !!!!! U=1/2*XLAMB*Tr(e)**2+XMU*(err**2+e00**2+ezz**2+erz**2)
580 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
581 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
584 ENERGY(8) = C11
*(SRR
**2 + S00
**2)+C33
*SZZ
**2+ &
585 2.E0
*(XLAMB
*(SRR
*S00
)+C13
*(SRR
+S00
)*SZZ
+ &
588 ENERGY(8) = ENERGY(8)/2.E0
592 END SUBROUTINE POT_CALC_CYL_CH_WZ
594 SUBROUTINE POT_CALC_CAR_WZ(CHI
,ENERGY
)
597 REAL, DIMENSION(:) :: ENERGY
598 INTEGER, PARAMETER :: DIMM
=6
599 COMPLEX, DIMENSION(1:DIMM
,1:DIMM
) :: HKANE
600 REAL :: SXX
,SYY
,SZZ
,SXY
,SXZ
,SYZ
,PZO
602 !! DIAGONALIZATION VARIABLES
604 COMPLEX, DIMENSION(1:(2*DIMM
-1)) :: WORK
605 REAL, DIMENSION(1:(3*DIMM
-2)) :: RWORK
606 REAL W(1:DIMM
), ROOT(DIMM
), CARAC(DIMM
)
611 IF(STR_Action
.EQ
.0) THEN
612 SXX
=0.E0
; SYY
=0.E0
; SZZ
=0.E0
613 SXY
=0.E0
; SXZ
=0.E0
; SYZ
=0.E0
622 IF(PZO_Action
.EQ
.0.E0
) THEN
628 HKANE(1,1)=POTHH(CHI
)-PZO
+ &
629 (PD1(CHI
)+PD3(CHI
))*SZZ
+(PD2(CHI
)+PD4(CHI
))*(SXX
+SYY
)
631 HKANE(2,2)=POTLH(CHI
)-PZO
+(PD1(CHI
)+PD3(CHI
)/3.E0
)*SZZ
+ &
632 (PD2(CHI
)+PD4(CHI
)/3.E0
)*(SXX
+SYY
)
633 HKANE(3,3)=HKANE(2,2)
634 HKANE(4,4)=HKANE(1,1)
635 HKANE(5,5)=POTSO(CHI
)-PZO
+(PD1(CHI
)+2.E0
*PD3(CHI
)/3.E0
)*SZZ
+ &
636 (PD2(CHI
)+2.E0
*PD4(CHI
)/3.E0
)*(SXX
+SYY
)
637 HKANE(6,6)=HKANE(5,5)
639 IF(DIAG_Action
.NE
.0) THEN
641 HKANE(1,2)=-SQRT(2.E0
/3.E0
)*PD6(CHI
)*CMPLX(SXZ
,-SYZ
)
642 HKANE(1,3)=-1.E0
/SQRT(3.E0
)*PD5(CHI
)*CMPLX(SXX
-SYY
,-2.E0
*SXY
)
644 HKANE(1,5)=1.E0
/SQRT(3.E0
)*PD6(CHI
)*CMPLX(SXZ
,-SYZ
)
645 HKANE(1,6)=SQRT(2./3.)*PD5(CHI
)*CMPLX(SXX
-SYY
,-2.E0
*SXY
)
648 HKANE(2,4)=HKANE(1,3)
649 HKANE(2,5)=SQRT(2.E0
)/3.E0
*( POTLS(CHI
)+&
650 (PD3(CHI
)*SZZ
+PD4(CHI
)*(SXX
+SYY
)) )
651 HKANE(2,6)=-PD6(CHI
)*CMPLX(SXZ
,-SYZ
)
653 HKANE(3,4)=-HKANE(1,2)
654 HKANE(3,5)=-PD6(CHI
)*CMPLX(SXZ
,SYZ
)
655 HKANE(3,6)=-HKANE(2,5)
657 HKANE(4,5)=-SQRT(2./3.)*PD5(CHI
)*CMPLX(SXX
-SYY
,+2.E0
*SXY
)
658 HKANE(4,6)=PD6(CHI
)*CMPLX(SXZ
,SYZ
)/SQRT(3.E0
)
666 HKANE(J
,I
)=CONJG(HKANE(I
,J
))
670 CALL CHEEV('V','U',DIMM
,HKANE
,DIMM
,W
,WORK
,LWORK
,RWORK
,INFO
)
673 write(6,*)"Not Succesful Exit. Stopping. INFO=",INFO
674 write(6,'(2(A,F6.3,1X))')"RHO=",RC
*RHO
,"ZETA=",ZETA
*ZC
678 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
679 !! Ordering Eigenvalues according to the Bloch func. caracter
680 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
685 ! Calculo de la componentes dependientes del spin
687 CARAC(J
)=HKANE(J
,I
)*HKANE(J
,I
)
689 ! Suma de componentes independientemente del spin (hh_up + hh_dw, lh_up + lh_dw)
690 CARAC(1)=CARAC(1)+CARAC(4)
692 CARAC(2)=CARAC(2)+CARAC(3)
694 CARAC(5)=CARAC(5)+CARAC(6)
697 ! Peso de las componentes de las que se extraeran los autovalores.
699 IF (CARAC(1).GE
.CARAC_MAX
) THEN ! HH
702 IF (CARAC(2).GE
.CARAC_MAX
) THEN ! LH
705 IF (CARAC(5).GE
.CARAC_MAX
) THEN ! SO
711 ELSE ! Only the diagonal elements were calculated
716 ROOT(2)=HKANE(6,6) !Redundant
721 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
723 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
725 ENERGY(1) = POTE(CHI
)-PZO
+(PC1(CHI
)*SZZ
+PC2(CHI
)*(SXX
+SYY
))
734 ! ENERGY(7) = CHI ! To save the Structure-profile
736 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
737 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
738 !!!!! Calculation of the Elastic Energy. Since EEL contains no information
739 !!!!! we will use this array to pack the Elastic Energy.
741 !!!!! U=1/2*XLAMB*Tr(e)**2+XMU*(err**2+e00**2+ezz**2+erz**2)
743 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
744 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
746 ENERGY(8) = C11
*(SXX
**2 + SYY
**2)+C33
*SZZ
**2+ &
747 2.E0
*(XLAMB
*(SXX
*SYY
)+C13
*(SXX
+SYY
)*SZZ
+ &
748 (C11
-XLAMB
)*SXY
**2+2.E0
*XMU
*(SXZ
**2+SYZ
**2))
750 ENERGY(8) = ENERGY(8)/2.E0
754 END SUBROUTINE POT_CALC_CAR_WZ
756 SUBROUTINE POT_CALC_CYL_WZ(CHI
,ENERGY
)
759 REAL, DIMENSION(:) :: ENERGY
760 INTEGER, PARAMETER :: DIMM
=6
761 REAL, DIMENSION(1:DIMM
,1:DIMM
) :: HKANE
763 REAL :: SSUM
,SDIF
,SZZ
,SRZ
,SRR
,S00
765 !! DIAGONALIZATION VARIABLES
767 REAL :: W(1:DIMM
), WORK(1:10*DIMM
), AW(1:DIMM
,1:DIMM
), &
768 ROOT(DIMM
), CARAC(DIMM
), SLAMCH
769 INTEGER :: IWORK(DIMM
*5), IFAIL(DIMM
), INFO
, NUM
771 IF(STR_Action
.EQ
.0) THEN
772 SSUM
=0.E0
; SDIF
=0.E0
; SZZ
=0.E0
;
773 SRZ
=0.E0
; SRR
=0.E0
; S00
=0.E0
776 !!! FOR CYLINDRICAL COORDINATES WE CALCULATE ONLY THE X-Z PLANE,
777 !!! THAT MEANS: THETA=0
781 SSUM
=EXX(I_X
,I_Y
,I_Z
)+EYY(I_X
,I_Y
,I_Z
)
782 SDIF
=EXX(I_X
,I_Y
,I_Z
)-EYY(I_X
,I_Y
,I_Z
)
786 IF(PZO_Action
.EQ
.0.E0
) THEN
792 HKANE(1,1)=POTHH(CHI
)-PZO
+ &
793 (PD1(CHI
)+PD3(CHI
))*SZZ
+(PD2(CHI
)+PD4(CHI
))*SSUM
795 HKANE(2,2)=POTLH(CHI
)-PZO
+(PD1(CHI
)+PD3(CHI
)/3.E0
)*SZZ
+ &
796 (PD2(CHI
)+PD4(CHI
)/3.E0
)*SSUM
797 HKANE(3,3)=HKANE(2,2)
798 HKANE(4,4)=HKANE(1,1)
799 HKANE(5,5)=POTSO(CHI
)-PZO
+(PD1(CHI
)+2.E0
*PD3(CHI
)/3.E0
)*SZZ
+ &
800 (PD2(CHI
)+2.E0
*PD4(CHI
)/3.E0
)*SSUM
801 HKANE(6,6)=HKANE(5,5)
803 IF(DIAG_Action
.NE
.0) THEN
805 HKANE(1,2)=-SQRT(2.E0
/3.E0
)*PD6(CHI
)*SRZ
806 HKANE(1,3)=-1.E0
/SQRT(3.E0
)*PD5(CHI
)*SDIF
808 HKANE(1,5)=1.E0
/SQRT(3.E0
)*PD6(CHI
)*SRZ
809 HKANE(1,6)=SQRT(2./3.)*PD5(CHI
)*SDIF
812 HKANE(2,4)=HKANE(1,3)
813 HKANE(2,5)=SQRT(2.E0
)/3.E0
*(POTLS(CHI
)+(PD3(CHI
)*SZZ
+PD4(CHI
)*SSUM
))
814 HKANE(2,6)=-PD6(CHI
)*SRZ
816 HKANE(3,4)=-HKANE(1,2)
817 HKANE(3,5)=HKANE(2,6)
818 HKANE(3,6)=-HKANE(2,5)
820 HKANE(4,5)=-HKANE(1,6)
821 HKANE(4,6)=HKANE(1,5)
829 HKANE(J
,I
)=HKANE(I
,J
)
833 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
834 !! Analytic solutions for Rho = 0.
835 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
837 ! ZETA = ZMIN+ZINC*IZ ! XZ normalized to ZC
839 ! W(1)=(HKANE(2,2)+HKANE(5,5))+
840 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
841 ! W(2)=(HKANE(2,2)+HKANE(5,5))-
842 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
843 ! write(24,'(4(f18.8,1x))')ZETA,HKANE(1,1),W(1)/2.,W(2)/2.
845 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
848 CALL DSYEVX('V','A','U',DIMM
,HKANE
,DIMM
,0.,0.,2,2, &
849 2*SLAMCH('S'),NUM
,W
,AW
,DIMM
,WORK
,10*DIMM
,IWORK
,IFAIL
,INFO
)
852 write(6,*)"Not Succesful Exit. Stopping. INFO=",INFO
853 write(6,'(A,10(I2,1X))')"IFAIL=",IFAIL(1:DIMM
)
854 write(6,'(2(A,F6.3,1X))')"RHO=",RC
*RHO
,"ZETA=",ZETA
*ZC
858 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
859 !! Ordering Eigenvalues according to the Bloch func. caracter
860 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
865 ! Calculo de la componentes dependientes del spin
867 CARAC(J
)=AW(J
,I
)*AW(J
,I
)
869 ! Suma de componentes independientemente del spin (hh_up + hh_dw, lh_up + lh_dw)
870 CARAC(1)=CARAC(1)+CARAC(4)
872 CARAC(2)=CARAC(2)+CARAC(3)
874 CARAC(5)=CARAC(5)+CARAC(6)
877 ! Peso de las componentes de las que se extraeran los autovalores.
879 IF (CARAC(1).GE
.CARAC_MAX
) THEN ! HH
882 IF (CARAC(2).GE
.CARAC_MAX
) THEN ! LH
885 IF (CARAC(5).GE
.CARAC_MAX
) THEN ! SO
891 ELSE ! Only the diagonal elements were calculated
896 ROOT(2)=HKANE(6,6) !Redundant
901 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
903 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
905 ENERGY(1) = POTE(CHI
)-PZO
+(PC1(CHI
)*SZZ
+PC2(CHI
)*SSUM
)
914 ! ESODW(IR,IZ,IGEO) = CHI ! To save the Structure-profile
916 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
917 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
918 !!!!! Calculation of the Elastic Energy. Since EEL contains no information
919 !!!!! we will use this array to pack the Elastic Energy.
921 !!!!! U=1/2*XLAMB*Tr(e)**2+XMU*(err**2+e00**2+ezz**2+erz**2)
923 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
924 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
927 ENERGY(8) = C11
*(SRR
**2 + S00
**2)+C33
*SZZ
**2+ &
928 2.E0
*(XLAMB
*(SRR
*S00
)+C13
*(SRR
+S00
)*SZZ
+ &
931 ENERGY(8) = ENERGY(8)/2.E0
935 END SUBROUTINE POT_CALC_CYL_WZ
937 END SUBROUTINE POTENTIAL_WZ
939 SUBROUTINE POTENTIAL_ZB(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
940 ESOUP
,ESODW
,ELAST
,EXX
,EYY
,&
946 Use Auxiliar_Procedures
, ONLY
: AISO
950 !!!!! 'dummy' and local variables !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
952 REAL,DIMENSION(:,:,:),OPTIONAL
:: EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
954 REAL,DIMENSION(:,:,:) :: EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
957 REAL ZM
,THETA
,CTHETA
,STHETA
, &
960 INTEGER I_X
,I_Y
,I_Z
,I_N1
,I_N2
,I_N3
,CHI
962 REAL, DIMENSION(3) :: R_SL
,X_VEC
,XI_VEC
964 REAL :: POTWE
,POTWHH
,POTWLH
,POTWSO
,&
965 VBIEL
,VBIHH
,VBILH
,VBISO
967 REAL,DIMENSION(0:1) :: POTE
, POTHH
, POTLH
, POTSO
, &
968 DVD
,DSD
,DVU
,DVSU
,D2VU
,D2VSU
,DSO
,ZBC1
970 REAL, DIMENSION(1:8) :: ENERGY
972 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
974 CALL ENER_CONSTANTS_ZB( )
977 ! WRITE(16,'(A,I3,A,I3)')"I_Z ",I_Z," of ",ZDIM
978 Z
=Z_Min
+REAL(I_Z
-1)*Z_Inc
980 Y
=Y_Min
+REAL(I_Y
-1)*Y_Inc
982 X
=X_Min
+REAL(I_X
-1)*X_Inc
986 I_N1
=0; I_N2
=0; I_N3
=0
988 R_SL
=REAL(I_N1
)*A1_S
+REAL(I_N2
)*A2_S
+REAL(I_N3
)*A3_S
992 RHO
=SQRT(XI_VEC(1)**2+XI_VEC(2)**2)/RC
993 IF(XI_VEC(1).EQ
.0.E0
.AND
.XI_VEC(2).EQ
.0.E0
) THEN
994 CTHETA
=1.E0
/SQRT(2.E0
); STHETA
=1.E0
/SQRT(2.E0
) ! It is not the Mathematical limit
996 THETA
=ATAN(XI_VEC(2)/XI_VEC(1))
997 CTHETA
=Cos(THETA
); STHETA
=Sin(THETA
)
1002 CALL SHAPERTOZ(MIN(RHO
*RC
,Rqd_Base
),ZMAUX
)
1008 IF (abs(zeta
) .EQ
. 0.E0
.OR
. ZETA
.EQ
. ZM
) THEN
1013 IF (ZETA
.GE
.-D
.AND
.ZETA
.LE
.ZM
) THEN
1015 IF(I_N1
.NE
.0.OR
.I_N2
.NE
.0.OR
.I_N3
.NE
.0) THEN
1016 WRITE(16,*)I_N1
,I_N2
,I_N3
1017 WRITE(16,*)X_VEC(3),ZETA
*ZC
,ZM
*ZC
1021 IF (KCOOR
.EQ
.0) THEN
1022 CALL POT_CALC_CAR_ZB(CHI
,ENERGY
)
1024 CALL POT_CALC_CYL_ZB(CHI
,ENERGY
)
1027 EEL(I_X
,I_Y
,I_Z
) = ENERGY(1)
1028 EHHUP(I_X
,I_Y
,I_Z
) = ENERGY(2)
1029 ELHUP(I_X
,I_Y
,I_Z
) = ENERGY(3)
1030 ELHDW(I_X
,I_Y
,I_Z
) = ENERGY(4)
1031 EHHDW(I_X
,I_Y
,I_Z
) = ENERGY(5)
1032 ESOUP(I_X
,I_Y
,I_Z
) = ENERGY(6)
1033 ESODW(I_X
,I_Y
,I_Z
) = ENERGY(7)
1034 ELAST(I_X
,I_Y
,I_Z
) = ENERGY(8)
1036 ! WRITE(26,'(10(E15.8,1X))')Z,ENERGY(1:8)
1048 SUBROUTINE ENER_CONSTANTS_ZB( )
1051 ! Definition of parameters for Barrier and Well
1053 ! If we set both terms equal to zero the spin-interaction in the
1054 ! deformation potentials is removed. The values of AVB,BB,DB are
1055 ! taken from C. Pryor, PRB, 57, 7190 (1998)
1057 ! DSO(0) = VBH - VBSO ; DSO(1) = VWH - VWSO
1058 DSO(0) = 0.0; DSO(1) = 0.0
1060 ZBC1(0) = -9.3 ; ZBC1(1) = ACW
1062 DVD(0) = 0.7E0
- 2./9. * DSO(0)
1063 DVD(1) = AVW
- 2./9. * DSO(1)
1064 DSD(0) = 0.7E0
+ 4./9. * DSO(0)
1065 DSD(1) = AVW
+ 4./9. * DSO(1)
1066 DVU(0) = -3./2. * (-2.0) + 1./3. * DSO(0)
1067 DVU(1) = -3./2. * BW
+ 1./3. * DSO(1)
1068 DVSU(0) = -3./2. * (-2.0) - 1./6. * DSO(0)
1069 DVSU(1) = -3./2. * BW
- 1./6. * DSO(1)
1070 D2VU(0) = -SQRT(3.)/2. * (-5.4) + 1./3. * DSO(0)
1071 D2VU(1) = -SQRT(3.)/2. * DW
+ 1./3. * DSO(1)
1072 D2VSU(0) = -SQRT(3.)/2. * (-5.4) - 1./6. * DSO(0)
1073 D2VSU(1) = -SQRT(3.)/2. * DW
- 1./6. * DSO(1)
1075 !!! In the calculation the deformation potentials are equal across the structure
1076 DVD(0)=DVD(1); DSD(0)=DSD(1); DVU(0)=DVU(1)
1077 DVSU(0)=DVSU(1); D2VU(0)=D2VU(1); D2VSU(0)=D2VSU(1)
1079 DSO(0) = VBH
- VBSO
; DSO(1) = VWH
- VWSO
1085 IF(STR_Action
.EQ
.0) THEN
1086 VBIEL
= ACW
*(BISUM
+BIZZ
)
1087 VBIHH
= AVW
*(BISUM
+BIZZ
)-(-3.E0
*BW
/2.E0
)/3.E0
*(BISUM
-2.E0
*BIZZ
)
1088 VBILH
= AVW
*(BISUM
+BIZZ
)+(-3.E0
*BW
/2.E0
)/3.E0
*(BISUM
-2.E0
*BIZZ
)
1089 VBISO
= AVW
*(BISUM
+BIZZ
)
1091 ! Potential edges including strain effect
1095 POTWSO
= (VWSO
+VBISO
)
1098 POTE(0) = VBE
; POTE(1) = POTWE
1099 POTHH(0) = VBH
; POTHH(1) = POTWHH
1100 POTLH(0) = VBH
; POTLH(1) = POTWLH
1101 POTSO(0) = VBSO
; POTSO(1) = POTWSO
1105 END SUBROUTINE ENER_CONSTANTS_ZB
1107 SUBROUTINE POT_CALC_CAR_ZB(CHI
,ENERGY
)
1110 REAL, DIMENSION(:) :: ENERGY
1111 INTEGER, PARAMETER :: DIMM
=6
1112 COMPLEX, DIMENSION(1:DIMM
,1:DIMM
) :: HKANE
1113 REAL :: SXX
,SYY
,SZZ
,SXY
,SXZ
,SYZ
,SHID
,SDIF
,STIL
1115 !! DIAGONALIZATION VARIABLES
1117 COMPLEX, DIMENSION(1:(2*DIMM
-1)) :: WORK
1118 REAL, DIMENSION(1:(3*DIMM
-2)) :: RWORK
1119 REAL W(1:DIMM
), ROOT(DIMM
), CARAC(DIMM
)
1123 IF(STR_Action
.EQ
.0) THEN
1124 SXX
=0.E0
; SYY
=0.E0
; SZZ
=0.E0
1125 SXY
=0.E0
; SXZ
=0.E0
; SYZ
=0.E0
1127 SXX
=EXX(I_X
,I_Y
,I_Z
)
1128 SYY
=EYY(I_X
,I_Y
,I_Z
)
1129 SZZ
=EZZ(I_X
,I_Y
,I_Z
)
1130 SXY
=EXY(I_X
,I_Y
,I_Z
)
1131 SXZ
=EXZ(I_X
,I_Y
,I_Z
)
1132 SYZ
=EYZ(I_X
,I_Y
,I_Z
)
1135 STIL
=SXX
+SYY
-2.E0
*SZZ
1138 HKANE(1,1)=POTHH(CHI
)+DVD(CHI
)*SHID
&
1139 -1./3.*DVU(CHI
)*STIL
1140 HKANE(2,2)=POTLH(CHI
)+DVD(CHI
)*SHID
&
1141 +1./3.*DVU(CHI
)*STIL
1142 HKANE(3,3)=HKANE(2,2)
1143 HKANE(4,4)=HKANE(1,1)
1144 HKANE(5,5)=POTSO(CHI
)+DSD(CHI
)*SHID
1146 HKANE(6,6)=HKANE(5,5)
1148 IF(DIAG_Action
.NE
.0.AND
.STR_Action
.NE
.0) THEN
1150 HKANE(1,2)=2./SQRT(3.)*D2VU(CHI
)*CMPLX(SXZ
,-SYZ
)
1151 HKANE(1,3)=1./SQRT(3.)*CMPLX(DVU(CHI
)*SDIF
,-2.E0
*D2VU(CHI
)*SXY
)
1153 HKANE(1,5)=-SQRT(2./3.)*D2VSU(CHI
)*CMPLX(SXZ
,-SYZ
)
1154 HKANE(1,6)=-SQRT(2./3.)*CMPLX(DVU(CHI
)*SDIF
,-2.E0
*D2VSU(CHI
)*SXY
)
1157 HKANE(2,4)=HKANE(1,3)
1158 HKANE(2,5)=-SQRT(2.)/3.*DVSU(CHI
)*STIL
1159 HKANE(2,6)=SQRT(2.)*D2VSU(CHI
)*CMPLX(SXZ
,-SYZ
)
1161 HKANE(3,4)=-HKANE(1,2)
1162 HKANE(3,5)=SQRT(2.)*D2VSU(CHI
)*CMPLX(SXZ
,SYZ
)
1163 HKANE(3,6)=-HKANE(2,5)
1165 HKANE(4,5)=SQRT(2./3.)*CMPLX(DVU(CHI
)*SDIF
,2.E0
*D2VSU(CHI
)*SXY
)
1166 HKANE(4,6)=-HKANE(3,5)/SQRT(3.E0
)
1172 HKANE(J
,I
)=CONJG(HKANE(I
,J
))
1176 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1177 !! Analytic solutions for Rho = 0.
1178 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1180 ! ZETA = ZMIN+ZINC*IZ ! XZ normalized to ZC
1182 ! W(1)=(HKANE(2,2)+HKANE(5,5))+
1183 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
1184 ! W(2)=(HKANE(2,2)+HKANE(5,5))-
1185 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
1186 ! write(24,'(4(f18.8,1x))')ZETA,HKANE(1,1),W(1)/2.,W(2)/2.
1188 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1190 CALL CHEEV('V','U',DIMM
,HKANE
,DIMM
,W
,WORK
,LWORK
,RWORK
,INFO
)
1193 write(6,*)"Not Succesful Exit. Stopping. INFO=",INFO
1194 write(6,'(2(A,F6.3,1X))')"RHO=",RC
*RHO
,"ZETA=",ZETA
*ZC
1198 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1199 !! Ordering Eigenvalues according to the Bloch func. caracter
1200 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1205 ! Calculo de la componentes dependientes del spin
1207 CARAC(J
)=HKANE(J
,I
)*HKANE(J
,I
)
1209 ! Suma de componentes independientemente del spin (hh_up + hh_dw, lh_up + lh_dw)
1210 CARAC(1)=CARAC(1)+CARAC(4)
1212 CARAC(2)=CARAC(2)+CARAC(3)
1214 CARAC(5)=CARAC(5)+CARAC(6)
1217 ! Peso de las componentes de las que se extraeran los autovalores.
1219 IF (CARAC(1).GE
.CARAC_MAX
) THEN ! HH
1222 IF (CARAC(2).GE
.CARAC_MAX
) THEN ! LH
1225 IF (CARAC(5).GE
.CARAC_MAX
) THEN ! SO
1231 ELSE ! Only the diagonal elements were calculated
1236 ROOT(2)=HKANE(6,6) !Redundant
1241 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1243 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1245 ENERGY(1) = POTE(CHI
)+ZBC1(CHI
)*SHID
1254 ! ENERGY(7) = CHI ! To save the Structure-profile
1256 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1257 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1258 !!!!! Calculation of the Elastic Energy. Since EEL contains no information
1259 !!!!! we will use this array to pack the Elastic Energy.
1261 !!!!! U=1/2*(XLAMB*Tr(e)**2+XMU/2*(err**2+e00**2+ezz**2+erz**2)
1263 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1264 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1266 ENERGY(8) = XMU
*(SXX
**2 + SYY
**2 + SZZ
**2 + &
1267 2.E0
*(SXY
**2+SXZ
**2+SYZ
**2) ) + &
1268 XLAMB
/2.E0
*(SXX
+ SYY
+ SZZ
)**2
1271 END SUBROUTINE POT_CALC_CAR_ZB
1273 SUBROUTINE POT_CALC_CYL_ZB(CHI
,ENERGY
)
1276 REAL, DIMENSION(:) :: ENERGY
1277 INTEGER, PARAMETER :: DIMM
=6
1278 REAL, DIMENSION(1:DIMM
,1:DIMM
) :: HKANE
1279 REAL :: SSUM
,SDIF
,SZZ
,SRZ
,SRR
,S00
,SHID
,STIL
1281 !! DIAGONALIZATION VARIABLES
1283 REAL :: W(1:DIMM
), WORK(1:10*DIMM
), AW(1:DIMM
,1:DIMM
), &
1284 ROOT(DIMM
), CARAC(DIMM
), SLAMCH
1285 INTEGER :: IWORK(DIMM
*5), IFAIL(DIMM
), INFO
, NUM
1288 IF(STR_Action
.EQ
.0) THEN
1289 SSUM
=0.E0
; SDIF
=0.E0
; SZZ
=0.E0
;
1290 SRZ
=0.E0
; SRR
=0.E0
; S00
=0.E0
1292 SRR
=EXX(I_X
,I_Y
,I_Z
)
1293 S00
=EYY(I_X
,I_Y
,I_Z
)
1294 SSUM
=EXX(I_X
,I_Y
,I_Z
)+EYY(I_X
,I_Y
,I_Z
)
1295 SDIF
=EXX(I_X
,I_Y
,I_Z
)-EYY(I_X
,I_Y
,I_Z
)
1296 SZZ
=EZZ(I_X
,I_Y
,I_Z
)
1297 SRZ
=EXZ(I_X
,I_Y
,I_Z
)
1302 HKANE(1,1)=POTHH(CHI
)+DVD(CHI
)*SHID
&
1303 -1./3.*DVU(CHI
)*STIL
1304 HKANE(2,2)=POTLH(CHI
)+DVD(CHI
)*SHID
&
1305 +1./3.*DVU(CHI
)*STIL
1307 HKANE(3,3)=HKANE(2,2)
1308 HKANE(4,4)=HKANE(1,1)
1309 HKANE(5,5)=POTSO(CHI
)+DSD(CHI
)*SHID
1310 HKANE(6,6)=HKANE(5,5)
1312 IF(DIAG_Action
.NE
.0.AND
.STR_Action
.NE
.0) THEN
1313 HKANE(1,2)=2./SQRT(3.)*D2VU(CHI
)*SRZ
1314 HKANE(1,3)=1./SQRT(3.)*(DVU(CHI
)+D2VU(CHI
))/2.*SDIF
1316 HKANE(1,5)=-SQRT(2./3.)*D2VSU(CHI
)*SRZ
1317 HKANE(1,6)=-SQRT(2./3.)*(DVU(CHI
)+D2VSU(CHI
))/2.*SDIF
1320 HKANE(2,4)=HKANE(1,3)
1321 HKANE(2,5)=-SQRT(2.)/3.*DVSU(CHI
)*STIL
1322 HKANE(2,6)=SQRT(2.)*D2VSU(CHI
)*SRZ
1324 HKANE(3,4)=-HKANE(1,2)
1325 HKANE(3,5)=HKANE(2,6)
1326 HKANE(3,6)=-HKANE(2,5)
1328 HKANE(4,5)=-HKANE(1,6)
1329 HKANE(4,6)=HKANE(1,5)
1335 HKANE(J
,I
)=HKANE(I
,J
)
1339 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1340 !! Analytic solutions for Rho = 0.
1341 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1343 ! ZETA = ZMIN+ZINC*IZ ! XZ normalized to ZC
1345 ! W(1)=(HKANE(2,2)+HKANE(5,5))+
1346 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
1347 ! W(2)=(HKANE(2,2)+HKANE(5,5))-
1348 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
1349 ! write(24,'(4(f18.8,1x))')ZETA,HKANE(1,1),W(1)/2.,W(2)/2.
1351 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1354 CALL DSYEVX('V','A','U',DIMM
,HKANE
,DIMM
,0.,0.,2,2, &
1355 2*SLAMCH('S'),NUM
,W
,AW
,DIMM
,WORK
,10*DIMM
,IWORK
,IFAIL
,INFO
)
1358 write(6,*)"Not Succesful Exit. Stopping. INFO=",INFO
1359 write(6,'(A,10(I2,1X))')"IFAIL=",IFAIL(1:DIMM
)
1360 write(6,'(2(A,F6.3,1X))')"RHO=",RC
*RHO
,"ZETA=",ZETA
*ZC
1364 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1365 !! Ordering Eigenvalues according to the Bloch func. caracter
1366 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1371 ! Calculo de la componentes dependientes del spin
1373 CARAC(J
)=AW(J
,I
)*AW(J
,I
)
1375 ! Suma de componentes independientemente del spin (hh_up + hh_dw, lh_up + lh_dw)
1376 CARAC(1)=CARAC(1)+CARAC(4)
1378 CARAC(2)=CARAC(2)+CARAC(3)
1380 CARAC(5)=CARAC(5)+CARAC(6)
1383 ! Peso de las componentes de las que se extraeran los autovalores.
1385 IF (CARAC(1).GE
.CARAC_MAX
) THEN ! HH
1388 IF (CARAC(2).GE
.CARAC_MAX
) THEN ! LH
1391 IF (CARAC(5).GE
.CARAC_MAX
) THEN ! SO
1397 ELSE ! Only the diagonal elements were calculated
1402 ROOT(2)=HKANE(6,6) !Redundant
1407 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1409 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1411 ENERGY(1) = POTE(CHI
)+ZBC1(CHI
)*SHID
1420 ! ESODW(IR,IZ,IGEO) = CHI ! To save the Structure-profile
1422 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1423 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1424 !!!!! Calculation of the Elastic Energy. Since EEL contains no information
1425 !!!!! we will use this array to pack the Elastic Energy.
1427 !!!!! U=1/2*XLAMB*Tr(e)**2+XMU*(err**2+e00**2+ezz**2+erz**2)
1429 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1430 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1432 ENERGY(8) = XMU
*(SRR
**2 + S00
**2 + SZZ
**2 + SRZ
**2) + &
1433 XLAMB
/2.E0
*(SSUM
+ SZZ
)**2
1437 END SUBROUTINE POT_CALC_CYL_ZB
1439 END SUBROUTINE POTENTIAL_ZB