12integer ik0,ik,ist,info
13integer i,j,k,l,m,n,nthd
14integer i1,i2,i3,j1,j2,j3
19integer,
allocatable :: ipiv(:)
20real(8),
allocatable :: a(:,:),b(:,:,:,:),c(:,:,:),evalfv(:,:)
21complex(8),
allocatable :: evecfv(:,:,:),evecsv(:,:)
28allocate(b(0:n-1,0:n-1,0:n-1,
nstsv))
29allocate(c(0:n-1,0:n-1,0:n-1))
53 if ((i1 == 0).and.(i2 == 0).and.(i3 == 0)) ik0=ik
55 call eveqn(ik,evalfv,evecfv,evecsv)
59 b(j1,j2,j3,ist)=
evalsv(ist,ik)
63deallocate(evalfv,evecfv,evecsv)
72 v1(1)=dble(i1); v1(2)=dble(i2); v1(3)=dble(i3)
82 a(i,j)=v2(1)*v2(2)*v2(3)
96 write(*,
'("Error(effmass): could not determine polynomial coefficients")')
97 write(*,
'(" DGESV returned INFO = ",I8)') info
101open(50,file=
'EFFMASS.OUT',form=
'FORMATTED')
103write(50,
'("(effective mass matrices are in Cartesian coordinates)")')
105write(50,
'("k-point (lattice coordinates) :")')
106write(50,
'(3G18.10)')
vklem
108write(50,
'("k-point (Cartesian coordinates) :")')
110write(50,
'(3G18.10)') v1
116 c(:,:,:)=b(:,:,:,ist)
125 c(j,:,:)=dble(j+1)*c(j+1,:,:)
128 else if (m == 2)
then
130 c(:,j,:)=dble(j+1)*c(:,j+1,:)
133 else if (m == 3)
then
135 c(:,:,j)=dble(j+1)*c(:,:,j+1)
146 write(50,
'("State, eigenvalue : ",I6,G18.10)') ist,
evalsv(ist,ik0)
148 write(50,
'(" matrix of eigenvalue derivatives with respect to k :")')
150 write(50,
'(3G18.10)') (d(i,j),j=1,3)
152 write(50,
'(" trace : ",G18.10)') d(1,1)+d(2,2)+d(3,3)
156 write(50,
'(" effective mass tensor (inverse of derivative matrix) :")')
158 write(50,
'(3G18.10)') (em(i,j),j=1,3)
160 write(50,
'(" trace : ",G18.10)') em(1,1)+em(2,2)+em(3,3)
162 call dsyev(
'N',
'U',3,em,3,w,work,9,info)
163 write(50,
'(" eigenvalues :")')
164 write(50,
'(3G18.10)') w
169write(*,
'("Info(effmass):")')
170write(*,
'(" Effective mass tensor for each state written to EFFMASS.OUT")')
171write(*,
'(" for k-point (lattice) ",3G18.10)')
vklem
173call writetest(25,
'effective mass',nv=3,tol=1.d-5,rva=w)
174deallocate(ipiv,a,b,c)
real(8), dimension(3, 3) bvec
integer, dimension(:,:), allocatable ivk
real(8), dimension(3) vklem
real(8), dimension(:,:), allocatable evalsv
subroutine writetest(id, descr, nv, iv, iva, tol, rv, rva, zv, zva)