LCOV - code coverage report
Current view: top level - cdn_mt - magMultipoles.F90 (source / functions) Hit Total Coverage
Test: FLEUR test coverage Lines: 18 18 100.0 %
Date: 2024-04-28 04:28:00 Functions: 1 1 100.0 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------
       2             : ! Copyright (c) 2020 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             : MODULE m_magMultipoles
       7             :   USE m_types
       8             :   USE m_juDFT
       9             :   USE m_constants
      10             :   IMPLICIT NONE
      11             : CONTAINS
      12          62 :   SUBROUTINE magMultipoles(sym,juphon,stars, atoms,cell, sphhar, vacuum, input, noco,nococonv,outden)
      13             :     USE m_plot
      14             :     USE m_divergence
      15             :     USE m_mpmom
      16             :     TYPE(t_input),INTENT(IN)                    :: input
      17             :     TYPE(t_atoms), INTENT(IN)                   :: atoms
      18             :     TYPE(t_sphhar), INTENT(IN)                  :: sphhar
      19             :     TYPE(t_sym), INTENT(IN)                     :: sym
      20             :     TYPE(t_juphon), INTENT(IN)                  :: juphon
      21             :     TYPE(t_noco), INTENT(IN)                    :: noco
      22             :     TYPE(t_nococonv), INTENT(IN)                :: nococonv
      23             :     TYPE(t_stars),INTENT(IN)                    :: stars
      24             :     TYPE(t_cell),INTENT(IN)                     :: cell
      25             :     TYPE(t_vacuum),INTENT(IN)                   :: vacuum
      26             :     TYPE(t_potden), INTENT(in)                  :: outden
      27             : 
      28             : 
      29        3286 :     TYPE(t_potden) :: cden,m_den(3),div
      30          62 :     COMPLEX:: qlmo(-atoms%lmaxd:atoms%lmaxd,0:atoms%lmaxd,atoms%ntype)
      31             :     INTEGER:: n,l,m
      32             : 
      33             : 
      34             :     CALL cden%init(stars%ng3,atoms%jmtd,atoms%msh,sphhar%nlhd,atoms%ntype,0,0,input%jspins,.FALSE.,.FALSE.,1001,&
      35          62 :          vacuum%nmzd,vacuum%nmzxyd,stars%ng2)
      36         248 :     DO n=1,3
      37             :        CALL m_den(n)%init(stars%ng3,atoms%jmtd,atoms%msh,sphhar%nlhd,atoms%ntype,0,0,input%jspins,.FALSE.,.FALSE.,1001,&
      38         248 :             vacuum%nmzd,vacuum%nmzxyd,stars%ng2)
      39             :     ENDDO
      40             :     CALL div%init(stars%ng3,atoms%jmtd,atoms%msh,sphhar%nlhd,atoms%ntype,0,0,input%jspins,.FALSE.,.FALSE.,1001,&
      41          62 :     vacuum%nmzd,vacuum%nmzxyd,stars%ng2)
      42         248 :     allocate(div%pw_w,mold=div%pw)
      43             : 
      44             :     !Generate magnetization out of density matrix
      45             :     CALL matrixsplit(sym,stars, atoms, sphhar, vacuum, input, noco,nococonv, 1.0, &
      46          62 :          outden, cden, m_den(1), m_den(2), m_den(3))
      47             :     !Calcalate divergence
      48          62 :     CALL divergence(input,stars,atoms,sphhar,vacuum,sym,cell,noco,m_den,div)
      49       11472 :     qlmo = 0.0
      50          62 :     CALL mt_moments( input, atoms, sym, juphon, sphhar, div%mt(:,:,:,1), POTDEN_TYPE_POTCOUL,qlmo,.FALSE.)
      51             : 
      52          62 :     WRITE(oUnit,*) "Magnetic Multipoles:"
      53         132 :     DO n=1,atoms%ntype
      54          70 :        WRITE(oUnit,*) "Atom type:",n
      55         482 :        DO l=0,4
      56         420 :           WRITE(oUnit,"(10(2f12.7,3x))") (qlmo(m,l,n),m=-l,l)
      57             :        ENDDO
      58             :     ENDDO
      59        3038 :   END SUBROUTINE magMultipoles
      60             : END MODULE m_magMultipoles

Generated by: LCOV version 1.14