Imaginary part of the trace
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp), | dimension(:, :) | :: | mat |
function utility_im_tr(mat)
!=============================!
! !
!! Imaginary part of the trace
! !
!=============================!
use w90_constants, only: dp, cmplx_0
real(kind=dp) :: utility_im_tr
complex(kind=dp), dimension(:, :) :: mat
integer :: i, mydim
complex(kind=dp) :: cdum
mydim = size(mat, 1)
cdum = cmplx_0
do i = 1, mydim
cdum = cdum + mat(i, i)
enddo
utility_im_tr = aimag(cdum)
end function utility_im_tr