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
)
224 POTE(0) = POTBE
; POTE(1) = POTWE
225 POTHH(0) = POTBHH
; POTHH(1) = POTWHH
226 POTLH(0) = POTBLH
; POTLH(1) = POTWLH
227 POTLS(0) = POTBLS
; POTLS(1) = POTWLS
228 POTSO(0) = POTBSO
; POTSO(1) = POTWSO
230 !!!! Deformation potentials for barrier and well are equal
232 PC1(0) = C1
; PC1(1) = C1
233 PC2(0) = C2
; PC2(1) = C2
234 PD1(0) = D1
; PD1(1) = D1
235 PD2(0) = D2
; PD2(1) = D2
236 PD3(0) = D3
; PD3(1) = D3
237 PD4(0) = D4
; PD4(1) = D4
238 PD5(0) = D5
; PD5(1) = D5
239 PD6(0) = D6
; PD6(1) = D6
243 END SUBROUTINE ENER_CONSTANTS_WZ
245 SUBROUTINE POT_CALC_CAR_CH_WZ(CHI
,ENERGY
)
248 REAL, DIMENSION(:) :: ENERGY
249 INTEGER, PARAMETER :: DIMM
=6
250 COMPLEX, DIMENSION(1:DIMM
,1:DIMM
) :: HKANE
251 REAL :: SXX
,SYY
,SZZ
,SXY
,SXZ
,SYZ
,PZO
253 !! DIAGONALIZATION VARIABLES
255 COMPLEX, DIMENSION(1:(2*DIMM
-1)) :: WORK
256 REAL, DIMENSION(1:(3*DIMM
-2)) :: RWORK
257 REAL W(1:DIMM
), ROOT(DIMM
), CARAC(DIMM
)
262 IF(STR_Action
.EQ
.0) THEN
263 SXX
=0.E0
; SYY
=0.E0
; SZZ
=0.E0
264 SXY
=0.E0
; SXZ
=0.E0
; SYZ
=0.E0
273 IF(PZO_Action
.EQ
.0.E0
) THEN
279 HKANE(1,1)=POTHH(CHI
)-PZO
+ &
280 (PD1(CHI
)+PD3(CHI
))*SZZ
+(PD2(CHI
)+PD4(CHI
))*(SXX
+SYY
)
282 HKANE(2,2)=POTLH(CHI
)-PZO
+ &
283 (PD1(CHI
)+PD3(CHI
))*SZZ
+(PD2(CHI
)+PD4(CHI
))*(SXX
+SYY
)
285 HKANE(3,3)=POTSO(CHI
)-PZO
+ &
286 (PD1(CHI
))*SZZ
+(PD2(CHI
))*(SXX
+SYY
)
288 HKANE(4,4)=HKANE(1,1)
289 HKANE(5,5)=HKANE(2,2)
290 HKANE(6,6)=HKANE(3,3)
292 IF(DIAG_Action
.NE
.0.AND
.STR_Action
.NE
.0) THEN
294 HKANE(1,2)=-PD5(CHI
)*CMPLX(SXX
-SYY
,-2.E0
*SXY
)
295 HKANE(1,3)=-PD6(CHI
)*CMPLX(SXZ
,-SYZ
)
300 HKANE(2,3)=PD6(CHI
)*CMPLX(SXZ
,+SYZ
)
303 HKANE(2,6)= SQRT(2.E0
)*POTLS(CHI
)
306 HKANE(3,5)= SQRT(2.E0
)*POTLS(CHI
)
309 HKANE(4,5)=-PD5(CHI
)*CMPLX(SXX
-SYY
,2.E0
*SXY
)
310 HKANE(4,6)=HKANE(2,3)
311 HKANE(5,6)=HKANE(1,3)
317 HKANE(J
,I
)=CONJG(HKANE(I
,J
))
321 CALL CHEEV('V','U',DIMM
,HKANE
,DIMM
,W
,WORK
,LWORK
,RWORK
,INFO
)
324 write(6,*)"Not Succesful Exit. Stopping. INFO=",INFO
325 write(6,'(2(A,F6.3,1X))')"RHO=",RC
*RHO
,"ZETA=",ZETA
*ZC
329 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
330 !! Ordering Eigenvalues according to the Bloch func. caracter
331 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
336 ! Calculo de la componentes dependientes del spin
338 CARAC(J
)=HKANE(J
,I
)*HKANE(J
,I
)
340 ! Suma de componentes independientemente del spin (hh_up + hh_dw, lh_up + lh_dw)
341 CARAC(1)=CARAC(1)+CARAC(4)
343 CARAC(2)=CARAC(2)+CARAC(5)
345 CARAC(3)=CARAC(3)+CARAC(6)
348 ! Peso de las componentes de las que se extraeran los autovalores.
350 IF (CARAC(1).GE
.CARAC_MAX
) THEN ! HH
353 IF (CARAC(2).GE
.CARAC_MAX
) THEN ! LH
356 IF (CARAC(3).GE
.CARAC_MAX
) THEN ! SO
362 ELSE ! Only the diagonal elements are calculated
367 ROOT(2)=HKANE(6,6) !Redundant
372 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
374 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
376 ENERGY(1) = POTE(CHI
)-PZO
+(PC1(CHI
)*SZZ
+PC2(CHI
)*(SXX
+SYY
))
385 ! ENERGY(7) = CHI ! To save the Structure-profile
387 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
388 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
389 !!!!! Calculation of the Elastic Energy. Since EEL contains no information
390 !!!!! we will use this array to pack the Elastic Energy.
392 !!!!! U=1/2*XLAMB*Tr(e)**2+XMU*(err**2+e00**2+ezz**2+erz**2)
394 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
395 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
397 ENERGY(8) = C11
*(SXX
**2 + SYY
**2)+C33
*SZZ
**2+ &
398 2.E0
*(XLAMB
*(SXX
*SYY
)+C13
*(SXX
+SYY
)*SZZ
+ &
399 (C11
-XLAMB
)*SXY
**2+2.E0
*XMU
*(SXZ
**2+SYZ
**2))
401 ENERGY(8) = ENERGY(8)/2.E0
405 END SUBROUTINE POT_CALC_CAR_CH_WZ
407 SUBROUTINE POT_CALC_CYL_CH_WZ(CHI
,ENERGY
)
410 REAL, DIMENSION(:) :: ENERGY
411 INTEGER, PARAMETER :: DIMM
=6
412 REAL, DIMENSION(1:DIMM
,1:DIMM
) :: HKANE
414 REAL :: SSUM
,SDIF
,SZZ
,SRZ
,SRR
,S00
416 !! DIAGONALIZATION VARIABLES
418 REAL :: W(1:DIMM
), WORK(1:10*DIMM
), AW(1:DIMM
,1:DIMM
), &
419 ROOT(DIMM
), CARAC(DIMM
), SLAMCH
420 INTEGER :: IWORK(DIMM
*5), IFAIL(DIMM
), INFO
, NUM
422 IF(STR_Action
.EQ
.0) THEN
423 SSUM
=0.E0
; SDIF
=0.E0
; SZZ
=0.E0
;
424 SRZ
=0.E0
; SRR
=0.E0
; S00
=0.E0
427 !!! FOR CYLINDRICAL COORDINATES WE CALCULATE ONLY THE X-Z PLANE,
428 !!! THAT MEANS: THETA=0
432 SSUM
=EXX(I_X
,I_Y
,I_Z
)+EYY(I_X
,I_Y
,I_Z
)
433 SDIF
=EXX(I_X
,I_Y
,I_Z
)-EYY(I_X
,I_Y
,I_Z
)
437 IF(PZO_Action
.EQ
.0.E0
) THEN
443 HKANE(1,1)=POTHH(CHI
)-PZO
+ &
444 (PD1(CHI
)+PD3(CHI
))*SZZ
+(PD2(CHI
)+PD4(CHI
))*SSUM
446 HKANE(2,2)=POTLH(CHI
)-PZO
+ &
447 (PD1(CHI
)+PD3(CHI
))*SZZ
+(PD2(CHI
)+PD4(CHI
))*SSUM
449 HKANE(3,3)=POTSO(CHI
)-PZO
+ &
450 PD1(CHI
)*SZZ
+PD2(CHI
)*SSUM
452 HKANE(4,4)=HKANE(1,1)
453 HKANE(5,5)=HKANE(2,2)
454 HKANE(6,6)=HKANE(3,3)
456 IF(DIAG_Action
.NE
.0.AND
.STR_Action
.NE
.0) THEN
459 HKANE(1,2)=-PD5(CHI
)*SDIF
460 HKANE(1,3)=-PD6(CHI
)*SRZ
465 HKANE(2,3)=PD6(CHI
)*SRZ
468 HKANE(2,6)= SQRT(2.E0
)*POTLS(CHI
)
471 HKANE(3,5)= SQRT(2.E0
)*POTLS(CHI
)
474 HKANE(4,5)=-PD5(CHI
)*SDIF
475 HKANE(4,6)=HKANE(2,3)
476 HKANE(5,6)=HKANE(1,3)
480 HKANE(J
,I
)=HKANE(I
,J
)
484 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
485 !! Analytic solutions for Rho = 0.
486 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
488 ! ZETA = ZMIN+ZINC*IZ ! XZ normalized to ZC
490 ! W(1)=(HKANE(2,2)+HKANE(5,5))+
491 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
492 ! W(2)=(HKANE(2,2)+HKANE(5,5))-
493 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
494 ! write(24,'(4(f18.8,1x))')ZETA,HKANE(1,1),W(1)/2.,W(2)/2.
496 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
499 CALL DSYEVX('V','A','U',DIMM
,HKANE
,DIMM
,0.,0.,2,2, &
500 2*SLAMCH('S'),NUM
,W
,AW
,DIMM
,WORK
,10*DIMM
,IWORK
,IFAIL
,INFO
)
503 write(6,*)"Not Succesful Exit. Stopping. INFO=",INFO
504 write(6,'(A,10(I2,1X))')"IFAIL=",IFAIL(1:DIMM
)
505 write(6,'(2(A,F6.3,1X))')"RHO=",RC
*RHO
,"ZETA=",ZETA
*ZC
509 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
510 !! Ordering Eigenvalues according to the Bloch func. caracter
511 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
516 ! Calculo de la componentes dependientes del spin
518 CARAC(J
)=AW(J
,I
)*AW(J
,I
)
520 ! Suma de componentes independientemente del spin (hh_up + hh_dw, lh_up + lh_dw)
521 CARAC(1)=CARAC(1)+CARAC(4)
523 CARAC(2)=CARAC(2)+CARAC(5)
525 CARAC(3)=CARAC(3)+CARAC(6)
528 ! Peso de las componentes de las que se extraeran los autovalores.
530 IF (CARAC(1).GE
.CARAC_MAX
) THEN ! HH
533 IF (CARAC(2).GE
.CARAC_MAX
) THEN ! LH
536 IF (CARAC(3).GE
.CARAC_MAX
) THEN ! SO
542 ELSE ! Only the diagonal elements are calculated
547 ROOT(2)=HKANE(6,6) !Redundant
551 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
553 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
555 ENERGY(1) = POTE(CHI
)-PZO
+(PC1(CHI
)*SZZ
+PC2(CHI
)*SSUM
)
564 ! ESODW(IR,IZ,IGEO) = CHI ! To save the Structure-profile
566 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
567 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
568 !!!!! Calculation of the Elastic Energy. Since EEL contains no information
569 !!!!! we will use this array to pack the Elastic Energy.
571 !!!!! U=1/2*XLAMB*Tr(e)**2+XMU*(err**2+e00**2+ezz**2+erz**2)
573 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
574 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
577 ENERGY(8) = C11
*(SRR
**2 + S00
**2)+C33
*SZZ
**2+ &
578 2.E0
*(XLAMB
*(SRR
*S00
)+C13
*(SRR
+S00
)*SZZ
+ &
581 ENERGY(8) = ENERGY(8)/2.E0
585 END SUBROUTINE POT_CALC_CYL_CH_WZ
587 SUBROUTINE POT_CALC_CAR_WZ(CHI
,ENERGY
)
590 REAL, DIMENSION(:) :: ENERGY
591 INTEGER, PARAMETER :: DIMM
=6
592 COMPLEX, DIMENSION(1:DIMM
,1:DIMM
) :: HKANE
593 REAL :: SXX
,SYY
,SZZ
,SXY
,SXZ
,SYZ
,PZO
595 !! DIAGONALIZATION VARIABLES
597 COMPLEX, DIMENSION(1:(2*DIMM
-1)) :: WORK
598 REAL, DIMENSION(1:(3*DIMM
-2)) :: RWORK
599 REAL W(1:DIMM
), ROOT(DIMM
), CARAC(DIMM
)
604 IF(STR_Action
.EQ
.0) THEN
605 SXX
=0.E0
; SYY
=0.E0
; SZZ
=0.E0
606 SXY
=0.E0
; SXZ
=0.E0
; SYZ
=0.E0
615 IF(PZO_Action
.EQ
.0.E0
) THEN
621 HKANE(1,1)=POTHH(CHI
)-PZO
+ &
622 (PD1(CHI
)+PD3(CHI
))*SZZ
+(PD2(CHI
)+PD4(CHI
))*(SXX
+SYY
)
624 HKANE(2,2)=POTLH(CHI
)-PZO
+(PD1(CHI
)+PD3(CHI
)/3.E0
)*SZZ
+ &
625 (PD2(CHI
)+PD4(CHI
)/3.E0
)*(SXX
+SYY
)
626 HKANE(3,3)=HKANE(2,2)
627 HKANE(4,4)=HKANE(1,1)
628 HKANE(5,5)=POTSO(CHI
)-PZO
+(PD1(CHI
)+2.E0
*PD3(CHI
)/3.E0
)*SZZ
+ &
629 (PD2(CHI
)+2.E0
*PD4(CHI
)/3.E0
)*(SXX
+SYY
)
630 HKANE(6,6)=HKANE(5,5)
632 IF(DIAG_Action
.NE
.0.AND
.STR_Action
.NE
.0) THEN
634 HKANE(1,2)=-SQRT(2.E0
/3.E0
)*PD6(CHI
)*CMPLX(SXZ
,-SYZ
)
635 HKANE(1,3)=-1.E0
/SQRT(3.E0
)*PD5(CHI
)*CMPLX(SXX
-SYY
,-2.E0
*SXY
)
637 HKANE(1,5)=1.E0
/SQRT(3.E0
)*PD6(CHI
)*CMPLX(SXZ
,-SYZ
)
638 HKANE(1,6)=SQRT(2./3.)*PD5(CHI
)*CMPLX(SXX
-SYY
,-2.E0
*SXY
)
641 HKANE(2,4)=HKANE(1,3)
642 HKANE(2,5)=SQRT(2.E0
)/3.E0
*( POTLS(CHI
)+&
643 (PD3(CHI
)*SZZ
+PD4(CHI
)*(SXX
+SYY
)) )
644 HKANE(2,6)=-PD6(CHI
)*CMPLX(SXZ
,-SYZ
)
646 HKANE(3,4)=-HKANE(1,2)
647 HKANE(3,5)=-PD6(CHI
)*CMPLX(SXZ
,SYZ
)
648 HKANE(3,6)=-HKANE(2,5)
650 HKANE(4,5)=-SQRT(2./3.)*PD5(CHI
)*CMPLX(SXX
-SYY
,+2.E0
*SXY
)
651 HKANE(4,6)=PD6(CHI
)*CMPLX(SXZ
,SYZ
)/SQRT(3.E0
)
659 HKANE(J
,I
)=CONJG(HKANE(I
,J
))
663 CALL CHEEV('V','U',DIMM
,HKANE
,DIMM
,W
,WORK
,LWORK
,RWORK
,INFO
)
666 write(6,*)"Not Succesful Exit. Stopping. INFO=",INFO
667 write(6,'(2(A,F6.3,1X))')"RHO=",RC
*RHO
,"ZETA=",ZETA
*ZC
671 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
672 !! Ordering Eigenvalues according to the Bloch func. caracter
673 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
678 ! Calculo de la componentes dependientes del spin
680 CARAC(J
)=HKANE(J
,I
)*HKANE(J
,I
)
682 ! Suma de componentes independientemente del spin (hh_up + hh_dw, lh_up + lh_dw)
683 CARAC(1)=CARAC(1)+CARAC(4)
685 CARAC(2)=CARAC(2)+CARAC(3)
687 CARAC(5)=CARAC(5)+CARAC(6)
690 ! Peso de las componentes de las que se extraeran los autovalores.
692 IF (CARAC(1).GE
.CARAC_MAX
) THEN ! HH
695 IF (CARAC(2).GE
.CARAC_MAX
) THEN ! LH
698 IF (CARAC(5).GE
.CARAC_MAX
) THEN ! SO
704 ELSE ! Only the diagonal elements were calculated
709 ROOT(2)=HKANE(6,6) !Redundant
714 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
716 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
718 ENERGY(1) = POTE(CHI
)-PZO
+(PC1(CHI
)*SZZ
+PC2(CHI
)*(SXX
+SYY
))
727 ! ENERGY(7) = CHI ! To save the Structure-profile
729 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
730 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
731 !!!!! Calculation of the Elastic Energy. Since EEL contains no information
732 !!!!! we will use this array to pack the Elastic Energy.
734 !!!!! U=1/2*XLAMB*Tr(e)**2+XMU*(err**2+e00**2+ezz**2+erz**2)
736 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
737 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
739 ENERGY(8) = C11
*(SXX
**2 + SYY
**2)+C33
*SZZ
**2+ &
740 2.E0
*(XLAMB
*(SXX
*SYY
)+C13
*(SXX
+SYY
)*SZZ
+ &
741 (C11
-XLAMB
)*SXY
**2+2.E0
*XMU
*(SXZ
**2+SYZ
**2))
743 ENERGY(8) = ENERGY(8)/2.E0
747 END SUBROUTINE POT_CALC_CAR_WZ
749 SUBROUTINE POT_CALC_CYL_WZ(CHI
,ENERGY
)
752 REAL, DIMENSION(:) :: ENERGY
753 INTEGER, PARAMETER :: DIMM
=6
754 REAL, DIMENSION(1:DIMM
,1:DIMM
) :: HKANE
756 REAL :: SSUM
,SDIF
,SZZ
,SRZ
,SRR
,S00
758 !! DIAGONALIZATION VARIABLES
760 REAL :: W(1:DIMM
), WORK(1:10*DIMM
), AW(1:DIMM
,1:DIMM
), &
761 ROOT(DIMM
), CARAC(DIMM
), SLAMCH
762 INTEGER :: IWORK(DIMM
*5), IFAIL(DIMM
), INFO
, NUM
764 IF(STR_Action
.EQ
.0) THEN
765 SSUM
=0.E0
; SDIF
=0.E0
; SZZ
=0.E0
;
766 SRZ
=0.E0
; SRR
=0.E0
; S00
=0.E0
769 !!! FOR CYLINDRICAL COORDINATES WE CALCULATE ONLY THE X-Z PLANE,
770 !!! THAT MEANS: THETA=0
774 SSUM
=EXX(I_X
,I_Y
,I_Z
)+EYY(I_X
,I_Y
,I_Z
)
775 SDIF
=EXX(I_X
,I_Y
,I_Z
)-EYY(I_X
,I_Y
,I_Z
)
779 IF(PZO_Action
.EQ
.0.E0
) THEN
785 HKANE(1,1)=POTHH(CHI
)-PZO
+ &
786 (PD1(CHI
)+PD3(CHI
))*SZZ
+(PD2(CHI
)+PD4(CHI
))*SSUM
788 HKANE(2,2)=POTLH(CHI
)-PZO
+(PD1(CHI
)+PD3(CHI
)/3.E0
)*SZZ
+ &
789 (PD2(CHI
)+PD4(CHI
)/3.E0
)*SSUM
790 HKANE(3,3)=HKANE(2,2)
791 HKANE(4,4)=HKANE(1,1)
792 HKANE(5,5)=POTSO(CHI
)-PZO
+(PD1(CHI
)+2.E0
*PD3(CHI
)/3.E0
)*SZZ
+ &
793 (PD2(CHI
)+2.E0
*PD4(CHI
)/3.E0
)*SSUM
794 HKANE(6,6)=HKANE(5,5)
796 IF(DIAG_Action
.NE
.0.AND
.STR_Action
.NE
.0) THEN
798 HKANE(1,2)=-SQRT(2.E0
/3.E0
)*PD6(CHI
)*SRZ
799 HKANE(1,3)=-1.E0
/SQRT(3.E0
)*PD5(CHI
)*SDIF
801 HKANE(1,5)=1.E0
/SQRT(3.E0
)*PD6(CHI
)*SRZ
802 HKANE(1,6)=SQRT(2./3.)*PD5(CHI
)*SDIF
805 HKANE(2,4)=HKANE(1,3)
806 HKANE(2,5)=SQRT(2.E0
)/3.E0
*(POTLS(CHI
)+(PD3(CHI
)*SZZ
+PD4(CHI
)*SSUM
))
807 HKANE(2,6)=-PD6(CHI
)*SRZ
809 HKANE(3,4)=-HKANE(1,2)
810 HKANE(3,5)=HKANE(2,6)
811 HKANE(3,6)=-HKANE(2,5)
813 HKANE(4,5)=-HKANE(1,6)
814 HKANE(4,6)=HKANE(1,5)
822 HKANE(J
,I
)=HKANE(I
,J
)
826 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
827 !! Analytic solutions for Rho = 0.
828 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
830 ! ZETA = ZMIN+ZINC*IZ ! XZ normalized to ZC
832 ! W(1)=(HKANE(2,2)+HKANE(5,5))+
833 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
834 ! W(2)=(HKANE(2,2)+HKANE(5,5))-
835 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
836 ! write(24,'(4(f18.8,1x))')ZETA,HKANE(1,1),W(1)/2.,W(2)/2.
838 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
841 CALL DSYEVX('V','A','U',DIMM
,HKANE
,DIMM
,0.,0.,2,2, &
842 2*SLAMCH('S'),NUM
,W
,AW
,DIMM
,WORK
,10*DIMM
,IWORK
,IFAIL
,INFO
)
845 write(6,*)"Not Succesful Exit. Stopping. INFO=",INFO
846 write(6,'(A,10(I2,1X))')"IFAIL=",IFAIL(1:DIMM
)
847 write(6,'(2(A,F6.3,1X))')"RHO=",RC
*RHO
,"ZETA=",ZETA
*ZC
851 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
852 !! Ordering Eigenvalues according to the Bloch func. caracter
853 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
858 ! Calculo de la componentes dependientes del spin
860 CARAC(J
)=AW(J
,I
)*AW(J
,I
)
862 ! Suma de componentes independientemente del spin (hh_up + hh_dw, lh_up + lh_dw)
863 CARAC(1)=CARAC(1)+CARAC(4)
865 CARAC(2)=CARAC(2)+CARAC(3)
867 CARAC(5)=CARAC(5)+CARAC(6)
870 ! Peso de las componentes de las que se extraeran los autovalores.
872 IF (CARAC(1).GE
.CARAC_MAX
) THEN ! HH
875 IF (CARAC(2).GE
.CARAC_MAX
) THEN ! LH
878 IF (CARAC(5).GE
.CARAC_MAX
) THEN ! SO
884 ELSE ! Only the diagonal elements were calculated
889 ROOT(2)=HKANE(6,6) !Redundant
894 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
896 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
898 ENERGY(1) = POTE(CHI
)-PZO
+(PC1(CHI
)*SZZ
+PC2(CHI
)*SSUM
)
907 ! ESODW(IR,IZ,IGEO) = CHI ! To save the Structure-profile
909 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
910 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
911 !!!!! Calculation of the Elastic Energy. Since EEL contains no information
912 !!!!! we will use this array to pack the Elastic Energy.
914 !!!!! U=1/2*XLAMB*Tr(e)**2+XMU*(err**2+e00**2+ezz**2+erz**2)
916 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
917 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
920 ENERGY(8) = C11
*(SRR
**2 + S00
**2)+C33
*SZZ
**2+ &
921 2.E0
*(XLAMB
*(SRR
*S00
)+C13
*(SRR
+S00
)*SZZ
+ &
924 ENERGY(8) = ENERGY(8)/2.E0
928 END SUBROUTINE POT_CALC_CYL_WZ
930 END SUBROUTINE POTENTIAL_WZ
932 SUBROUTINE POTENTIAL_ZB(EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
933 ESOUP
,ESODW
,ELAST
,EXX
,EYY
,&
939 Use Auxiliar_Procedures
, ONLY
: AISO
943 !!!!! 'dummy' and local variables !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
945 REAL,DIMENSION(:,:,:),OPTIONAL
:: EXX
,EYY
,EZZ
,EXY
,EXZ
,EYZ
947 REAL,DIMENSION(:,:,:) :: EEL
,EHHUP
,EHHDW
,ELHUP
,ELHDW
,&
950 REAL ZM
,THETA
,CTHETA
,STHETA
, &
953 INTEGER I_X
,I_Y
,I_Z
,I_N1
,I_N2
,I_N3
,CHI
955 REAL, DIMENSION(3) :: R_SL
,X_VEC
,XI_VEC
957 REAL :: POTWE
,POTWHH
,POTWLH
,POTWSO
,&
958 VBIEL
,VBIHH
,VBILH
,VBISO
960 REAL,DIMENSION(0:1) :: POTE
, POTHH
, POTLH
, POTSO
, &
961 DVD
,DSD
,DVU
,DVSU
,D2VU
,D2VSU
,DSO
,ZBC1
963 REAL, DIMENSION(1:8) :: ENERGY
965 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
967 CALL ENER_CONSTANTS_ZB( )
970 ! WRITE(16,'(A,I3,A,I3)')"I_Z ",I_Z," of ",ZDIM
971 Z
=Z_Min
+REAL(I_Z
-1)*Z_Inc
973 Y
=Y_Min
+REAL(I_Y
-1)*Y_Inc
975 X
=X_Min
+REAL(I_X
-1)*X_Inc
979 I_N1
=0; I_N2
=0; I_N3
=0
981 R_SL
=REAL(I_N1
)*A1_S
+REAL(I_N2
)*A2_S
+REAL(I_N3
)*A3_S
985 RHO
=SQRT(XI_VEC(1)**2+XI_VEC(2)**2)/RC
986 IF(XI_VEC(1).EQ
.0.E0
.AND
.XI_VEC(2).EQ
.0.E0
) THEN
987 CTHETA
=1.E0
/SQRT(2.E0
); STHETA
=1.E0
/SQRT(2.E0
) ! It is not the Mathematical limit
989 THETA
=ATAN(XI_VEC(2)/XI_VEC(1))
990 CTHETA
=Cos(THETA
); STHETA
=Sin(THETA
)
995 CALL SHAPERTOZ(MIN(RHO
*RC
,Rqd_Base
),ZMAUX
)
1001 IF (abs(zeta
) .EQ
. 0.E0
.OR
. ZETA
.EQ
. ZM
) THEN
1006 IF (RHO
.LE
.RD
.AND
.ZETA
.GE
.-D
.AND
.ZETA
.LE
.ZM
) THEN
1008 IF(I_N1
.NE
.0.OR
.I_N2
.NE
.0.OR
.I_N3
.NE
.0) THEN
1009 WRITE(16,*)I_N1
,I_N2
,I_N3
1010 WRITE(16,*)X_VEC(3),ZETA
*ZC
,ZM
*ZC
1014 IF (KCOOR
.EQ
.0) THEN
1015 CALL POT_CALC_CAR_ZB(CHI
,ENERGY
)
1017 CALL POT_CALC_CYL_ZB(CHI
,ENERGY
)
1020 EEL(I_X
,I_Y
,I_Z
) = ENERGY(1)
1021 EHHUP(I_X
,I_Y
,I_Z
) = ENERGY(2)
1022 ELHUP(I_X
,I_Y
,I_Z
) = ENERGY(3)
1023 ELHDW(I_X
,I_Y
,I_Z
) = ENERGY(4)
1024 EHHDW(I_X
,I_Y
,I_Z
) = ENERGY(5)
1025 ESOUP(I_X
,I_Y
,I_Z
) = ENERGY(6)
1026 ESODW(I_X
,I_Y
,I_Z
) = ENERGY(7)
1027 ELAST(I_X
,I_Y
,I_Z
) = ENERGY(8)
1029 ! WRITE(26,'(10(E15.8,1X))')Z,ENERGY(1:8)
1041 SUBROUTINE ENER_CONSTANTS_ZB( )
1044 ! Definition of parameters for Barrier and Well
1046 ! If we set both terms equal to zero the spin-interaction in the
1047 ! deformation potentials is removed. The values of AVB,BB,DB are
1048 ! taken from C. Pryor, PRB, 57, 7190 (1998)
1050 ! DSO(0) = VBH - VBSO ; DSO(1) = VWH - VWSO
1051 DSO(0) = 0.0; DSO(1) = 0.0
1053 ZBC1(0) = -9.3 ; ZBC1(1) = ACW
1055 DVD(0) = 0.7E0
- 2./9. * DSO(0)
1056 DVD(1) = AVW
- 2./9. * DSO(1)
1057 DSD(0) = 0.7E0
+ 4./9. * DSO(0)
1058 DSD(1) = AVW
+ 4./9. * DSO(1)
1059 DVU(0) = -3./2. * (-2.0) + 1./3. * DSO(0)
1060 DVU(1) = -3./2. * BW
+ 1./3. * DSO(1)
1061 DVSU(0) = -3./2. * (-2.0) - 1./6. * DSO(0)
1062 DVSU(1) = -3./2. * BW
- 1./6. * DSO(1)
1063 D2VU(0) = -SQRT(3.)/2. * (-5.4) + 1./3. * DSO(0)
1064 D2VU(1) = -SQRT(3.)/2. * DW
+ 1./3. * DSO(1)
1065 D2VSU(0) = -SQRT(3.)/2. * (-5.4) - 1./6. * DSO(0)
1066 D2VSU(1) = -SQRT(3.)/2. * DW
- 1./6. * DSO(1)
1068 !!! In the calculation the deformation potentials are equal across the structure
1069 DVD(0)=DVD(1); DSD(0)=DSD(1); DVU(0)=DVU(1)
1070 DVSU(0)=DVSU(1); D2VU(0)=D2VU(1); D2VSU(0)=D2VSU(1)
1072 DSO(0) = VBH
- VBSO
; DSO(1) = VWH
- VWSO
1078 IF(STR_Action
.EQ
.0) THEN
1079 VBIEL
= ACW
*(BISUM
+BIZZ
)
1080 VBIHH
= AVW
*(BISUM
+BIZZ
)-(-3.E0
*BW
/2.E0
)/3.E0
*(BISUM
-2.E0
*BIZZ
)
1081 VBILH
= AVW
*(BISUM
+BIZZ
)+(-3.E0
*BW
/2.E0
)/3.E0
*(BISUM
-2.E0
*BIZZ
)
1082 VBISO
= AVW
*(BISUM
+BIZZ
)
1084 ! Potential edges including strain effect
1088 POTWSO
= (VWSO
+VBISO
)
1091 POTE(0) = VBE
; POTE(1) = POTWE
1092 POTHH(0) = VBH
; POTHH(1) = POTWHH
1093 POTLH(0) = VBH
; POTLH(1) = POTWLH
1094 POTSO(0) = VBSO
; POTSO(1) = POTWSO
1098 END SUBROUTINE ENER_CONSTANTS_ZB
1100 SUBROUTINE POT_CALC_CAR_ZB(CHI
,ENERGY
)
1103 REAL, DIMENSION(:) :: ENERGY
1104 INTEGER, PARAMETER :: DIMM
=6
1105 COMPLEX, DIMENSION(1:DIMM
,1:DIMM
) :: HKANE
1106 REAL :: SXX
,SYY
,SZZ
,SXY
,SXZ
,SYZ
,SHID
,SDIF
,STIL
1108 !! DIAGONALIZATION VARIABLES
1110 COMPLEX, DIMENSION(1:(2*DIMM
-1)) :: WORK
1111 REAL, DIMENSION(1:(3*DIMM
-2)) :: RWORK
1112 REAL W(1:DIMM
), ROOT(DIMM
), CARAC(DIMM
)
1116 IF(STR_Action
.EQ
.0) THEN
1117 SXX
=0.E0
; SYY
=0.E0
; SZZ
=0.E0
1118 SXY
=0.E0
; SXZ
=0.E0
; SYZ
=0.E0
1120 SXX
=EXX(I_X
,I_Y
,I_Z
)
1121 SYY
=EYY(I_X
,I_Y
,I_Z
)
1122 SZZ
=EZZ(I_X
,I_Y
,I_Z
)
1123 SXY
=EXY(I_X
,I_Y
,I_Z
)
1124 SXZ
=EXZ(I_X
,I_Y
,I_Z
)
1125 SYZ
=EYZ(I_X
,I_Y
,I_Z
)
1128 STIL
=SXX
+SYY
-2.E0
*SZZ
1131 HKANE(1,1)=POTHH(CHI
)+DVD(CHI
)*SHID
&
1132 -1./3.*DVU(CHI
)*STIL
1133 HKANE(2,2)=POTLH(CHI
)+DVD(CHI
)*SHID
&
1134 +1./3.*DVU(CHI
)*STIL
1135 HKANE(3,3)=HKANE(2,2)
1136 HKANE(4,4)=HKANE(1,1)
1137 HKANE(5,5)=POTSO(CHI
)+DSD(CHI
)*SHID
1139 HKANE(6,6)=HKANE(5,5)
1141 IF(DIAG_Action
.NE
.0.AND
.STR_Action
.NE
.0) THEN
1143 HKANE(1,2)=2./SQRT(3.)*D2VU(CHI
)*CMPLX(SXZ
,-SYZ
)
1144 HKANE(1,3)=1./SQRT(3.)*CMPLX(DVU(CHI
)*SDIF
,-2.E0
*D2VU(CHI
)*SXY
)
1146 HKANE(1,5)=-SQRT(2./3.)*D2VSU(CHI
)*CMPLX(SXZ
,-SYZ
)
1147 HKANE(1,6)=-SQRT(2./3.)*CMPLX(DVU(CHI
)*SDIF
,-2.E0
*D2VSU(CHI
)*SXY
)
1150 HKANE(2,4)=HKANE(1,3)
1151 HKANE(2,5)=-SQRT(2.)/3.*DVSU(CHI
)*STIL
1152 HKANE(2,6)=SQRT(2.)*D2VSU(CHI
)*CMPLX(SXZ
,-SYZ
)
1154 HKANE(3,4)=-HKANE(1,2)
1155 HKANE(3,5)=SQRT(2.)*D2VSU(CHI
)*CMPLX(SXZ
,SYZ
)
1156 HKANE(3,6)=-HKANE(2,5)
1158 HKANE(4,5)=SQRT(2./3.)*CMPLX(DVU(CHI
)*SDIF
,2.E0
*D2VSU(CHI
)*SXY
)
1159 HKANE(4,6)=-HKANE(3,5)/SQRT(3.E0
)
1165 HKANE(J
,I
)=CONJG(HKANE(I
,J
))
1169 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1170 !! Analytic solutions for Rho = 0.
1171 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1173 ! ZETA = ZMIN+ZINC*IZ ! XZ normalized to ZC
1175 ! W(1)=(HKANE(2,2)+HKANE(5,5))+
1176 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
1177 ! W(2)=(HKANE(2,2)+HKANE(5,5))-
1178 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
1179 ! write(24,'(4(f18.8,1x))')ZETA,HKANE(1,1),W(1)/2.,W(2)/2.
1181 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1183 CALL CHEEV('V','U',DIMM
,HKANE
,DIMM
,W
,WORK
,LWORK
,RWORK
,INFO
)
1186 write(6,*)"Not Succesful Exit. Stopping. INFO=",INFO
1187 write(6,'(2(A,F6.3,1X))')"RHO=",RC
*RHO
,"ZETA=",ZETA
*ZC
1191 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1192 !! Ordering Eigenvalues according to the Bloch func. caracter
1193 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1198 ! Calculo de la componentes dependientes del spin
1200 CARAC(J
)=HKANE(J
,I
)*HKANE(J
,I
)
1202 ! Suma de componentes independientemente del spin (hh_up + hh_dw, lh_up + lh_dw)
1203 CARAC(1)=CARAC(1)+CARAC(4)
1205 CARAC(2)=CARAC(2)+CARAC(3)
1207 CARAC(5)=CARAC(5)+CARAC(6)
1210 ! Peso de las componentes de las que se extraeran los autovalores.
1212 IF (CARAC(1).GE
.CARAC_MAX
) THEN ! HH
1215 IF (CARAC(2).GE
.CARAC_MAX
) THEN ! LH
1218 IF (CARAC(5).GE
.CARAC_MAX
) THEN ! SO
1224 ELSE ! Only the diagonal elements were calculated
1229 ROOT(2)=HKANE(6,6) !Redundant
1234 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1236 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1238 ENERGY(1) = POTE(CHI
)+ZBC1(CHI
)*SHID
1247 ! ENERGY(7) = CHI ! To save the Structure-profile
1249 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1250 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1251 !!!!! Calculation of the Elastic Energy. Since EEL contains no information
1252 !!!!! we will use this array to pack the Elastic Energy.
1254 !!!!! U=1/2*(XLAMB*Tr(e)**2+XMU/2*(err**2+e00**2+ezz**2+erz**2)
1256 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1257 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1259 ENERGY(8) = XMU
*(SXX
**2 + SYY
**2 + SZZ
**2 + &
1260 2.E0
*(SXY
**2+SXZ
**2+SYZ
**2) ) + &
1261 XLAMB
/2.E0
*(SXX
+ SYY
+ SZZ
)**2
1264 END SUBROUTINE POT_CALC_CAR_ZB
1266 SUBROUTINE POT_CALC_CYL_ZB(CHI
,ENERGY
)
1269 REAL, DIMENSION(:) :: ENERGY
1270 INTEGER, PARAMETER :: DIMM
=6
1271 REAL, DIMENSION(1:DIMM
,1:DIMM
) :: HKANE
1272 REAL :: SSUM
,SDIF
,SZZ
,SRZ
,SRR
,S00
,SHID
,STIL
1274 !! DIAGONALIZATION VARIABLES
1276 REAL :: W(1:DIMM
), WORK(1:10*DIMM
), AW(1:DIMM
,1:DIMM
), &
1277 ROOT(DIMM
), CARAC(DIMM
), SLAMCH
1278 INTEGER :: IWORK(DIMM
*5), IFAIL(DIMM
), INFO
, NUM
1281 IF(STR_Action
.EQ
.0) THEN
1282 SSUM
=0.E0
; SDIF
=0.E0
; SZZ
=0.E0
;
1283 SRZ
=0.E0
; SRR
=0.E0
; S00
=0.E0
1285 SRR
=EXX(I_X
,I_Y
,I_Z
)
1286 S00
=EYY(I_X
,I_Y
,I_Z
)
1287 SSUM
=EXX(I_X
,I_Y
,I_Z
)+EYY(I_X
,I_Y
,I_Z
)
1288 SDIF
=EXX(I_X
,I_Y
,I_Z
)-EYY(I_X
,I_Y
,I_Z
)
1289 SZZ
=EZZ(I_X
,I_Y
,I_Z
)
1290 SRZ
=EXZ(I_X
,I_Y
,I_Z
)
1295 HKANE(1,1)=POTHH(CHI
)+DVD(CHI
)*SHID
&
1296 -1./3.*DVU(CHI
)*STIL
1297 HKANE(2,2)=POTLH(CHI
)+DVD(CHI
)*SHID
&
1298 +1./3.*DVU(CHI
)*STIL
1300 HKANE(3,3)=HKANE(2,2)
1301 HKANE(4,4)=HKANE(1,1)
1302 HKANE(5,5)=POTSO(CHI
)+DSD(CHI
)*SHID
1303 HKANE(6,6)=HKANE(5,5)
1305 IF(DIAG_Action
.NE
.0.AND
.STR_Action
.NE
.0) THEN
1306 HKANE(1,2)=2./SQRT(3.)*D2VU(CHI
)*SRZ
1307 HKANE(1,3)=1./SQRT(3.)*(DVU(CHI
)+D2VU(CHI
))/2.*SDIF
1309 HKANE(1,5)=-SQRT(2./3.)*D2VSU(CHI
)*SRZ
1310 HKANE(1,6)=-SQRT(2./3.)*(DVU(CHI
)+D2VSU(CHI
))/2.*SDIF
1313 HKANE(2,4)=HKANE(1,3)
1314 HKANE(2,5)=-SQRT(2.)/3.*DVSU(CHI
)*STIL
1315 HKANE(2,6)=SQRT(2.)*D2VSU(CHI
)*SRZ
1317 HKANE(3,4)=-HKANE(1,2)
1318 HKANE(3,5)=HKANE(2,6)
1319 HKANE(3,6)=-HKANE(2,5)
1321 HKANE(4,5)=-HKANE(1,6)
1322 HKANE(4,6)=HKANE(1,5)
1328 HKANE(J
,I
)=HKANE(I
,J
)
1332 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1333 !! Analytic solutions for Rho = 0.
1334 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1336 ! ZETA = ZMIN+ZINC*IZ ! XZ normalized to ZC
1338 ! W(1)=(HKANE(2,2)+HKANE(5,5))+
1339 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
1340 ! W(2)=(HKANE(2,2)+HKANE(5,5))-
1341 ! & SQRT( (HKANE(2,2)-HKANE(5,5))**2+4.*HKANE(3,6)**2 )
1342 ! write(24,'(4(f18.8,1x))')ZETA,HKANE(1,1),W(1)/2.,W(2)/2.
1344 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1347 CALL DSYEVX('V','A','U',DIMM
,HKANE
,DIMM
,0.,0.,2,2, &
1348 2*SLAMCH('S'),NUM
,W
,AW
,DIMM
,WORK
,10*DIMM
,IWORK
,IFAIL
,INFO
)
1351 write(6,*)"Not Succesful Exit. Stopping. INFO=",INFO
1352 write(6,'(A,10(I2,1X))')"IFAIL=",IFAIL(1:DIMM
)
1353 write(6,'(2(A,F6.3,1X))')"RHO=",RC
*RHO
,"ZETA=",ZETA
*ZC
1357 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1358 !! Ordering Eigenvalues according to the Bloch func. caracter
1359 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1364 ! Calculo de la componentes dependientes del spin
1366 CARAC(J
)=AW(J
,I
)*AW(J
,I
)
1368 ! Suma de componentes independientemente del spin (hh_up + hh_dw, lh_up + lh_dw)
1369 CARAC(1)=CARAC(1)+CARAC(4)
1371 CARAC(2)=CARAC(2)+CARAC(3)
1373 CARAC(5)=CARAC(5)+CARAC(6)
1376 ! Peso de las componentes de las que se extraeran los autovalores.
1378 IF (CARAC(1).GE
.CARAC_MAX
) THEN ! HH
1381 IF (CARAC(2).GE
.CARAC_MAX
) THEN ! LH
1384 IF (CARAC(5).GE
.CARAC_MAX
) THEN ! SO
1390 ELSE ! Only the diagonal elements were calculated
1395 ROOT(2)=HKANE(6,6) !Redundant
1400 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1402 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1404 ENERGY(1) = POTE(CHI
)+ZBC1(CHI
)*SHID
1413 ! ESODW(IR,IZ,IGEO) = CHI ! To save the Structure-profile
1415 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1416 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1417 !!!!! Calculation of the Elastic Energy. Since EEL contains no information
1418 !!!!! we will use this array to pack the Elastic Energy.
1420 !!!!! U=1/2*XLAMB*Tr(e)**2+XMU*(err**2+e00**2+ezz**2+erz**2)
1422 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1423 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1425 ENERGY(8) = XMU
*(SRR
**2 + S00
**2 + SZZ
**2 + SRZ
**2) + &
1426 XLAMB
/2.E0
*(SSUM
+ SZZ
)**2
1430 END SUBROUTINE POT_CALC_CYL_ZB
1432 END SUBROUTINE POTENTIAL_ZB