The Elk Code
 
Loading...
Searching...
No Matches
findkpt.f90
Go to the documentation of this file.
1
2! Copyright (C) 2007 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3! This file is distributed under the terms of the GNU General Public License.
4! See the file COPYING for license details.
5
6subroutine findkpt(vpl,isym,ik)
7use modmain
8implicit none
9! arguments
10real(8), intent(in) :: vpl(3)
11integer, intent(out) :: isym,ik
12! local variables
13integer i1,i2,i3,lspl
14real(8) v1(3),v2(3),t1
15v1(1:3)=vpl(1:3)-vkloff(1:3)/dble(ngridk(1:3))
16i1=modulo(nint(v1(1)*ngridk(1)),ngridk(1))
17i2=modulo(nint(v1(2)*ngridk(2)),ngridk(2))
18i3=modulo(nint(v1(3)*ngridk(3)),ngridk(3))
19ik=ivkik(i1,i2,i3)
20v1(1:3)=vkl(1:3,ik)
21! find the symmetry which rotates vkl to vpl
22do isym=1,nsymcrys
23 lspl=lsplsymc(isym)
24! multiply vpl by the transpose of the symmetry matrix (i.e. the inverse)
25 v2(1:3)=symlat(1,1:3,lspl)*vpl(1) &
26 +symlat(2,1:3,lspl)*vpl(2) &
27 +symlat(3,1:3,lspl)*vpl(3)
28 call r3frac(epslat,v2)
29 t1=abs(v1(1)-v2(1))+abs(v1(2)-v2(2))+abs(v1(3)-v2(3))
30 if (t1 < epslat) return
31end do
32write(*,*)
33write(*,'("Error(findkpt): equivalent k-point not in set")')
34write(*,'(" Requested k-point : ",3G18.10)') vpl
35write(*,*)
36stop
37end subroutine
38
subroutine findkpt(vpl, isym, ik)
Definition findkpt.f90:7
real(8) epslat
Definition modmain.f90:24
integer, dimension(3) ngridk
Definition modmain.f90:448
real(8), dimension(:,:), allocatable vkl
Definition modmain.f90:471
integer, dimension(:,:,:), allocatable ivkik
Definition modmain.f90:467
real(8), dimension(3) vkloff
Definition modmain.f90:450
integer nsymcrys
Definition modmain.f90:358
integer, dimension(3, 3, 48) symlat
Definition modmain.f90:344
integer, dimension(maxsymcrys) lsplsymc
Definition modmain.f90:364
pure subroutine r3frac(eps, v)
Definition r3frac.f90:10