LCOV - code coverage report
Current view: top level - wannier - wann_get_kpts.f (source / functions) Coverage Total Hit
Test: FLEUR test coverage Lines: 48.1 % 27 13
Test Date: 2025-06-14 04:34:23 Functions: 100.0 % 1 1

            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           10 :       subroutine wann_get_kpts(input,kpts,
      12              :      >               l_bzsym,film,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              : 
      20              :       USE m_constants
      21              : 
      22              :       implicit none
      23              : 
      24              :       TYPE(t_input), INTENT(IN) :: input
      25              :       TYPE(t_kpts), INTENT(IN)  :: kpts
      26              :       logical,intent(in)  :: l_bzsym,film
      27              :       logical,intent(in)  :: l_readkpts
      28              :       integer,intent(out) :: nkpts
      29              :       real,intent(inout),allocatable  :: kpoints(:,:)
      30              : 
      31              :       real             :: scale
      32              :       integer          :: at,j
      33              :       integer          :: iter,len,num_wann,num_bands,nn,i
      34              :       logical          :: l_file
      35              : 
      36           10 :       call timestart("wann_get_kpts")
      37           10 :       if(l_bzsym)then
      38            0 :          inquire(file='w90kpts',exist=l_file)
      39            0 :          IF(.NOT.l_file) CALL juDFT_error("where is w90kpts?",calledby
      40            0 :      +        ="wann_get_kpts")
      41            0 :          open(987,file='w90kpts',status='old',form='formatted')
      42            0 :          read(987,*)nkpts, scale
      43            0 :          write(oUnit,*)"wann_get_kpts: nkpts=",nkpts
      44            0 :          if(l_readkpts)then
      45            0 :             IF(SIZE(kpoints,1)/=3) CALL juDFT_error("wann_get_kpts: 1"
      46            0 :      +           ,calledby ="wann_get_kpts")
      47            0 :             IF(SIZE(kpoints,2)/=nkpts)CALL juDFT_error("wann_get_kpts:2"
      48            0 :      +           ,calledby ="wann_get_kpts")
      49            0 :             do iter=1,nkpts
      50            0 :                read(987,*)kpoints(:,iter)
      51              :             enddo
      52              :          endif
      53            0 :          close(987)
      54              :       else
      55           10 :              nkpts = kpts%nkpt
      56           10 :             write(oUnit,*)"wann_get_kpts: nkpts=",nkpts
      57           10 :             if(l_readkpts)then
      58           45 :                do iter=1,nkpts
      59          165 :                   kpoints(:,iter) = kpts%bk(:,iter)
      60              :                enddo
      61              :             endif
      62              :       endif
      63              : 
      64           10 :       IF (l_readkpts) THEN
      65           45 :          do iter=1,nkpts
      66           45 :             write(oUnit,*)kpoints(:,iter)
      67              :          enddo
      68              :       END IF
      69              : 
      70           10 :       call timestop("wann_get_kpts")
      71           10 :       end subroutine wann_get_kpts
      72              :       end module m_wann_get_kpts
        

Generated by: LCOV version 2.0-1