diagonalize_core_non_hermitian Subroutine

public subroutine diagonalize_core_non_hermitian(e_values, e_vectors, rep)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(out), allocatable :: e_values(:)
real(kind=dp), allocatable :: e_vectors(:,:)
type(core_space_t), intent(in) :: rep

Contents


Source Code

    subroutine diagonalize_core_non_hermitian(e_values, e_vectors, rep)
        type(core_space_t), intent(in) :: rep
        real(dp), allocatable, intent(out) :: e_values(:)
        HElement_t(dp), allocatable :: e_vectors(:, :)
        HElement_t(dp), allocatable :: full_H(:, :)
        integer i, nI(nel), space_size

        ! if the Hamiltonian is non-hermitian we cannot use the
        ! standard Lanzcos or Davidson routines. so:
        ! build the full Hamiltonian
        call calc_determin_hamil_full(full_H, rep)

        if (t_print_core_info) then
            root_print "The determinants are"
            root_print "semistochastic basis:"
            if_root
            do i = 1, rep%determ_space_size
                call decode_bit_det(nI, rep%core_space(:, i))
                print *, nI
            end do
            end_if_root

            root_print "deterministic hamiltonian:"
            if_root
            call print_matrix(full_H)
            end_if_root
        end if

        allocate(e_values(size(full_H, 1)))
        allocate(e_vectors(size(full_H, 1), size(full_H, 1)))
        e_values = 0.0_dp
        e_vectors = 0.0_dp

        call eig(full_H, e_values, e_vectors)

        ! maybe we also want to start from a different eigenvector in
        ! this case? this would be practial for the hubbard problem case..
        root_print "Full diagonalisation for non-hermitian Hamiltonian completed!"

    end subroutine diagonalize_core_non_hermitian