get_ispn Function

public function get_ispn(src) result(ispn)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: src(2)

Return Value integer


Contents

Source Code


Source Code

    function get_ispn(src) result(ispn)
        ! it is annoying to write this over and over again..
        integer, intent(in) :: src(2)
        integer :: ispn

        if (is_beta(src(1)) .eqv. is_beta(src(2))) then
            if (is_beta(src(1))) then
                ispn = 1
            else
                ispn = 3
            end if
        else
            ispn = 2
        end if
    end function get_ispn