|
1 | 1 | @testset verbose=true "GridNeighborhoodSearch" begin |
2 | 2 | @testset "Cells at Coordinate Limits" begin |
3 | | - # Test the threshold for very large and very small coordinates. |
| 3 | + # Test the threshold for very large and very small coordinates |
4 | 4 | coords1 = [Inf, -Inf] |
5 | 5 | coords2 = [NaN, 0] |
6 | 6 | coords3 = [typemax(Int) + 1.0, -typemax(Int) - 1.0] |
|
15 | 15 |
|
16 | 16 | @testset "Rectangular Point Cloud 2D" begin |
17 | 17 | #### Setup |
18 | | - # Rectangular filled with equidistant spaced particles |
19 | | - # from (x, y) = (-0.25, -0.25) to (x, y) = (0.35, 0.35) |
| 18 | + # Rectangle of equidistantly spaced particles |
| 19 | + # from (x, y) = (-0.25, -0.25) to (x, y) = (0.35, 0.35). |
20 | 20 | range = -0.25:0.1:0.35 |
21 | 21 | coordinates1 = hcat(collect.(Iterators.product(range, range))...) |
22 | 22 | nparticles = size(coordinates1, 2) |
|
78 | 78 | @test neighbors3 == [17, 18, 19, 24, 25, 26, 31, 32, 33] |
79 | 79 |
|
80 | 80 | @test neighbors4 == [ |
81 | | - 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, |
82 | | - 26, 27, 28, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, |
83 | | - 48, 49] |
| 81 | + 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 30, 31, |
| 82 | + 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49] |
84 | 83 |
|
85 | 84 | @test neighbors5 == [36, 37, 38, 43, 44, 45] |
86 | 85 | end |
87 | 86 |
|
88 | 87 | @testset "Rectangular Point Cloud 3D" begin |
89 | 88 | #### Setup |
90 | | - # Rectangular filled with equidistant spaced particles |
91 | | - # from (x, y, z) = (-0.25, -0.25, -0.25) to (x, y) = (0.35, 0.35, 0.35) |
| 89 | + # Rectangle of equidistantly spaced particles |
| 90 | + # from (x, y, z) = (-0.25, -0.25, -0.25) to (x, y) = (0.35, 0.35, 0.35). |
92 | 91 | range = -0.25:0.1:0.35 |
93 | 92 | coordinates1 = hcat(collect.(Iterators.product(range, range, range))...) |
94 | 93 | nparticles = size(coordinates1, 2) |
|
0 commit comments