Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

replaced Complex*16 with "double complex". Also added "implicit none"…

…, and declared some variables

git-svn-id: svn://localhost/spinoptics/trunk@4 ac43315b-3e54-499a-a480-b11484f4b207
  • Loading branch information...
commit a47b67ff0f9eb4d02bb11646f830334d546fbdfc 1 parent 8f052e2
mlenz authored
Showing with 37 additions and 31 deletions.
  1. +13 −13 inv_general_complex_mat.f
  2. +24 −18 nano0903c.f
View
26 inv_general_complex_mat.f
@@ -120,9 +120,9 @@ subroutine zaxpy(n,za,zx,incx,zy,incy)
***********************************************************************
subroutine zgefa(a,lda,n,ipvt,info)
integer lda,n,ipvt(1),info
- complex*16 a(lda,1)
+ Double Complex a(lda,1)
c
-c zgefa factors a complex*16 matrix by gaussian elimination.
+c zgefa factors a Double Complex matrix by gaussian elimination.
c
c zgefa is usually called by zgeco, but it can be called
c directly with a saving in time if rcond is not needed.
@@ -130,7 +130,7 @@ subroutine zgefa(a,lda,n,ipvt,info)
c
c on entry
c
-c a complex*16(lda, n)
+c a Double Complex(lda, n)
c the matrix to be factored.
c
c lda integer
@@ -168,13 +168,13 @@ subroutine zgefa(a,lda,n,ipvt,info)
c
c internal variables
c
- complex*16 t
+ Double Complex t
integer izamax,j,k,kp1,l,nm1
c
- complex*16 zdum
+ Double Complex zdum
double precision cabs1
double precision dreal,dimag
- complex*16 zdumr,zdumi
+ Double Complex zdumr,zdumi
dreal(zdumr) = zdumr
dimag(zdumi) = (0.0d0,-1.0d0)*zdumi
cabs1(zdum) = dabs(dreal(zdum)) + dabs(dimag(zdum))
@@ -281,14 +281,14 @@ double precision function dcabs1(z)
***********************************************************************
subroutine zgedi(a,lda,n,ipvt,det,work,job)
integer lda,n,ipvt(1),job
- complex*16 a(lda,1),det(2),work(1)
+ Double Complex a(lda,1),det(2),work(1)
c
c zgedi computes the determinant and inverse of a matrix
c using the factors computed by zgeco or zgefa.
c
c on entry
c
-c a complex*16(lda, n)
+c a Double Complex(lda, n)
c the output from zgeco or zgefa.
c
c lda integer
@@ -300,7 +300,7 @@ subroutine zgedi(a,lda,n,ipvt,det,work,job)
c ipvt integer(n)
c the pivot vector from zgeco or zgefa.
c
-c work complex*16(n)
+c work Double Complex(n)
c work vector. contents destroyed.
c
c job integer
@@ -313,7 +313,7 @@ subroutine zgedi(a,lda,n,ipvt,det,work,job)
c a inverse of original matrix if requested.
c otherwise unchanged.
c
-c det complex*16(2)
+c det Double Complex(2)
c determinant of original matrix if requested.
c otherwise not referenced.
c determinant = det(1) * 10.0**det(2)
@@ -338,14 +338,14 @@ subroutine zgedi(a,lda,n,ipvt,det,work,job)
c
c internal variables
c
- complex*16 t
+ Double Complex t
double precision ten
integer i,j,k,kb,kp1,l,nm1
c
- complex*16 zdum
+ Double Complex zdum
double precision cabs1
double precision dreal,dimag
- complex*16 zdumr,zdumi
+ Double Complex zdumr,zdumi
dreal(zdumr) = zdumr
dimag(zdumi) = (0.0d0,-1.0d0)*zdumi
cabs1(zdum) = dabs(dreal(zdum)) + dabs(dimag(zdum))
View
42 nano0903c.f
@@ -238,7 +238,7 @@ Subroutine Findk(Emod,kn)
c-------(From the condition of the total energy)
IMPLICIT NONE
Double precision Emod,Etot,V,al,Mass,W,hbar
- Complex*16 kn,imu
+ Double Complex kn,imu
Integer Nfin
Logical logus
common/param/V,al,Mass,W,Etot,hbar,logus,Nfin
@@ -254,13 +254,18 @@ Subroutine Findk(Emod,kn)
c=============================================================
c==== Tight binding Hamiltonian
- Subroutine Hamiltonian(Hnn)
- complex*16 Hnn
+ Subroutine Hamiltonian(Hnn)
+ IMPLICIT NONE
+ Double Complex Hnn
integer ii,Nfin,nfin1,jj
integer ihelp,infin1,infin2
+ integer N1, N2
+
double precision V,al,MAss,W ,Etot,hbar,e0,Wdis
- double precision lstub,rashb,rashb2,Unitx,dchem
- complex*16 Hx,EHx,Imunit
+ double precision lstub,rashb,rashb2,Unitx,dchem, Rashba
+ double precision random
+ Double Complex Hx,EHx,Imunit
+
logical logus
Parameter(N1=10,N2=10,nfin1=N1*N2*2)
Dimension Hnn(Nfin1,Nfin1),Unitx(Nfin1,Nfin1)
@@ -458,11 +463,11 @@ Subroutine Selfy(sigmR)
double precision V,al,Mass,W,Etot,hbar,rashb,rashb2
double precision Emod,AnorN1,psiN1,lstub,Wle,x
- complex*16 Glp1lp1,Glp1lp1n,alpha,theta
- complex*16 Glp1lp1up,G0lm1lm1up,Glp1lp1down,G0lm1lm1down
- complex*16 Gxp1xp1up,Gxm1xm1up,Gxp1xp1down,Gxm1xm1down
- complex*16 sigmR,kn
- complex*16 Imunit,Imun0
+ Double Complex Glp1lp1,Glp1lp1n,alpha,theta
+ Double Complex Glp1lp1up,G0lm1lm1up,Glp1lp1down,G0lm1lm1down
+ Double Complex Gxp1xp1up,Gxm1xm1up,Gxp1xp1down,Gxm1xm1down
+ Double Complex sigmR,kn
+ Double Complex Imunit,Imun0
parameter(N1=10,N2=10,Nle=10,Nfin1=N1*N2*2,nleads=8)
Parameter(pi=3.14159265358979323846264d0)
@@ -621,7 +626,7 @@ Subroutine Gamms(sigmR,Gamm)
double precision V,al,MAss,W,Etot,hbar
logical logus
double precision Gamm
- complex*16 sigmR
+ Double Complex sigmR
parameter(N1=10,N2=10,nfin1=N1*N2*2,nleads=8)
Dimension Gamm(nleads,nfin1,nfin1)
Dimension sigmR(nleads,nfin1,nfin1)
@@ -672,14 +677,14 @@ Subroutine Greenji(Tpq)
Integer N1! no. of sites in slice k
Integer N2! no. of sites in slice k+1
Integer m,nleads,Nle
- Complex*16 theta
- Complex*16 Imunit
- COmplex*16 alpha
+ Double Complex theta
+ Double Complex Imunit
+ Double Complex alpha
double precision Gamm
- COmplex*16 Hnn
- Complex*16 sigmR
- Complex*16 GRinv,kn
- Complex*16 GR
+ Double Complex Hnn
+ Double Complex sigmR
+ Double Complex GRinv,kn
+ Double Complex GR
Complex GammGR
Complex GammGad
@@ -821,3 +826,4 @@ Subroutine Greenji(Tpq)
end
+c vim: ignorecase
Please sign in to comment.
Something went wrong with that request. Please try again.