6 subroutine getcfgq(fname,vpl,ng,m,cf)
11 character(*),
intent(in) :: fname
12 real(8),
intent(in) :: vpl(3)
13 integer,
intent(in) :: ng,m
14 complex(8),
intent(out) :: cf(ng,ng,m)
17 integer isym,iq,lspl,ilspl
18 integer igq,jgq,igp,jgp,i,j
20 real(8) vql_(3),si(3,3)
21 real(8) vgql(3),v(3),t1
27 real(8),
allocatable :: vgpl(:,:)
28 complex(8),
allocatable :: cf_(:,:,:),x(:)
34 call getrd(trim(fname),iq,tgs,v1=vql_,n1=ng_,n2=m_,nzv=ng*ng*m,zva=cf)
38 inquire(iolength=recl) vql_,ng_,m_,cf
39 open(245,
file=trim(fname),form=
'UNFORMATTED',access=
'DIRECT',recl=recl)
40 read(245,rec=iq) vql_,ng_,m_,cf
44 t1=abs(
vql(1,iq)-vql_(1))+abs(
vql(2,iq)-vql_(2))+abs(
vql(3,iq)-vql_(3))
47 write(*,
'("Error(getcfgq): differing vectors for q-point ",I8)') iq
48 write(*,
'(" current : ",3G18.10)')
vql(:,iq)
49 write(*,
'(" file : ",3G18.10)') vql_
50 write(*,
'(" in file ",A)') trim(fname)
56 write(*,
'("Error(getcfgq): differing ng for q-point ",I8)') iq
57 write(*,
'(" current : ",I8)') ng
58 write(*,
'(" file : ",I8)') ng_
59 write(*,
'(" in file ",A)') trim(fname)
65 write(*,
'("Error(getcfgq): differing m for q-point ",I8)') iq
66 write(*,
'(" current : ",I8)') m
67 write(*,
'(" file : ",I8)') m_
68 write(*,
'(" in file ",A)') trim(fname)
73 t1=abs(vpl(1)-
vql(1,iq))+abs(vpl(2)-
vql(2,iq))+abs(vpl(3)-
vql(3,iq))
76 allocate(vgpl(3,ng),cf_(ng,ng,m),x(ng))
80 cf_(1:ng,1:ng,1:m)=cf(1:ng,1:ng,1:m)
85 t1=
vgc(1,igq)*v(1)+
vgc(2,igq)*v(2)+
vgc(3,igq)*v(3)
86 x(igq)=cmplx(cos(t1),-sin(t1),8)
91 cf_(igq,jgq,1:m)=z1*x(igq)*cf(igq,jgq,1:m)
99 si(1:3,1:3)=dble(
symlat(1:3,1:3,ilspl))
103 vgpl(1:3,igp)=dble(
ivg(1:3,igp))+vpl(1:3)
108 vgql(1:3)=dble(
ivg(1:3,igq))+
vql(1:3,iq)
109 call r3mtv(si,vgql,v)
114 t1=abs(v(1)-vgpl(1,igp))+abs(v(2)-vgpl(2,igp))+abs(v(3)-vgpl(3,igp))
129 if ((igq == 0).or.(jgq == 0))
then 132 cf(igp,jgp,1:m)=cf_(igq,jgq,1:m)
136 deallocate(vgpl,cf_,x)
pure subroutine r3mtv(a, x, y)
integer, dimension(48) isymlat
type(file_t), dimension(:), allocatable, private file
integer, dimension(3, 3, 48) symlat
subroutine getcfgq(fname, vpl, ng, m, cf)
logical, dimension(maxsymcrys) tv0symc
subroutine getrd(fname, irec, tgs, n1, n2, n3, v1, v2, nrv, rva, nzv, zva)
real(8), dimension(:,:), allocatable vgc
integer, dimension(maxsymcrys) lsplsymc
subroutine findqpt(vpl, isym, iq)
real(8), dimension(:,:), allocatable vql
integer, dimension(:,:), allocatable ivg
real(8), dimension(3, maxsymcrys) vtcsymc