Computes diagonal elements of [mat1,mat2]=mat1.mat2-mat2.mat1
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp) | :: | mat1(dim,dim) | ||||
| complex(kind=dp) | :: | mat2(dim,dim) | ||||
| integer | :: | dim |
function utility_commutator_diag(mat1, mat2, dim) !================================================! ! !! Computes diagonal elements of !! [mat1,mat2]=mat1.mat2-mat2.mat1 ! !================================================! use w90_constants, only: dp integer :: dim complex(kind=dp) :: utility_commutator_diag(dim) complex(kind=dp) :: mat1(dim, dim) complex(kind=dp) :: mat2(dim, dim) utility_commutator_diag = utility_matmul_diag(mat1, mat2, dim) - utility_matmul_diag(mat2, mat1, dim) end function utility_commutator_diag