LCOV - code coverage report
Current view: top level - wannier - wann_get_mp.f (source / functions) Hit Total Coverage
Test: combined.info Lines: 0 26 0.0 %
Date: 2019-09-08 04:53:50 Functions: 0 1 0.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_wann_get_mp
       8             :       use m_juDFT
       9             :       contains
      10           0 :       subroutine wann_get_mp(
      11           0 :      >               nkpts,kpoints,
      12           0 :      <               num)
      13             : c**************************************
      14             : c     Determine the structure of the
      15             : c     Monkhorst-Pack mesh.
      16             : c     
      17             : c     Frank Freimuth
      18             : c**************************************
      19             :       implicit none
      20             :       integer,intent(in)  :: nkpts
      21             :       real,intent(in)     :: kpoints(:,:)
      22             :       integer,intent(out) :: num(:)
      23             :       
      24             :       integer :: dim,iter
      25             :       real    :: maxi,mini,increm,compare
      26             : 
      27           0 :       IF(SIZE(kpoints,1)/=3)      CALL juDFT_error("wann_get_mp: 1"
      28           0 :      +     ,calledby ="wann_get_mp")
      29           0 :       IF(SIZE(kpoints,2)/=nkpts)  CALL juDFT_error("wann_get_mp: 2"
      30           0 :      +     ,calledby ="wann_get_mp")
      31           0 :       IF(SIZE(num,1)/=3)          CALL juDFT_error("wann_get_mp: 3"
      32           0 :      +     ,calledby ="wann_get_mp")
      33             : 
      34           0 :       do dim=1,3
      35           0 :          maxi=maxval(kpoints(dim,:))
      36           0 :          mini=minval(kpoints(dim,:))
      37           0 :          if(mini==maxi)then
      38           0 :             num(dim)=1
      39             :          else   
      40           0 :             increm=maxi-mini
      41           0 :             do iter=1,nkpts
      42           0 :                compare=maxi-kpoints(dim,iter)
      43           0 :                if(abs(compare).lt.1e-6)cycle
      44           0 :                if(compare.lt.increm) then
      45           0 :                   increm=compare
      46             :                endif   
      47             :             enddo
      48           0 :             num(dim)=(maxi-mini)/increm+1.01
      49             :          endif   
      50             :       enddo
      51           0 :       write(6,*)"wann_get_mp: determination of mp-grid parameters:"
      52           0 :       write(6,*)"mp_1=",num(1),"mp_2=",num(2),"mp_3=",num(3)
      53           0 :       IF(num(1)*num(2)*num(3)/=nkpts)  CALL juDFT_error
      54           0 :      +     ("mysterious kpoints",calledby ="wann_get_mp")
      55             : 
      56           0 :       end subroutine wann_get_mp
      57             :       end module m_wann_get_mp

Generated by: LCOV version 1.13