LCOV - code coverage report
Current view: top level - init - setlomap.F90 (source / functions) Hit Total Coverage
Test: combined.info Lines: 20 33 60.6 %
Date: 2019-09-08 04:53:50 Functions: 1 1 100.0 %

          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_setlomap
       8             :       CONTAINS
       9           7 :         SUBROUTINE setlomap(ntyp,&
      10             :              &                    l_useapw,atoms)
      11             :           !***********************************************************************
      12             :           ! sets up nlol and lo1l
      13             :           ! 
      14             :           ! nlo     : number of local orbitals for each atom type
      15             :           ! llo     : the l quantum numbers of the local orbitals
      16             :           ! nlol    : the of local orbitals with a certain l (for each atom type)
      17             :           ! lo1l    : the number of the first local orbital with that l
      18             :           ! l_dulo  : if .true., this is a local orbital formed with a $\dot u$
      19             :           !
      20             :           ! p.kurz jul. 1996
      21             :           !***********************************************************************
      22             :           USE m_juDFT
      23             :           USE m_types
      24             :           IMPLICIT NONE
      25             :           !     ..
      26             :           !     .. Scalar Arguments ..
      27             :           INTEGER, INTENT (IN) :: ntyp
      28             :           LOGICAL, INTENT (IN) :: l_useapw
      29             :           TYPE(t_atoms),INTENT(INOUT)::atoms
      30             :           !     ...
      31             :           INTEGER ilo,l
      32             :           !     ..
      33           7 :           WRITE (6,FMT=8000) atoms%nlo(ntyp), (atoms%llo(ilo,ntyp),ilo=1,atoms%nlo(ntyp))
      34             : 8000      FORMAT ('the number of local orbitals for this atom type is: ',i3,&
      35             :                &       /,'the corresponding values of l are: ',30i4)
      36           7 :           IF (atoms%nlo(ntyp)>atoms%nlod)  CALL juDFT_error("nlo > nlod!!!",calledby&
      37           0 :                &     ="setlomap")
      38             : 
      39          27 :           DO l = 0,atoms%llod
      40          20 :              atoms%nlol(l,ntyp) = 0
      41          27 :              atoms%lo1l(l,ntyp) = 0
      42             :           END DO
      43          21 :           DO ilo = 1,atoms%nlod
      44          14 :              atoms%l_dulo(ilo,ntyp) = .FALSE.
      45          21 :              atoms%ulo_der(ilo,ntyp)= 0
      46             :           ENDDO
      47           7 :           l = -1
      48             : 
      49          14 :           DO ilo = 1,atoms%nlo(ntyp)
      50             :              !+gu
      51           7 :              IF (atoms%llo(ilo,ntyp).LT.0) THEN
      52           0 :                 IF (l_useapw) THEN
      53           0 :                    atoms%l_dulo(ilo,ntyp) = .TRUE.
      54             :                 ELSE
      55           0 :                    atoms%l_dulo(ilo,ntyp) = .FALSE.
      56           0 :                    atoms%ulo_der(ilo,ntyp)= -atoms%llo(ilo,ntyp)/10+1
      57           0 :                    atoms%llo(ilo,ntyp) = atoms%llo(ilo,ntyp)+10*(atoms%ulo_der(ilo,ntyp)-1)
      58             :                 ENDIF
      59           0 :                 atoms%llo(ilo,ntyp) = ABS( atoms%llo(ilo,ntyp) ) - 1
      60           0 :                 WRITE(6,'(A,I2,A,I2)') 'I use',atoms%ulo_der(ilo,ntyp),&
      61           0 :                      &       '. derivative of l =',atoms%llo(ilo,ntyp)
      62             :              ELSE
      63           7 :                 atoms%l_dulo(ilo,ntyp) = .FALSE.
      64             :              ENDIF
      65             :              !-gu
      66           7 :              IF (atoms%llo(ilo,ntyp)>atoms%llod)  CALL juDFT_error(" l > llod!!!",&
      67           0 :                   &        calledby="setlomap")
      68           7 :              IF (atoms%llo(ilo,ntyp).LT.l) THEN
      69             :                 WRITE (6,FMT=*)&
      70           0 :                      &        'setlomap: please specify the l quantum numbers ',&
      71           0 :                      &        'of the local orbitals is ascending order.'
      72           0 :                 CALL juDFT_error("LO-setup",calledby="setlomap")
      73             :              END IF
      74           7 :              IF (atoms%llo(ilo,ntyp).GT.l) THEN
      75           7 :                 l = atoms%llo(ilo,ntyp)
      76           7 :                 atoms%lo1l(l,ntyp) = ilo
      77             :              END IF
      78          14 :              atoms%nlol(l,ntyp) = atoms%nlol(l,ntyp) + 1
      79             :           END DO
      80             : 
      81           7 :           RETURN
      82             :         END SUBROUTINE setlomap
      83             :       END

Generated by: LCOV version 1.13