getSingleMatrixElement Function

public elemental function getSingleMatrixElement(step1, step2, deltaB, genFlag, bValue) result(hElement)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: step1
integer, intent(in) :: step2
integer, intent(in) :: deltaB
integer, intent(in) :: genFlag
real(kind=dp), intent(in) :: bValue

Return Value real(kind=dp)


Contents


Source Code

    elemental function getSingleMatrixElement(step1, step2, deltaB, genFlag, bValue) &
        result(hElement)
        ! Access the necessary single excitation product terms for the H matrix
        ! element calculation.
        !
        ! input:
        ! step1/2 ... stepvector values of CSFs, step1 is from <d'|
        ! deltaB  ... current delta b value of excitation
        ! genFlag ... generator flag of excitation
        ! bValue  ... current b value of CSF
        !
        ! output:
        ! hElement ... product term from shavitt graph rules used to calculate
        !               the matrix element between two given CSFs
        integer, intent(in) :: step1, step2, deltaB, genFlag
        real(dp), intent(in) :: bValue
        real(dp) :: hElement
        integer :: ind

        ! only need for this function is to correctly access the procedure
        ! pointers to get correct function -> get index from index matrix:
        ind = indArrOne(step1, step2, deltaB + (genFlag + 1) / 2)

        ! call correct function:
        hElement = singleMatElesGUGA(ind)%ptr(bValue)

    end function getSingleMatrixElement