The Elk Code
 
Loading...
Searching...
No Matches
dmatwx.f90
Go to the documentation of this file.
1
2! Copyright (C) 2020 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 dmatwx(n,w,x,dxx,dwx,xn)
7implicit none
8! arguments
9integer, intent(in) :: n
10complex(8), intent(in) :: w(n,n),x(n,n)
11complex(8), intent(out) :: dxx(n,n),dwx(n,n)
12real(8), intent(out) :: xn(n)
13! local variables
14integer i
15real(8), external :: dznrm2
16! normal bosonic density matrix XX†
17call zgemm('N','C',n,n,n,(1.d0,0.d0),x,n,x,n,(0.d0,0.d0),dxx,n)
18! store the X-norm
19do i=1,n
20 xn(i)=dznrm2(n,x(:,i),1)**2
21end do
22! anomalous density matrix -WX†
23call zgemm('N','C',n,n,n,(-1.d0,0.d0),w,n,x,n,(0.d0,0.d0),dwx,n)
24end subroutine
25
subroutine dmatwx(n, w, x, dxx, dwx, xn)
Definition dmatwx.f90:7