init_fullDoubleWeight Function

private function init_fullDoubleWeight(csf_i, sOrb, pOrb, oOrb, negSwitches1, negSwitches2, posSwitches1, posSwitches2, bVal1, bVal2) result(fullDouble)

Arguments

Type IntentOptional Attributes Name
type(CSF_Info_t), intent(in) :: csf_i
integer, intent(in) :: sOrb
integer, intent(in) :: pOrb
integer, intent(in) :: oOrb
real(kind=dp), intent(in) :: negSwitches1
real(kind=dp), intent(in) :: negSwitches2
real(kind=dp), intent(in) :: posSwitches1
real(kind=dp), intent(in) :: posSwitches2
real(kind=dp), intent(in) :: bVal1
real(kind=dp), intent(in) :: bVal2

Return Value type(WeightObj_t)


Contents

Source Code


Source Code

    function init_fullDoubleWeight(csf_i, sOrb, pOrb, oOrb, negSwitches1, &
                                   negSwitches2, posSwitches1, posSwitches2, bVal1, bVal2) result(fullDouble)
        type(CSF_Info_t), intent(in) :: csf_i
        integer, intent(in) :: sOrb, pOrb, oOrb
        real(dp), intent(in) :: negSwitches1, negSwitches2, posSwitches1, &
                                posSwitches2, bVal1, bVal2
        type(WeightObj_t) :: fullDouble
        character(*), parameter :: this_routine = "init_fullDoubleWeight"

        type(WeightObj_t), target, save :: fullStart

        ASSERT(sOrb > 0 .and. sOrb <= nSpatOrbs)
        ASSERT(pOrb > 0 .and. pOrb <= nSpatOrbs)
        ASSERT(oOrb > 0 .and. oOrb <= nSpatOrbs)
        ASSERT(negSwitches1 >= 0.0_dp)
        ASSERT(negSwitches2 >= 0.0_dp)
        ASSERT(posSwitches1 >= 0.0_dp)
        ASSERT(posSwitches2 >= 0.0_dp)

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

        fullStart = init_fullStartWeight(csf_i, pOrb, oOrb, negSwitches2, &
                                         posSwitches2, bVal2)

        fullDouble%ptr => fullStart

        fullDouble%dat%minus = fullStart%proc%minus(negSwitches1, bVal1, fullStart%dat)
        fullDouble%dat%plus = fullStart%proc%plus(posSwitches1, bVal1, fullStart%dat)
        fullDouble%dat%zero = fullStart%proc%zero(negSwitches1, posSwitches1, &
                                                  bVal1, fullStart%dat)

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

        fullDouble%initialized = .true.

    end function init_fullDoubleWeight