LCOV - code coverage report
Current view: top level - wannier - wann_get_kpts.f (source / functions) Hit Total Coverage
Test: combined.info Lines: 0 44 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_kpts
       8             :       use m_juDFT
       9             :       USE m_types
      10             :       contains
      11           0 :       subroutine wann_get_kpts(input,kpts,
      12             :      >               l_bzsym,film,l_onedimens,l_readkpts,
      13             :      <               nkpts,kpoints)
      14             : c********************************************************
      15             : c     Read in the k-points from kpts/w90kpts file.
      16             : c 
      17             : c     Frank Freimuth
      18             : c********************************************************
      19             :       implicit none
      20             :       TYPE(t_input), INTENT(IN) :: input
      21             :       TYPE(t_kpts), INTENT(IN)  :: kpts
      22             :       logical,intent(in)  :: l_bzsym,film
      23             :       logical,intent(in)  :: l_onedimens,l_readkpts
      24             :       integer,intent(out) :: nkpts
      25             :       real,intent(inout),allocatable  :: kpoints(:,:)
      26             : 
      27             :       real             :: scale
      28             :       integer          :: at,j
      29             :       integer          :: iter,len,num_wann,num_bands,nn,i
      30             :       logical          :: l_file
      31             : 
      32           0 :       if(l_bzsym)then
      33           0 :          inquire(file='w90kpts',exist=l_file)
      34           0 :          IF(.NOT.l_file) CALL juDFT_error("where is w90kpts?",calledby
      35           0 :      +        ="wann_get_kpts")
      36           0 :          open(987,file='w90kpts',status='old',form='formatted')
      37           0 :          read(987,*)nkpts, scale
      38           0 :          write(6,*)"wann_get_kpts: nkpts=",nkpts
      39           0 :          if(l_readkpts)then
      40           0 :             IF(SIZE(kpoints,1)/=3) CALL juDFT_error("wann_get_kpts: 1"
      41           0 :      +           ,calledby ="wann_get_kpts")
      42           0 :             IF(SIZE(kpoints,2)/=nkpts)CALL juDFT_error("wann_get_kpts:2"
      43           0 :      +           ,calledby ="wann_get_kpts")
      44           0 :             do iter=1,nkpts
      45           0 :                read(987,*)kpoints(:,iter)
      46             :             enddo
      47             :          endif
      48           0 :          close(987)
      49             :       else
      50           0 :          IF(.NOT.input%l_inpXML) THEN
      51           0 :             inquire(file='kpts',exist=l_file)
      52           0 :             IF(.NOT.l_file) CALL juDFT_error("where is kpts?",calledby
      53           0 :      +           ="wann_get_kpts")
      54           0 :             open(987,file='kpts',status='old',form='formatted')
      55           0 :             read(987,*)nkpts,scale
      56           0 :             write(6,*)"wann_get_kpts: nkpts=",nkpts
      57           0 :             if(l_readkpts)then
      58           0 :                IF(SIZE(kpoints,1)/=3) 
      59             :      +            CALL juDFT_error("wann_get_kpts: 1",
      60           0 :      +                             calledby ="wann_get_kpts")
      61           0 :                IF(SIZE(kpoints,2)/=nkpts)
      62             :      +            CALL juDFT_error("wann_get_kpts:2",
      63           0 :      +                             calledby ="wann_get_kpts")
      64           0 :                do iter=1,nkpts
      65           0 :                   read(987,*)kpoints(:,iter)
      66             :                enddo
      67             :             endif
      68           0 :             close(987)
      69             :          ELSE
      70           0 :             nkpts = kpts%nkpt
      71           0 :             write(6,*)"wann_get_kpts: nkpts=",nkpts
      72           0 :             if(l_readkpts)then
      73           0 :                do iter=1,nkpts
      74           0 :                   kpoints(:,iter) = kpts%bk(:,iter)
      75             :                enddo
      76             :             endif
      77             :          END IF
      78             :       endif
      79             : 
      80           0 :       if(l_readkpts.AND..NOT.input%l_inpXML)then
      81           0 :          kpoints=kpoints/scale
      82           0 :          if(film.and..not.l_onedimens)then 
      83           0 :             kpoints(3,:)=0.0
      84             :          endif
      85             :       endif
      86           0 :       IF (l_readkpts) THEN
      87           0 :          do iter=1,nkpts
      88           0 :             write(6,*)kpoints(:,iter)
      89             :          enddo
      90             :       END IF
      91             : 
      92           0 :       end subroutine wann_get_kpts
      93             :       end module m_wann_get_kpts

Generated by: LCOV version 1.13