This repository has been archived by the owner on Sep 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Young-Woo Choe
committed
Apr 25, 2016
1 parent
9f5a340
commit 9790e63
Showing
13 changed files
with
338 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
subroutine dos(Nstep,Norb,small,Nw,omega_real,nev_calc,& | ||
Aff) | ||
implicit none | ||
|
||
|
||
double precision small,dw,Z | ||
integer:: Norb,Nstep,nev_calc,nw,ishift,io,itmp,k,i | ||
double precision::omega_real(nw),pev(nev_calc),E0 | ||
double precision::Aff(Norb,nw),Aff_tmp(Norb,nw),factor | ||
double precision:: ap(0:Nstep),bp(0:Nstep),an(0:Nstep),bn(0:Nstep) | ||
logical even | ||
|
||
write(6,*) | ||
write(6,*) "************* SPECTRAL FUNCTION CALCULATION & | ||
**************" | ||
write(6,*) | ||
|
||
Aff(:,:) = 0.D0 | ||
Aff_tmp(:,:) = 0.D0 | ||
|
||
open(unit=11,file="apbpanbn.dat",form="unformatted") | ||
|
||
do i = 1, nev_calc | ||
! Diagonal component | ||
do io = 1, Norb | ||
read(11) itmp,itmp,E0,pev(i),even,& | ||
(ap(k),k=0,Nstep),(bp(k),k=0,Nstep), & | ||
(an(k),k=0,Nstep),(bn(k),k=0,Nstep) | ||
|
||
call dos_diag(Nstep,Norb,Nw,io,Aff_tmp,omega_real,E0,& | ||
small,ap,bp,an,bn) | ||
enddo | ||
factor = 0.5D0 | ||
if(even) factor = 1.D0 | ||
Aff(:,:) = Aff(:,:) + pev(i)*Aff_tmp(:,:)*factor | ||
if(even) goto 1000 | ||
|
||
do io = 1, Norb | ||
read(11) itmp,itmp,E0,pev(i),even,& | ||
(ap(k),k=0,Nstep),(bp(k),k=0,Nstep), & | ||
(an(k),k=0,Nstep),(bn(k),k=0,Nstep) | ||
|
||
call dos_diag(Nstep,Norb,Nw,io,Aff_tmp,omega_real,E0,& | ||
small,ap,bp,an,bn) | ||
enddo | ||
Aff(:,:) = Aff(:,:) + pev(i)*Aff_tmp(:,:)*factor | ||
1000 continue | ||
enddo | ||
close(11) | ||
|
||
return | ||
end | ||
|
||
SUBROUTINE dos_DIAG(Nstep,Norb,Nw,io,Aff,omega_real,E0,& | ||
small,ap,bp,an,bn) | ||
|
||
implicit none | ||
|
||
integer i,j,k,io,Nstep,nw,Norb | ||
double precision:: omega_real(Nw),small | ||
double precision:: an(0:Nstep),bn(0:Nstep),ap(0:Nstep),bp(0:Nstep) | ||
|
||
double complex:: ztmp, cpx_omega,grx | ||
double precision:: Aff(Norb,Nw),pi,E0 | ||
parameter(pi=acos(-1.0D0)) | ||
|
||
do j = 1, Nw | ||
|
||
cpx_omega=dcmplx(E0+omega_real(j),small) | ||
grx = bp(Nstep)/(cpx_omega-ap(Nstep)) | ||
do k = Nstep-1, 0, -1 | ||
grx = bp(k)/(cpx_omega-ap(k)-grx) | ||
enddo | ||
|
||
ztmp = grx | ||
|
||
cpx_omega = dcmplx(omega_real(j)-E0,small) | ||
grx = bn(Nstep)/(cpx_omega+an(Nstep)) | ||
do k = Nstep-1, 0, -1 | ||
grx = bn(k)/(cpx_omega+an(k)-grx) | ||
enddo | ||
grx = ztmp+grx | ||
Aff(io,j) = -aimag(grx)/pi | ||
enddo | ||
|
||
return | ||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.