sltcnd_2_kernel_ua Function

private function sltcnd_2_kernel_ua(ex) result(hel)

Arguments

Type IntentOptional Attributes Name
type(Excite_2_t), intent(in) :: ex

Return Value real(kind=dp)


Contents

Source Code


Source Code

    function sltcnd_2_kernel_ua(ex) result(hel)
        type(Excite_2_t), intent(in) :: ex
        HElement_t(dp) :: hel
        integer :: id(2, 2)
        ! Obtain spatial rather than spin indices if required
        id = ex%val

        associate(src1 => ex%val(1, 1), tgt1 => ex%val(2, 1), &
                   src2 => ex%val(1, 2), tgt2 => ex%val(2, 2))

            if (tReltvy .or. ((G1(src1)%Ms == G1(tgt1)%Ms) .and. &
                              (G1(src2)%Ms == G1(tgt2)%Ms))) then
                hel = get_umat_el(id(1, 1), id(1, 2), id(2, 1), id(2, 2))
            else
                hel = (0)
            end if
            if (tReltvy .or. ((G1(src1)%Ms == G1(tgt2)%Ms) .and. &
                              (G1(src2)%Ms == G1(tgt1)%Ms))) then
                hel = hel - get_umat_el(id(1, 1), id(1, 2), id(2, 2), id(2, 1))
            end if
        end associate
    end function sltcnd_2_kernel_ua