Line data Source code
1 : MODULE m_radfun
2 : USE m_juDFT
3 : CONTAINS
4 77045 : SUBROUTINE radfun(l,itype,jsp,e,vr,atoms, f,g,usdus,nodeu,noded,wronk)
5 : !*********************************************************************
6 : ! generates the scalar relativistic wavefunctions (function: f;
7 : ! energy derivative: g) at an energy e for angular momentum l.
8 : ! the values on the sphere boundaries are also returned.
9 : ! m. weinert jan. 1987
10 : ! the solutions r*u(r) are on a log. mesh.
11 : !
12 : ! us ... u(R) if R is the muffin tin Radius
13 : ! dus ... u'(R) (radial derivative)
14 : ! . .
15 : ! uds ... u(R) duds ... u'(R) (energy derivative)
16 : ! . .
17 : ! ddn ... <u|u> norm of u-dot
18 : !
19 : !*********************************************************************
20 :
21 : USE m_constants, ONLY : c_light
22 : USE m_radsra
23 : USE m_radsrd
24 : USE m_types
25 : IMPLICIT NONE
26 : TYPE(t_usdus),INTENT(INOUT):: usdus
27 : TYPE(t_atoms),INTENT(IN) :: atoms
28 : ! ..
29 : ! .. Scalar Arguments ..
30 : INTEGER, INTENT (IN) :: l,itype,jsp
31 : INTEGER, INTENT (OUT):: noded,nodeu
32 : REAL, INTENT (IN) :: e
33 : REAL, INTENT (OUT):: wronk
34 : ! ..
35 : ! .. Array Arguments ..
36 : REAL, INTENT (IN) :: vr(atoms%jmtd)
37 : REAL, INTENT (OUT):: f(atoms%jmtd,2),g(atoms%jmtd,2)
38 : ! ..
39 : ! ..
40 : REAL :: c,us,dus
41 77045 : IF (atoms%jri(itype)>atoms%jmtd) CALL juDFT_error("atoms%jmtd too small","radfun")
42 : !
43 77045 : c = c_light(1.0)
44 : !
45 : !---> calculate normalized function at e
46 : CALL radsra(e,l,vr,atoms%rmsh(1,itype),atoms%dx(itype),atoms%jri(itype),&
47 77045 : c, usdus%us(l,itype,jsp),usdus%dus(l,itype,jsp),nodeu,f(:,1),f(:,2))
48 : !
49 : !---> calculate orthogonal energy derivative at e
50 : CALL radsrd(e,l,vr,atoms%rmsh(1,itype),atoms%dx(itype),atoms%jri(itype),&
51 : c, usdus%uds(l,itype,jsp),usdus%duds(l,itype,jsp),usdus%ddn(l,itype,jsp),&
52 77045 : noded,g(:,1),g(:,2), f(:,1),f(:,2),usdus%dus(l,itype,jsp))
53 : !
54 : !---> calculate wronskian
55 77045 : wronk = usdus%uds(l,itype,jsp)*usdus%dus(l,itype,jsp) - usdus%duds(l,itype,jsp)*usdus%us(l,itype,jsp)
56 :
57 77045 : END SUBROUTINE radfun
58 : END MODULE m_radfun
|