The Elk Code
 
Loading...
Searching...
No Matches
eveqnuv.f90
Go to the documentation of this file.
1
2! Copyright (C) 2019 Chung-Yu Wang, J. K. Dewhurst, S. Sharma and
3! E. K. U. Gross. This file is distributed under the terms of the GNU General
4! Public License. See the file COPYING for license details.
5
6subroutine eveqnuv(n,au,bv,w)
7implicit none
8! arguments
9integer, intent(in) :: n
10complex(8), intent(inout) :: au(n,n),bv(n,n)
11real(8), intent(out) :: w(n)
12! local variables
13integer n2,i,j
14! allocatable arrays
15real(8), allocatable :: w2(:)
16complex(8), allocatable :: h(:,:)
17n2=2*n
18! setup the fermionic Bogoliubov Hamiltonian
19allocate(w2(n2),h(n2,n2))
20do j=1,n
21 do i=1,j
22 h(i,j)=au(i,j)
23 h(n+i,n+j)=-au(i,j)
24 end do
25end do
26do j=1,n
27 do i=1,n
28 h(i,n+j)=bv(i,j)
29 end do
30end do
31! find the eigenvalues and eigenvectors
32call eveqnzh(n2,n2,h,w2)
33! copy to output arrays
34do i=1,n
35! choose the positive eigenvalues
36 j=n+i
37 w(i)=w2(j)
38 call zcopy(n,h(1,j),1,au(1,i),1)
39 call zcopy(n,h(n+1,j),1,bv(1,i),1)
40end do
41deallocate(w2,h)
42end subroutine
43
subroutine eveqnuv(n, au, bv, w)
Definition eveqnuv.f90:7
subroutine eveqnzh(n, ld, a, w)
Definition eveqnzh.f90:7