Line data Source code
1 : !--------------------------------------------------------------------------------
2 : ! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
3 : ! This file is part of FLEUR and available as free software under the conditions
4 : ! of the MIT license as expressed in the LICENSE file in more detail.
5 : !--------------------------------------------------------------------------------
6 :
7 : MODULE m_lhglpts
8 : ! **********************************************************
9 : ! calculates lattice harmonics on the gauss-legendre angular
10 : ! mesh - r.pentcheva Feb'96
11 : ! **********************************************************
12 : CONTAINS
13 484 : SUBROUTINE lhglpts(&
14 : & sphhar,atoms,&
15 484 : & rx,nsp,&
16 : & sym,&
17 484 : & ylh)
18 : !
19 : USE m_ylm
20 : USE m_types_sym
21 : USE m_types_sphhar
22 : USE m_types_atoms
23 :
24 : IMPLICIT NONE
25 :
26 : TYPE(t_sym),INTENT(IN) :: sym
27 : TYPE(t_sphhar),INTENT(IN) :: sphhar
28 : TYPE(t_atoms),INTENT(IN) :: atoms
29 : ! ..
30 : ! .. Scalar Arguments ..
31 : INTEGER, INTENT (IN) :: nsp
32 : ! ..
33 : ! .. Array Arguments ..
34 : REAL, INTENT (IN) :: rx(:,:) !(3,dimension%nspd)
35 : REAL, INTENT (OUT):: ylh(:,0:,:) !(dimension%nspd,0:sphhar%nlhd,sphhar%ntypsd)
36 : ! ..
37 : ! .. Local Scalars ..
38 : REAL s
39 : INTEGER k,lh,mem,nd,ll1,lm
40 : ! ..
41 : ! .. Local Arrays ..
42 484 : COMPLEX ylm( (atoms%lmaxd+1)**2 )
43 : ! ..
44 972 : DO nd = 1,sym%nsymt
45 73704 : DO k = 1,nsp
46 :
47 : CALL ylm4(&
48 : & atoms%lmaxd,rx(:,k),&
49 72732 : & ylm)
50 :
51 4521072 : DO lh = 0,sphhar%nlh(nd)
52 4447852 : s = 0
53 4447852 : ll1 = sphhar%llh(lh,nd) * ( sphhar%llh(lh,nd) + 1 ) + 1
54 12759344 : DO mem = 1,sphhar%nmem(lh,nd)
55 8311492 : lm = ll1 + sphhar%mlh(mem,lh,nd)
56 12759344 : s = s + REAL( sphhar%clnu(mem,lh,nd) * ylm(lm) )
57 : ENDDO
58 4520584 : ylh(k,lh,nd) = s
59 : ENDDO
60 :
61 : ENDDO
62 : ENDDO
63 484 : RETURN
64 : END SUBROUTINE lhglpts
65 : END MODULE m_lhglpts
|