getMinus_overlapRaising Function

private function getMinus_overlapRaising(nSwitches, bVal, dat) result(minusWeight)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: nSwitches
real(kind=dp), intent(in) :: bVal
type(WeightData_t), intent(in) :: dat

Return Value real(kind=dp)


Contents


Source Code

    function getMinus_overlapRaising(nSwitches, bVal, dat) result(minusWeight)
        real(dp), intent(in) :: nSwitches, bVal
        type(WeightData_t), intent(in) :: dat
        real(dp) :: minusWeight
        character(*), parameter :: this_routine = "getMinus_overlapRaising"

        ASSERT(nSwitches >= 0.0_dp)

        if (near_zero(bVal)) then
            !minusWeight = dat%F*(dat%minus + (1.0_dp - dat%G)*dat%plus) + &
            !    nSwitches*dat%G*(dat%zero*dat%plus + (1.0_dp - dat%F)*dat%minus)
            minusWeight = dat%F * (dat%minus + (1.0_dp - dat%G) * dat%plus) + &
                          nSwitches * dat%G * (dat%plus + (1.0_dp - dat%F) * dat%minus)

        else
            ! minusWeight = dat%F*(dat%minus + (1.0_dp - dat%G)*dat%plus) + &
            !     nSwitches*dat%G/bVal*(dat%zero*dat%plus + (1.0_dp - dat%F)*dat%minus)
            minusWeight = dat%F * (dat%minus + (1.0_dp - dat%G) * dat%plus) + &
                          nSwitches * dat%G / bVal * (dat%plus + (1.0_dp - dat%F) * dat%minus)
        end if

        ASSERT(minusWeight >= 0.0_dp)

    end function getMinus_overlapRaising