get_diagonal Subroutine

public subroutine get_diagonal(mat, d)

Returns the diagonal elements of a square matrix.

Arguments

Type IntentOptional AttributesName
real(kind=rp), intent(in), dimension(:,:):: mat

(n,n) array

real(kind=rp), intent(out), dimension(:):: d

(n,) array; contains the entries of the main diagonal


Contents

None