LCOV - code coverage report
Current view: top level - types - types_denCoeffsOffdiag.f90 (source / functions) Hit Total Coverage
Test: combined.info Lines: 49 83 59.0 %
Date: 2019-09-08 04:53:50 Functions: 1 5 20.0 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------
       2             : ! Copyright (c) 2018 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_types_denCoeffsOffdiag
       8             : 
       9             : IMPLICIT NONE
      10             : 
      11             : PRIVATE
      12             : 
      13             :    TYPE t_denCoeffsOffdiag
      14             :       LOGICAL              :: l_fmpl
      15             : 
      16             :       ! spherical
      17             :       COMPLEX, ALLOCATABLE :: uu21(:,:)
      18             :       COMPLEX, ALLOCATABLE :: dd21(:,:)
      19             :       COMPLEX, ALLOCATABLE :: du21(:,:)
      20             :       COMPLEX, ALLOCATABLE :: ud21(:,:)
      21             : 
      22             :       ! nonspherical
      23             :       COMPLEX, ALLOCATABLE :: uunmt21(:,:,:)
      24             :       COMPLEX, ALLOCATABLE :: ddnmt21(:,:,:)
      25             :       COMPLEX, ALLOCATABLE :: dunmt21(:,:,:)
      26             :       COMPLEX, ALLOCATABLE :: udnmt21(:,:,:)
      27             : 
      28             :       ! spherical - LOs
      29             :       COMPLEX, ALLOCATABLE :: uulo21(:,:)
      30             :       COMPLEX, ALLOCATABLE :: dulo21(:,:)
      31             :       COMPLEX, ALLOCATABLE :: ulou21(:,:)
      32             :       COMPLEX, ALLOCATABLE :: ulod21(:,:)
      33             : 
      34             :       COMPLEX, ALLOCATABLE :: uloulop21(:,:,:)
      35             : 
      36             :       ! norms
      37             :       REAL, ALLOCATABLE     :: uu21n(:,:)
      38             :       REAL, ALLOCATABLE     :: ud21n(:,:)
      39             :       REAL, ALLOCATABLE     :: du21n(:,:)
      40             :       REAL, ALLOCATABLE     :: dd21n(:,:)
      41             : 
      42             :       REAL, ALLOCATABLE     :: uulo21n(:,:)
      43             :       REAL, ALLOCATABLE     :: dulo21n(:,:)
      44             :       REAL, ALLOCATABLE     :: ulou21n(:,:)
      45             :       REAL, ALLOCATABLE     :: ulod21n(:,:)
      46             : 
      47             :       REAL, ALLOCATABLE     :: uloulop21n(:,:,:)
      48             : 
      49             :       CONTAINS
      50             : 
      51             :       PROCEDURE,PASS :: init => denCoeffsOffdiag_init
      52             :       PROCEDURE      :: addRadFunScalarProducts
      53             :       PROCEDURE      :: calcCoefficients
      54             : 
      55             :    END TYPE t_denCoeffsOffdiag
      56             : 
      57             : PUBLIC t_denCoeffsOffdiag
      58             : 
      59             : CONTAINS
      60             : 
      61         608 : SUBROUTINE denCoeffsOffdiag_init(thisDenCoeffsOffdiag, atoms, noco, sphhar, l_fmpl)
      62             : 
      63             :    USE m_types_setup
      64             : 
      65             :    IMPLICIT NONE
      66             : 
      67             :    CLASS(t_denCoeffsOffdiag), INTENT(INOUT) :: thisDenCoeffsOffdiag
      68             :    TYPE(t_atoms),      INTENT(IN)    :: atoms
      69             :    TYPE(t_noco),       INTENT(IN)    :: noco
      70             :    TYPE(t_sphhar),     INTENT(IN)    :: sphhar
      71             :    LOGICAL,            INTENT(IN)    :: l_fmpl
      72             : 
      73         608 :    thisDenCoeffsOffdiag%l_fmpl = l_fmpl
      74             : 
      75         608 :    IF (noco%l_mperp) THEN
      76           0 :       ALLOCATE (thisDenCoeffsOffdiag%uu21(0:atoms%lmaxd,atoms%ntype))
      77           0 :       ALLOCATE (thisDenCoeffsOffdiag%ud21(0:atoms%lmaxd,atoms%ntype))
      78           0 :       ALLOCATE (thisDenCoeffsOffdiag%du21(0:atoms%lmaxd,atoms%ntype))
      79           0 :       ALLOCATE (thisDenCoeffsOffdiag%dd21(0:atoms%lmaxd,atoms%ntype))
      80             : 
      81           0 :       ALLOCATE (thisDenCoeffsOffdiag%uulo21(atoms%nlod,atoms%ntype))
      82           0 :       ALLOCATE (thisDenCoeffsOffdiag%dulo21(atoms%nlod,atoms%ntype))
      83           0 :       ALLOCATE (thisDenCoeffsOffdiag%ulou21(atoms%nlod,atoms%ntype))
      84           0 :       ALLOCATE (thisDenCoeffsOffdiag%ulod21(atoms%nlod,atoms%ntype))
      85             : 
      86           0 :       ALLOCATE (thisDenCoeffsOffdiag%uloulop21(atoms%nlod,atoms%nlod,atoms%ntype))
      87             : 
      88           0 :       ALLOCATE (thisDenCoeffsOffdiag%uu21n(0:atoms%lmaxd,atoms%ntype))
      89           0 :       ALLOCATE (thisDenCoeffsOffdiag%ud21n(0:atoms%lmaxd,atoms%ntype))
      90           0 :       ALLOCATE (thisDenCoeffsOffdiag%du21n(0:atoms%lmaxd,atoms%ntype))
      91           0 :       ALLOCATE (thisDenCoeffsOffdiag%dd21n(0:atoms%lmaxd,atoms%ntype))
      92             : 
      93           0 :       ALLOCATE (thisDenCoeffsOffdiag%uulo21n(atoms%nlod,atoms%ntype))
      94           0 :       ALLOCATE (thisDenCoeffsOffdiag%dulo21n(atoms%nlod,atoms%ntype))
      95           0 :       ALLOCATE (thisDenCoeffsOffdiag%ulou21n(atoms%nlod,atoms%ntype))
      96           0 :       ALLOCATE (thisDenCoeffsOffdiag%ulod21n(atoms%nlod,atoms%ntype))
      97             : 
      98           0 :       ALLOCATE (thisDenCoeffsOffdiag%uloulop21n(atoms%nlod,atoms%nlod,atoms%ntype))
      99             :    ELSE
     100         608 :       ALLOCATE (thisDenCoeffsOffdiag%uu21(1,1))
     101         608 :       ALLOCATE (thisDenCoeffsOffdiag%ud21(1,1))
     102         608 :       ALLOCATE (thisDenCoeffsOffdiag%du21(1,1))
     103         608 :       ALLOCATE (thisDenCoeffsOffdiag%dd21(1,1))
     104             : 
     105         608 :       ALLOCATE (thisDenCoeffsOffdiag%uulo21(1,1))
     106         608 :       ALLOCATE (thisDenCoeffsOffdiag%dulo21(1,1))
     107         608 :       ALLOCATE (thisDenCoeffsOffdiag%ulou21(1,1))
     108         608 :       ALLOCATE (thisDenCoeffsOffdiag%ulod21(1,1))
     109             : 
     110         608 :       ALLOCATE (thisDenCoeffsOffdiag%uloulop21(1,1,1))
     111             : 
     112         608 :       ALLOCATE (thisDenCoeffsOffdiag%uu21n(1,1))
     113         608 :       ALLOCATE (thisDenCoeffsOffdiag%ud21n(1,1))
     114         608 :       ALLOCATE (thisDenCoeffsOffdiag%du21n(1,1))
     115         608 :       ALLOCATE (thisDenCoeffsOffdiag%dd21n(1,1))
     116             : 
     117         608 :       ALLOCATE (thisDenCoeffsOffdiag%uulo21n(1,1))
     118         608 :       ALLOCATE (thisDenCoeffsOffdiag%dulo21n(1,1))
     119         608 :       ALLOCATE (thisDenCoeffsOffdiag%ulou21n(1,1))
     120         608 :       ALLOCATE (thisDenCoeffsOffdiag%ulod21n(1,1))
     121             : 
     122         608 :       ALLOCATE (thisDenCoeffsOffdiag%uloulop21n(1,1,1))
     123             :    END IF
     124             : 
     125         608 :    IF (noco%l_mperp.AND.l_fmpl) THEN
     126           0 :       ALLOCATE (thisDenCoeffsOffdiag%uunmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype))
     127           0 :       ALLOCATE (thisDenCoeffsOffdiag%udnmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype))
     128           0 :       ALLOCATE (thisDenCoeffsOffdiag%dunmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype))
     129           0 :       ALLOCATE (thisDenCoeffsOffdiag%ddnmt21((atoms%lmaxd+1)**2,sphhar%nlhd,atoms%ntype))
     130             :    ELSE
     131         608 :       ALLOCATE (thisDenCoeffsOffdiag%uunmt21(1,1,1))
     132         608 :       ALLOCATE (thisDenCoeffsOffdiag%udnmt21(1,1,1))
     133         608 :       ALLOCATE (thisDenCoeffsOffdiag%dunmt21(1,1,1))
     134         608 :       ALLOCATE (thisDenCoeffsOffdiag%ddnmt21(1,1,1))
     135             :    END IF
     136             : 
     137         608 :    thisDenCoeffsOffdiag%uu21 = CMPLX(0.0,0.0)
     138         608 :    thisDenCoeffsOffdiag%ud21 = CMPLX(0.0,0.0)
     139         608 :    thisDenCoeffsOffdiag%du21 = CMPLX(0.0,0.0)
     140         608 :    thisDenCoeffsOffdiag%dd21 = CMPLX(0.0,0.0)
     141             : 
     142         608 :    thisDenCoeffsOffdiag%uulo21 = CMPLX(0.0,0.0)
     143         608 :    thisDenCoeffsOffdiag%dulo21 = CMPLX(0.0,0.0)
     144         608 :    thisDenCoeffsOffdiag%ulou21 = CMPLX(0.0,0.0)
     145         608 :    thisDenCoeffsOffdiag%ulod21 = CMPLX(0.0,0.0)
     146             : 
     147         608 :    thisDenCoeffsOffdiag%uloulop21 = CMPLX(0.0,0.0)
     148             : 
     149         608 :    thisDenCoeffsOffdiag%uu21n = 0.0
     150         608 :    thisDenCoeffsOffdiag%ud21n = 0.0
     151         608 :    thisDenCoeffsOffdiag%du21n = 0.0
     152         608 :    thisDenCoeffsOffdiag%dd21n = 0.0
     153             : 
     154         608 :    thisDenCoeffsOffdiag%uulo21n = 0.0
     155         608 :    thisDenCoeffsOffdiag%dulo21n = 0.0
     156         608 :    thisDenCoeffsOffdiag%ulou21n = 0.0
     157         608 :    thisDenCoeffsOffdiag%ulod21n = 0.0
     158             : 
     159         608 :    thisDenCoeffsOffdiag%uloulop21n = 0.0
     160             : 
     161         608 :    thisDenCoeffsOffdiag%uunmt21 = CMPLX(0.0,0.0)
     162         608 :    thisDenCoeffsOffdiag%udnmt21 = CMPLX(0.0,0.0)
     163         608 :    thisDenCoeffsOffdiag%dunmt21 = CMPLX(0.0,0.0)
     164         608 :    thisDenCoeffsOffdiag%ddnmt21 = CMPLX(0.0,0.0)
     165             : 
     166         608 : END SUBROUTINE denCoeffsOffdiag_init
     167             : 
     168           0 : SUBROUTINE addRadFunScalarProducts(thisDenCoeffsOffdiag, atoms, f, g, flo, iType)
     169             : 
     170             :    USE m_types_setup
     171             :    USE m_int21       ! integrate (spin) off-diagonal radial functions
     172             :    USE m_int21lo     ! -"- for u_lo
     173             : 
     174             :    IMPLICIT NONE
     175             : 
     176             :    CLASS(t_denCoeffsOffdiag), INTENT(INOUT) :: thisDenCoeffsOffdiag
     177             :    TYPE(t_atoms),             INTENT(IN)    :: atoms
     178             :    REAL,                      INTENT(IN)    :: f(:,:,0:,:)!(atoms%jmtd,2,0:atoms%lmaxd,input%jspins)
     179             :    REAL,                      INTENT(IN)    :: g(:,:,0:,:)!(atoms%jmtd,2,0:atoms%lmaxd,input%jspins)
     180             :    REAL,                      INTENT(IN)    :: flo(:,:,:,:)!(atoms%jmtd,2,atoms%nlod,input%jspins)
     181             :    INTEGER,                   INTENT(IN)    :: iType
     182             : 
     183             :    INTEGER :: l, ilo
     184             : 
     185           0 :    DO l = 0,atoms%lmax(iType)
     186             :       CALL int_21(f,g,atoms,iType,l,thisDenCoeffsOffdiag%uu21n,thisDenCoeffsOffdiag%ud21n,&
     187           0 :                                     thisDenCoeffsOffdiag%du21n,thisDenCoeffsOffdiag%dd21n)
     188             :    END DO
     189           0 :    DO ilo = 1, atoms%nlo(iType)
     190             :       CALL int_21lo(f,g,atoms,iType,flo,ilo,thisDenCoeffsOffdiag%uulo21n,thisDenCoeffsOffdiag%ulou21n,&
     191             :                                             thisDenCoeffsOffdiag%dulo21n,thisDenCoeffsOffdiag%ulod21n,&
     192           0 :                                             thisDenCoeffsOffdiag%uloulop21n)
     193             :    END DO
     194             : 
     195           0 : END SUBROUTINE addRadFunScalarProducts
     196             : 
     197           0 : SUBROUTINE calcCoefficients(thisDenCoeffsOffdiag,atoms,sphhar,sym,eigVecCoeffs,we,noccbd)
     198             : 
     199             :    USE m_types_setup
     200             :    USE m_types_cdnval, ONLY: t_eigVecCoeffs
     201             :    USE m_rhomt21     ! calculate (spin) off-diagonal MT-density coeff's
     202             :    USE m_rhonmt21    ! -"-                       non-MT-density coeff's
     203             : 
     204             :    IMPLICIT NONE
     205             : 
     206             :    CLASS(t_denCoeffsOffdiag), INTENT(INOUT) :: thisDenCoeffsOffdiag
     207             :    TYPE(t_atoms),             INTENT(IN)    :: atoms
     208             :    TYPE(t_sphhar),            INTENT(IN)    :: sphhar
     209             :    TYPE(t_sym),               INTENT(IN)    :: sym
     210             :    TYPE(t_eigVecCoeffs),      INTENT(IN)    :: eigVecCoeffs
     211             :    INTEGER,                   INTENT(IN)    :: noccbd
     212             :    REAL,                      INTENT(IN)    :: we(noccbd)
     213             : 
     214             :    CALL rhomt21(atoms,we,noccbd,eigVecCoeffs,thisDenCoeffsOffdiag%uu21,thisDenCoeffsOffdiag%ud21,&
     215             :                 thisDenCoeffsOffdiag%du21,thisDenCoeffsOffdiag%dd21,thisDenCoeffsOffdiag%uulo21,&
     216             :                 thisDenCoeffsOffdiag%dulo21,thisDenCoeffsOffdiag%ulou21,thisDenCoeffsOffdiag%ulod21,&
     217           0 :                 thisDenCoeffsOffdiag%uloulop21)
     218           0 :    IF (thisDenCoeffsOffdiag%l_fmpl) THEN
     219             :       CALL rhonmt21(atoms,sphhar,we,noccbd,sym,eigVecCoeffs,thisDenCoeffsOffdiag%uunmt21,thisDenCoeffsOffdiag%udnmt21,&
     220           0 :                                                             thisDenCoeffsOffdiag%dunmt21,thisDenCoeffsOffdiag%ddnmt21)
     221             :    END IF
     222             : 
     223           0 : END SUBROUTINE calcCoefficients
     224             : 
     225           0 : END MODULE m_types_denCoeffsOffdiag

Generated by: LCOV version 1.13