diff --git a/test/rectangular.jl b/test/rectangular.jl new file mode 100644 index 0000000..c54e696 --- /dev/null +++ b/test/rectangular.jl @@ -0,0 +1,33 @@ +using LinearAlgebra +using Random: GLOBAL_RNG +using StaticArrays +using RoomAcoustics: ISM_RectangularRoom_core! +using RoomAcoustics.TxRxModels: cardioid_pattern, directivity_pattern, AbstractDirectivityPattern +using RoomAcoustics.TxRxModels: Omnidirectional, Subcardioid, Cardioid, Hypercardioid, Bidirectional + +using BenchmarkTools + + +L = (10., 10., 10.); +β = [0.70 for _ = 1:6] |> Tuple; +# β = (0.10, 1.00, 0.00, 0.00, 0.00, 0.00) +order = (0, -1) +c = 343.0; +fs = 16e3; +N = 4000 + + +tx_p = @SVector [8., 5., 5.]; +tx_B = SMatrix{3,3}(1.0I); +rx_p = @SVector [1., 2., 9.]; +rx_B = SMatrix{3,3}(1.0I); + + +h1 = zeros(N); +@benchmark ISM_RectangularRoom_core!( + h1, + tx_p, Omnidirectional, tx_B, + rx_p, Omnidirectional, rx_B, + L, β, c, fs, order, + 8e-3, 0.0, GLOBAL_RNG +)