379
379
! Initial size of minimal size with expansion
380
read_Size_HS = El%no_used ** 2 * product(El%Bloch) ! no_GS * no_GS * nq
380
read_Size_HS = El%no_used ** 2 * El%Bloch%size() ! no_GS * no_GS * nq
381
381
select case ( El%pre_expand )
383
383
! Nothing is pre-expanded
384
384
read_Size = read_Size_HS
386
386
! Only the Green function is pre-expanded
387
read_Size = read_Size_HS * product(El%Bloch)
387
read_Size = read_Size_HS * El%Bloch%size()
389
389
! Everything is pre-expanded
390
read_Size = read_Size_HS * product(El%Bloch)
390
read_Size = read_Size_HS * El%Bloch%size()
391
391
read_Size_HS = read_Size
583
583
do i = 1 , N_Elec
585
585
! Transfer the k-point to the expanded supercell
586
kpt(1) = bkpt(Elecs(i)%pvt(1)) / Elecs(i)%Bloch(1)
587
kpt(2) = bkpt(Elecs(i)%pvt(2)) / Elecs(i)%Bloch(2)
588
kpt(3) = bkpt(Elecs(i)%pvt(3)) / Elecs(i)%Bloch(3)
586
kpt(1) = bkpt(Elecs(i)%pvt(1)) / Elecs(i)%Bloch%B(1)
587
kpt(2) = bkpt(Elecs(i)%pvt(2)) / Elecs(i)%Bloch%B(2)
588
kpt(3) = bkpt(Elecs(i)%pvt(3)) / Elecs(i)%Bloch%B(3)
590
590
! Ensure zero in the semi-infinite direction
591
591
select case ( Elecs(i)%t_dir )
649
649
! Set k-point for calculating expansion
650
650
Elecs(i)%bkpt_cur = kpt
651
652
call read_next_GS_Elec(uGF(i), NEReqs, &
652
653
ikpt, Elecs(i), c, &
653
654
nzwork, zwork, forward = forward)
775
776
! Check # of Bloch k-points
776
if ( any(El%Bloch /= Bloch) ) then
777
if ( any(El%Bloch%B /= Bloch) ) then
777
778
write(*,*)"ERROR: Green function file: "//trim(curGFfile)
778
779
write(*,*) 'read_Green: ERROR: unexpected no. Bloch expansion k-points'
817
if ( product(El%Bloch) > 1 ) then
818
if ( El%Bloch%size() > 1 ) then
818
819
if ( pre_expand /= El%pre_expand ) then
819
820
write(*,*)"ERROR: Green function file: "//trim(curGFfile)
820
821
write(*,*) 'read_Green: ERROR: Bloch pre-expansion not consistent'
1068
1069
deallocate(lasto)
1070
if ( any(El%Bloch(:)/=Bloch(:)) ) then
1071
if ( any(El%Bloch%B(:)/=Bloch(:)) ) then
1071
1072
write(*,*)"ERROR: Green function file: "//trim(curGFfile)
1072
1073
write(*,*)"Number of Bloch expansions is wrong!"
1073
write(*,'(2(a,i3))') "Found Bloch-A1: ",Bloch(1),", expected: ",El%Bloch(1)
1074
write(*,'(2(a,i3))') "Found Bloch-A2: ",Bloch(2),", expected: ",El%Bloch(2)
1075
write(*,'(2(a,i3))') "Found Bloch-A3: ",Bloch(3),", expected: ",El%Bloch(3)
1074
write(*,'(2(a,i3))') "Found Bloch-A1: ",Bloch(1),", expected: ",El%Bloch%B(1)
1075
write(*,'(2(a,i3))') "Found Bloch-A2: ",Bloch(2),", expected: ",El%Bloch%B(2)
1076
write(*,'(2(a,i3))') "Found Bloch-A3: ",Bloch(3),", expected: ",El%Bloch%B(3)
1076
1077
localErrorGf = .true.
1078
1079
if ( El%repeat .neqv. repeat ) then
1080
1081
write(*,*) 'Ordering of Bloch repetitions is not the same (repeat or tile)'
1081
1082
localErrorGf = .true.
1083
if ( product(El%Bloch) > 1 ) then
1084
if ( El%Bloch%size() > 1 ) then
1084
1085
if ( pre_expand /= El%pre_expand ) then
1085
1086
write(*,*)"ERROR: Green function file: "//trim(curGFfile)
1086
1087
write(*,*)"Expecting a pre-expanded self-energy!"