LCOV - code coverage report
Current view: top level - kpoints - kpoints.f90 (source / functions) Hit Total Coverage
Test: combined.info Lines: 17 32 53.1 %
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_kpoints
       8             : contains
       9          26 :   subroutine kpoints(oneD,sym,cell,input,noco,banddos,kpts,l_kpts)
      10             :     USE m_juDFT
      11             :     USE m_types
      12             :     USE m_julia
      13             :     USE m_kptgen_hybrid
      14             :     USE m_od_kptsgen
      15             :     USE m_unfold_band_kpts
      16             :   
      17             :     implicit none
      18             :     TYPE(t_input),INTENT(IN)   :: input
      19             :     TYPE(t_sym),INTENT(IN)     :: sym
      20             :     TYPE(t_oneD),INTENT(IN)     :: oneD
      21             :     TYPE(t_cell),INTENT(IN)     :: cell
      22             :     TYPE(t_banddos),INTENT(IN)  :: banddos
      23             :     TYPE(t_noco),INTENT(IN)     :: noco
      24             :     TYPE(t_kpts),INTENT(INOUT)  :: kpts
      25             :     LOGICAL,INTENT(IN)          :: l_kpts
      26          26 :     TYPE(t_kpts)                :: p_kpts
      27             :     TYPE(t_cell)                :: p_cell
      28             :     TYPE(t_kpts)                :: tmp_kpts
      29             : 
      30          26 :     TYPE(t_sym) :: sym_hlp
      31             : 
      32          26 :     IF (input%l_wann) THEN
      33           0 :        IF (kpts%specificationType.NE.2) THEN
      34           0 :           CALL juDFT_error('l_wann only with kPointMesh', calledby = 'kpoints')
      35             :        END IF
      36             :     END IF
      37             : 
      38          26 :     IF (.NOT.l_kpts) THEN
      39          25 :        IF (.NOT.oneD%odd%d1) THEN
      40          25 :           IF (input%l_wann) THEN
      41           0 :              sym_hlp=sym
      42           0 :              sym_hlp%nop=1
      43           0 :              sym_hlp%nop2=1
      44           0 :              CALL kptgen_hybrid(input,cell,sym_hlp,kpts,noco%l_soc)
      45             :           ELSE IF (.FALSE.) THEN !this was used to generate q-points in jij case
      46             :              sym_hlp=sym
      47             :              sym_hlp%nop=1
      48             :              sym_hlp%nop2=1
      49             :              CALL julia(sym_hlp,cell,input,noco,banddos,kpts,.FALSE.,.TRUE.)
      50          25 :           ELSE IF (kpts%l_gamma.and.(banddos%ndir.eq.0)) THEN
      51           0 :              CALL kptgen_hybrid(input,cell,sym,kpts,noco%l_soc)
      52             :           ELSE
      53          25 :              IF (banddos%unfoldband) THEN
      54           0 :                CALL unfold_band_kpts(banddos,p_cell,cell,p_kpts,kpts)
      55           0 :                CALL julia(sym,cell,input,noco,banddos,kpts,.FALSE.,.TRUE.)
      56           0 :                CALL julia(sym,p_cell,input,noco,banddos,p_kpts,.FALSE.,.TRUE.)
      57           0 :                CALL find_supercell_kpts(banddos,p_cell,cell,p_kpts,kpts)
      58             :              ELSE
      59          25 :                CALL julia(sym,cell,input,noco,banddos,kpts,.FALSE.,.TRUE.)
      60             :              END IF
      61             :           END IF
      62             :        ELSE
      63           0 :           CALL juDFT_error('Error: No kpoint set generation for 1D systems yet!', calledby = 'kpoints')
      64           0 :           CALL od_kptsgen (kpts%nkpt)
      65             :        END IF
      66             : 
      67             :        !Rescale weights and kpoints
      68          25 :        IF (.not.banddos%unfoldband) THEN
      69          25 :           kpts%wtkpt(:) = kpts%wtkpt(:) / sum(kpts%wtkpt)
      70             :        END IF
      71          25 :        kpts%bk(:,:) = kpts%bk(:,:) / kpts%posScale
      72          25 :        kpts%posScale = 1.0
      73          25 :        IF (kpts%nkpt3(3).EQ.0) kpts%nkpt3(3) = 1
      74             :     ELSE
      75           1 :        IF (banddos%unfoldband) THEN
      76           0 :           CALL unfold_band_kpts(banddos,p_cell,cell,p_kpts,kpts)
      77           0 :           CALL find_supercell_kpts(banddos,p_cell,cell,p_kpts,kpts)
      78             :        END IF
      79             :     END IF
      80             : 
      81          26 : end subroutine kpoints
      82             : end module m_kpoints

Generated by: LCOV version 1.13