init_singleOverlapLowering Function

private function init_singleOverlapLowering(csf_i, sOrb, pOrb, negSwitches, posSwitches, bVal) result(singleLowering)

Arguments

Type IntentOptional Attributes Name
type(CSF_Info_t), intent(in) :: csf_i
integer, intent(in) :: sOrb
integer, intent(in) :: pOrb
real(kind=dp), intent(in) :: negSwitches
real(kind=dp), intent(in) :: posSwitches
real(kind=dp), intent(in) :: bVal

Return Value type(WeightObj_t)


Contents


Source Code

    function init_singleOverlapLowering(csf_i, sOrb, pOrb, negSwitches, &
                                        posSwitches, bVal) result(singleLowering)
        type(CSF_Info_t), intent(in) :: csf_i
        integer, intent(in) :: sOrb, pOrb
        real(dp), intent(in) :: negSwitches, posSwitches, bVal
        type(WeightObj_t) :: singleLowering
        character(*), parameter :: this_routine = "init_singleOverlapLowering"

        type(WeightObj_t), target, save :: single

        ASSERT(sOrb > 0 .and. sOrb <= nSpatOrbs)
        ASSERT(pOrb > 0 .and. pOrb <= nSpatOrbs)
        ASSERT(negSwitches >= 0.0_dp)
        ASSERT(posSwitches >= 0.0_dp)

        ! misuse zero data element as this L-function in this case!
        singleLowering%dat%F = endFx(csf_i, sOrb)
        singleLowering%dat%G = endGx(csf_i, sOrb)

        single = init_singleWeight(csf_i, pOrb)

        singleLowering%ptr => single

        singleLowering%dat%minus = single%proc%minus(negSwitches, bVal, single%dat)
        singleLowering%dat%plus = single%proc%plus(posSwitches, bVal, single%dat)

        singleLowering%proc%minus => getMinus_overlapLowering
        singleLowering%proc%plus => getPlus_overlapLowering

    end function init_singleOverlapLowering