File: tm2pol.f90

package info (click to toggle)
elkcode 5.4.24-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 12,840 kB
  • sloc: f90: 48,415; fortran: 22,457; perl: 965; makefile: 384; sh: 369; python: 105; ansic: 67
file content (37 lines) | stat: -rw-r--r-- 1,021 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

! Copyright (C) 2008 F. Bultmark, F. Cricchio, L. Nordstrom and J. K. Dewhurst.
! This file is distributed under the terms of the GNU General Public License.
! See the file COPYING for license details.

subroutine tm2pol(l,k,w2,tm2p)
! !USES:
use modmain
! !INPUT/OUTPUT PARAMETERS:
!   l    : angular momentum (in,integer)
!   k    : k-index of tensor moment (in,integer)
!   w2   : modulus square of k-p tensmom (in,real)
!   tm2p : polarisation (out,real)
! !DESCRIPTION:
!   Calculate the polarisation of each 2-index tensor component of the density
!   matrix, see {\it Phys. Rev. B} {\bf 80}, 035121 (2009).
!
! !REVISION HISTORY:
!   Created April 2008 (F. Cricchio and L. Nordstrom)
!EOP
!BOC
implicit none
! input variables
integer, intent(in) :: l,k
real(8),intent(in) :: w2
real(8),intent(out) :: tm2p
! local variables
real(8) nlk
! external functions
real(8) factnm
external factnm
nlk=factnm(2*l,1)/sqrt(factnm(2*l-k,1)*factnm(2*l+k+1,1))
tm2p=dble((2*k+1)*(2*l+1))*(nlk**2)*w2
return
end subroutine
!EOC