getPlus_single Function

private function getPlus_single(nSwitches, bVal, single) result(plusWeight)

Arguments

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

Return Value real(kind=dp)


Contents

Source Code


Source Code

    function getPlus_single(nSwitches, bVal, single) result(plusWeight)
        real(dp), intent(in) :: nSwitches, bVal
        type(WeightData_t), intent(in) :: single
        real(dp) :: plusWeight
        character(*), parameter :: this_routine = "getPlus_single"
        ASSERT(nSwitches >= 0.0_dp)

        if (near_zero(bVal)) then
            plusWeight = 0.0_dp
        else
            plusWeight = single%G + nSwitches * single%F / bVal
        end if

        ASSERT(plusWeight >= 0.0_dp)

    end function getPlus_single