11character(*),
intent(in) :: fname
12real(8),
intent(in) :: vpl(3)
13integer,
intent(in) :: ng,m
14complex(8),
intent(out) :: cf(ng,ng,m)
17integer isym,iq,lspl,ilspl
18integer igq,jgq,igp,jgp,i,j
20real(8) vql_(3),si(3,3)
21real(8) vgql(3),v(3),t1
27real(8),
allocatable :: vgpl(:,:)
28complex(8),
allocatable :: cf_(:,:,:),x(:)
34 call getrd(trim(fname),iq,tgs,v1=vql_,n1=ng_,n2=m_,nzv=ng*ng*m,zva=cf)
38inquire(iolength=recl) vql_,ng_,m_,cf
39open(245,
file=trim(fname),form=
'UNFORMATTED',access=
'DIRECT',recl=recl)
40read(245,rec=iq) vql_,ng_,m_,cf
44t1=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)
73t1=abs(vpl(1)-
vql(1,iq))+abs(vpl(2)-
vql(2,iq))+abs(vpl(3)-
vql(3,iq))
76allocate(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)
99si(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)
136deallocate(vgpl,cf_,x)
subroutine findqpt(vpl, isym, iq)
subroutine getcfgq(fname, vpl, ng, m, cf)
integer, dimension(48) isymlat
real(8), dimension(:,:), allocatable vql
logical, dimension(maxsymcrys) tv0symc
integer, dimension(:,:), allocatable ivg
real(8), dimension(3, maxsymcrys) vtcsymc
real(8), dimension(:,:), allocatable vgc
integer, dimension(3, 3, 48) symlat
integer, dimension(maxsymcrys) lsplsymc
type(file_t), dimension(:), allocatable, private file
subroutine getrd(fname, irec, tgs, n1, n2, n3, v1, v2, nrv, rva, nzv, zva)
pure subroutine r3mtv(a, x, y)