setup_scat_test Function

public function setup_scat_test(dict) result(array)

set up scattering test scene with user defined tau

Arguments

Type IntentOptional Attributes Name
type(toml_table), intent(inout) :: dict

Return Value type(sdf), allocatable, (:)


Source Code

    function setup_scat_test(dict) result(array)
    !! set up scattering test scene with user defined tau

        use opticalProperties
        use sdfs, only : sdf, sphere, box
        use vector_class

        type(toml_table), intent(inout) :: dict
        type(sdf), allocatable :: array(:)

        type(opticalProp_t) :: opt(2)
        real(kind=wp) :: mus, mua, hgg, n, tau

        call get_value(dict, "tau", tau)
        allocate(array(2))
        n = 1._wp
        hgg = 0.0_wp
        mua = 0.00_wp
        mus = tau

        opt(1) = mono(mus, mua, hgg, n)
        array(1) = sphere(1._wp, opt(1), 1)

        opt(2) = mono(0.0_wp, mua, hgg, n)
        array(2) = box(vector(2._wp, 2._wp, 2._wp), opt(2), 2)

    end function setup_scat_test