init_mono Function

private function init_mono(mus, mua, hgg, n) result(res)

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: mus
real(kind=wp), intent(in) :: mua
real(kind=wp), intent(in) :: hgg
real(kind=wp), intent(in) :: n

Return Value type(mono)


Source Code

    type(mono) function init_mono(mus, mua, hgg, n) result(res)

        real(kind=wp), intent(in) :: mus, mua, hgg, n

        res%mus = mus
        res%mua = mua

        res%kappa = mus + mua
        if(res%mua < 1e-9_wp)then          
            res%albedo = 1.
        else
            res%albedo = res%mus / res%kappa
        end if

        res%hgg = hgg
        res%g2 = hgg**2
        res%n = n

    end function init_mono