1
!{\src2tex{textfont=tt}}
7
!! Check if the k-point is in the set of the kbz
8
!! (subtracting the reciprocal vector g0)
9
!! and return the index number and the reciprocal vector g0
12
!! Copyright (C) 1999-2007 ABINIT group (GMR, VO, LR, RWG)
13
!! This file is distributed under the terms of the
14
!! GNU General Public License, see ~abinit/COPYING
15
!! or http://www.gnu.org/copyleft/gpl.txt .
16
!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt .
21
!! k(3)=k point to be found in the BZ
22
!! kbz(3,nkbz)=coordinates of k points in BZ
23
!! nkbz=number of k points in BZ
26
!! logical function findkp= 1 if found
27
!! ik=index of the k opint in BZ
28
!! g0=reciprocal vector to be subtracted
32
#if defined HAVE_CONFIG_H
36
logical function findkp(nkbz,kbz,ik,k,g0)
40
!This section has been created automatically by the script Abilint (TD). Do not modify these by hand.
41
#ifdef HAVE_FORTRAN_INTERFACES
42
use interfaces_15gw, except_this_one => findkp
44
!End of the abilint section
48
!Arguments ------------------------------------
50
integer,intent(in) :: nkbz
51
integer,intent(out) :: ik
53
integer,intent(out) :: g0(3)
54
real(dp),intent(in) :: k(3),kbz(3,nkbz)
56
!Local variables ------------------------------
58
integer :: ig1,ig2,ig3,ikp
61
real(dp) :: kdiff(3),kp(3)
63
! *************************************************************************
64
!This section has been created automatically by the script Abilint (TD). Do not modify these by hand.
65
#ifndef HAVE_FORTRAN_INTERFACES
68
!End of the abilint section
74
! compute kdiff=k''-k+G0
78
kdiff(2)=kp(2)-k(2)+ig2
80
kdiff(3)=kp(3)-k(3)+ig3
81
! check if kdiff=k''-k+G0 is null
82
if(itst0(kdiff)==1) then
83
! check if k has been yet found
85
write(6,*) '**error,findkp 1: kp yet found'
87
write(6,*) ik,kbz(:,ik),g0
88
write(6,*) ikp,kbz(:,ikp),ig1,ig2,ig3