The Elk Code
Loading...
Searching...
No Matches
dynevs.f90
Go to the documentation of this file.
1
2
! Copyright (C) 2014 J. K. Dewhurst, S. Sharma and E. K. U. Gross.
3
! This file is distributed under the terms of the GNU General Public License.
4
! See the file COPYING for license details.
5
6
subroutine
dynevs
(ev,dq,wq)
7
use
modmain
8
use
modphonon
9
implicit none
10
! arguments
11
complex(8)
,
intent(in)
:: ev(nbph,nbph)
12
complex(8)
,
intent(inout)
:: dq(nbph,nbph)
13
real
(8),
intent(out)
:: wq(nbph)
14
! local variables
15
integer
i,j,k
16
real
(8) t1,t2
17
complex(8)
z1
18
! automatic arrays
19
real
(8) wt(nbph)
20
! find the eigenvalues and eigenvectors of the matrix dq
21
call
eveqnzh
(nbph,nbph,dq,wq)
22
! reorder eigenvalues so that the eigenvectors maximally overlap with ev
23
wt(:)=wq(:)
24
do
i=1,nbph
25
j=1
26
t1=0.d0
27
do
k=1,nbph
28
z1=dot_product(ev(:,i),dq(:,k))
29
t2=z1%re**2+z1%im**2
30
if
(t2 > t1)
then
31
j=k
32
t1=t2
33
end if
34
end do
35
wq(i)=wt(j)
36
end do
37
end subroutine
38
dynevs
subroutine dynevs(ev, dq, wq)
Definition
dynevs.f90:7
eveqnzh
subroutine eveqnzh(n, ld, a, w)
Definition
eveqnzh.f90:7
modmain
Definition
modmain.f90:6
modphonon
Definition
modphonon.f90:6
dynevs.f90
Generated by
1.9.8