Permalink
Browse files

Still does not really work for non-zero fluxes. Large floating point …

…inaccuracies in the result of cos and sin make it non-unitary. But code is no more broken than before so I have pushed it anyway.
  • Loading branch information...
1 parent b907058 commit 0d27cf0d10b7705edeeab8f00627f1337c7fd7a4 jamesmcm committed Mar 20, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 transfermatrix/tmatrix.f
View
10 transfermatrix/tmatrix.f
@@ -138,8 +138,14 @@ SUBROUTINE FILLU(U, LIMX, FLUX)
DOUBLE PRECISION SQRT05, FLUX
DOUBLE COMPLEX ZISQRT05, CNUM
DOUBLE COMPLEX ZI/(0.0, 1.0)/
-
- CALL SQUNITZ(U, ZI, LIMX)
+ CALL SQZERO (U, LIMX)
+ DO I = 1, LIMX
+ CALL ZPOLAR(FLUX*I, CNUM)
+ U(I,I)=ZI*CNUM
+ ENDDO
+ CALL ZPRINTM(U, LIMX, "U :")
+
+c$$$ CALL SQUNITZ(U, ZI, LIMX)

0 comments on commit 0d27cf0

Please sign in to comment.