multiply_hamil_and_vector_full_real Subroutine

public subroutine multiply_hamil_and_vector_full_real(this, input_vector, output_vector)

Arguments

Type IntentOptional Attributes Name
type(HamiltonianCalcType), intent(inout) :: this
real(kind=dp), intent(in) :: input_vector(:)
real(kind=dp), intent(out) :: output_vector(:)

Contents


Source Code

    subroutine multiply_hamil_and_vector_full_real(this, input_vector, output_vector)
        type(HamiltonianCalcType), intent(inout) :: this
        real(dp), intent(in) :: input_vector(:)
        real(dp), intent(out) :: output_vector(:)

        ! This function performs y := alpha*a*x + beta*y
        ! N specifies not to use the transpose of a.
        ! space_size is the number of rows in a.
        ! space_size is the number of columns of a.
        ! alpha = 1.0_dp.
        ! a = hamiltonian.
        ! space_size is the first dimension of a.
        ! input x = input_vector.
        ! 1 is the increment of the elements of x.
        ! beta = 0.0_dp.
        ! output y = output_vector.
        ! 1 is the increment of the elements of y.

        associate(space_size => this%space_size)

            call dgemv('N', &
                       space_size, &
                       space_size, &
                       1.0_dp, &
                       hamiltonian, &
                       space_size, &
                       input_vector, &
                       1, &
                       0.0_dp, &
                       output_vector, &
                       1)

        end associate
    end subroutine multiply_hamil_and_vector_full_real