Sum of diagonal terms of a rank 2 Tensor.
Tensor2
Tensor2s
type(Tensor2) :: T real(kind=8) :: trace trace = tr(T)