Imaginary part of the trace
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp) | :: | 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) :: mat(:, :) integer :: i, mydim complex(kind=dp) :: cdum mydim = size(mat, 1) cdum = cmplx_0 do i = 1, mydim cdum = cdum + mat(i, i) end do utility_im_tr = aimag(cdum) end function utility_im_tr