get_diag Function

public function get_diag(mat) result(get_diag_dv)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in), dimension(:,:) :: mat

Return Value real(kind=8), dimension(size(mat,1))


Calls

proc~~get_diag~~CallsGraph proc~get_diag get_diag proc~assert_eq2 assert_eq2 proc~get_diag->proc~assert_eq2

Called by

proc~~get_diag~~CalledByGraph proc~get_diag get_diag proc~broyden1~2 broyden1 proc~broyden1~2->proc~get_diag

Source Code

  function get_diag(mat) result(get_diag_dv)
    real(8),dimension(:,:),intent(in)      :: mat
    real(8), dimension(size(mat,1))        :: get_diag_dv
    integer                                :: j
    j=assert_eq2(size(mat,1),size(mat,2),'get_diag_dv')
    do j=1,size(mat,1)
       get_diag_dv(j)=mat(j,j)
    end do
  end function get_diag