[Pw_forum] question about PWCOND
Manoj Srivastava
manoj at phys.ufl.edu
Mon Aug 17 01:52:08 CEST 2009
Dear Alexander and PWSCF users,
I have a question about an expression in the scatter_forw.f90 subroutine,
specifically about the following expression -
IF (ABS(AIMAG(zk(lam, kp))).LT.eps) THEN
f1(lam,iorb)=-ezk(lam)*CONJG(di(iorb,lam))*zk2(lam)
f2(lam,iorb)=-ezk(lam)*CONJG(ci(iorb,lam))*zk2(lam)
ELSE
f1(lam,iorb)=-CONJG(ci(iorb,lam))*zk2(lam)
f2(lam,iorb)=-CONJG(di(iorb,lam))*zk2(lam)
ENDIF
Why does this expression have if/else statement depending on imaginary
part of zk? I did some algebra and realized that f1 for (ABS(AIMAG(zk(lam,
kp))).LT.eps) is related with f1 for (ABS(AIMAG(zk(lam, kp))).GT.eps) by
changing zk to -zk. Same is true for f2. It is defined in previous
subroutine that
zk=sqrt(E-E_lambda)
where E is given energy and E_lambda is eigenvalue of 2D problem.
Square root gives us two solution, one would be zk and
another -zk, and I dont understand how do you choose which solution to use
in the expression for f1 and f2, depending on imaginary part of zk.
Would anyone mind to explain?
Regards,
Manoj
More information about the Pw_forum
mailing list