The Elk Code
lopzflmn.f90
Go to the documentation of this file.
1 
2 ! Copyright (C) 2020 J. K. Dewhurst and S. Sharma.
3 ! This file is distributed under the terms of the GNU General Public License.
4 ! See the file COPYING for license details.
5 
6 pure subroutine lopzflmn(lmax,n,ld,zflm,zlflm1,zlflm2,zlflm3)
7 implicit none
8 ! arguments
9 integer, intent(in) :: lmax,n,ld
10 complex(8), intent(in) :: zflm(ld,n)
11 complex(8), intent(out) :: zlflm1(ld,n),zlflm2(ld,n),zlflm3(ld,n)
12 ! local variables
13 integer l,m,lm,i
14 real(8) t1
15 complex(8) z1
16 lm=0
17 do l=0,lmax
18  do m=-l,l
19  lm=lm+1
20  if (m == -l) then
21  zlflm1(lm,1:n)=0.d0
22  zlflm2(lm,1:n)=0.d0
23  end if
24  if (m < l) then
25  t1=0.5d0*sqrt(dble((l-m)*(l+m+1)))
26  do i=1,n
27  z1=t1*zflm(lm,i)
28  zlflm1(lm+1,i)=z1
29  zlflm2(lm+1,i)=cmplx(z1%im,-z1%re,8)
30  end do
31  end if
32  if (m > -l) then
33  t1=0.5d0*sqrt(dble((l+m)*(l-m+1)))
34  do i=1,n
35  z1=t1*zflm(lm,i)
36  zlflm1(lm-1,i)=zlflm1(lm-1,i)+z1
37  zlflm2(lm-1,i)=zlflm2(lm-1,i)+cmplx(-z1%im,z1%re,8)
38  end do
39  end if
40  if (m /= 0) then
41  zlflm3(lm,1:n)=dble(m)*zflm(lm,1:n)
42  else
43  zlflm3(lm,1:n)=0.d0
44  end if
45  end do
46 end do
47 end subroutine
48 
pure subroutine lopzflmn(lmax, n, ld, zflm, zlflm1, zlflm2, zlflm3)
Definition: lopzflmn.f90:7