calc_eigenvalues_real Function

private function calc_eigenvalues_real(matrix) result(e_values)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: matrix(:,:)

Return Value real(kind=dp), (size(matrix,1))


Contents

Source Code


Source Code

    function calc_eigenvalues_real(matrix) result(e_values)
        real(dp), intent(in) :: matrix(:,:)
        real(dp) :: e_values(size(matrix,1))
        character(*), parameter :: this_routine = 'calc_eigenvalues_real'

        integer :: n, info
        real(dp) :: work(3*size(matrix,1))
        real(dp) :: tmp_matrix(size(matrix,1),size(matrix,2)),dummy_val(size(matrix,1))
        real(dp) :: dummy_vec_1(1,size(matrix,1)), dummy_vec_2(1,size(matrix,1))

        n = size(matrix,1)

        tmp_matrix = matrix
        call dgeev('N','N', n, tmp_matrix, n, e_values, &
            dummy_val, dummy_vec_1,1,dummy_vec_2,1,work,3*n,info)
        if (info /= 0) call stop_all(this_routine, 'Failed in BLAS call.')
        call sort(e_values)

    end function calc_eigenvalues_real