Line data Source code
1 : MODULE m_int21lo
2 : !-----------------------------------------------------------
3 : !
4 : ! Integrates combinations of flo(:,:,llo,s) with itself, f(:,:,l,s)
5 : ! and g(:,:,l,s) (s=1,2) for given llo and itype with different
6 : ! spins (s).
7 : ! Output is ..n21(l,itype), where .. is a combination of (u,d) and
8 : ! ulo dependent on the (f,g) combination used. Also ..n12 and
9 : ! uloulop21n are calculated.
10 : !
11 : !-----------------------------------------------------------
12 : CONTAINS
13 174 : SUBROUTINE int_21lo(f,g,atoms,n,flo,ilo,uulo21n,ulou21n,dulo21n,ulod21n,uloulop21n)
14 :
15 : USE m_intgr, ONLY : intgr3
16 : USE m_types_setup
17 : IMPLICIT NONE
18 : TYPE(t_atoms), INTENT(IN) :: atoms
19 : REAL, INTENT(INOUT) :: uulo21n(atoms%nlod,atoms%ntype)
20 : REAL, INTENT(INOUT) :: ulou21n(atoms%nlod,atoms%ntype)
21 : REAL, INTENT(INOUT) :: dulo21n(atoms%nlod,atoms%ntype)
22 : REAL, INTENT(INOUT) :: ulod21n(atoms%nlod,atoms%ntype)
23 : REAL, INTENT(INOUT) :: uloulop21n(atoms%nlod,atoms%nlod,atoms%ntype)
24 : ! ..
25 : ! .. Scalar Arguments ..
26 : INTEGER, INTENT (IN) :: ilo,n
27 : ! ... Array Arguments
28 : REAL, INTENT (IN) :: f(:,:,0:,:)!(atoms%jmtd,2,0:atoms%lmaxd,input%jspins)
29 : REAL, INTENT (IN) :: g(:,:,0:,:)!(atoms%jmtd,2,0:atoms%lmaxd,input%jspins)
30 : REAL, INTENT (IN) :: flo(:,:,:,:)!(atoms%jmtd,2,atoms%nlod,input%jspins)
31 :
32 : ! ...local scalars
33 : INTEGER iri,l,lp,ilop
34 : ! ...local arrays
35 174 : REAL uu_tmp(atoms%jri(n))
36 :
37 : !
38 : ! --> norm of product of u and ulo:
39 : !
40 174 : l = atoms%llo(ilo,n)
41 131708 : DO iri = 1, atoms%jri(n)
42 131708 : uu_tmp(iri) = f(iri,1,l,2)*flo(iri,1,ilo,1)+ f(iri,2,l,2)*flo(iri,2,ilo,1)
43 : ENDDO
44 174 : CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),uulo21n(ilo,n))
45 131708 : DO iri = 1, atoms%jri(n)
46 131708 : uu_tmp(iri) = f(iri,1,l,1)*flo(iri,1,ilo,2)+ f(iri,2,l,1)*flo(iri,2,ilo,2)
47 : ENDDO
48 174 : CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),ulou21n(ilo,n))
49 : !
50 : ! --> norm of product of du and ulo:
51 : !
52 131708 : DO iri = 1, atoms%jri(n)
53 131708 : uu_tmp(iri) = g(iri,1,l,2)*flo(iri,1,ilo,1) + g(iri,2,l,2)*flo(iri,2,ilo,1)
54 : ENDDO
55 174 : CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),dulo21n(ilo,n))
56 131708 : DO iri = 1, atoms%jri(n)
57 131708 : uu_tmp(iri) = g(iri,1,l,1)*flo(iri,1,ilo,2) + g(iri,2,l,1)*flo(iri,2,ilo,2)
58 : ENDDO
59 174 : CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),ulod21n(ilo,n))
60 : !
61 : ! --> norm of product of ulo and ulo':
62 : !
63 520 : DO ilop = 1, atoms%nlo(n)
64 346 : lp = atoms%llo(ilop,n)
65 520 : IF (l.EQ.lp) THEN
66 131708 : DO iri = 1, atoms%jri(n)
67 131708 : uu_tmp(iri) = flo(iri,1,ilo,2)*flo(iri,1,ilop,1) + flo(iri,2,ilo,2)*flo(iri,2,ilop,1)
68 : ENDDO
69 174 : CALL intgr3(uu_tmp,atoms%rmsh(:,n),atoms%dx(n),atoms%jri(n),uloulop21n(ilo,ilop,n))
70 :
71 : ELSE
72 172 : uloulop21n(ilo,ilop,n) = 0.0
73 : ENDIF
74 : ENDDO
75 :
76 174 : END SUBROUTINE int_21lo
77 : END MODULE m_int21lo
|