init_semiStartWeight Function

public function init_semiStartWeight(csf_i, sOrb, pOrb, negSwitches, posSwitches, bVal) result(semiStart)

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


Source Code

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

        type(WeightObj_t), target, save :: double

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

        semiStart%dat%F = endFx(csf_i, sOrb)
        semiStart%dat%G = endGx(csf_i, sOrb)

        double = init_doubleWeight(csf_i, pOrb)

        semiStart%ptr => double

        semiStart%dat%minus = double%proc%minus(negSwitches, bVal, double%dat)
        semiStart%dat%plus = double%proc%plus(posSwitches, bVal, double%dat)
        semiStart%dat%zero = double%proc%zero(negSwitches, posSwitches, bVal, double%dat)

        semiStart%proc%minus => getMinus_semiStart
        semiStart%proc%plus => getPlus_semiStart

        semiStart%initialized = .true.

    end function init_semiStartWeight