|
40 | 40 | update_grid!(nhs1, coordinates2) |
41 | 41 |
|
42 | 42 | # Get each neighbor for updated NHS |
43 | | - neighbors2 = sort(collect(PointNeighbors.eachneighbor(particle_position1, |
44 | | - nhs1))) |
| 43 | + neighbors2 = sort(collect(PointNeighbors.eachneighbor(particle_position1, nhs1))) |
45 | 44 |
|
46 | 45 | # Change position |
47 | 46 | particle_position2 = particle_position1 .+ [1.4, -3.5] |
48 | 47 |
|
49 | 48 | # Get each neighbor for `particle_position2` |
50 | | - neighbors3 = sort(collect(PointNeighbors.eachneighbor(particle_position2, |
51 | | - nhs1))) |
| 49 | + neighbors3 = sort(collect(PointNeighbors.eachneighbor(particle_position2, nhs1))) |
52 | 50 |
|
53 | 51 | # Double search radius |
54 | 52 | nhs2 = GridNeighborhoodSearch{2}(2 * radius, size(coordinates1, 2)) |
55 | 53 | initialize!(nhs2, coordinates1, coordinates1) |
56 | 54 |
|
57 | 55 | # Get each neighbor in double search radius |
58 | | - neighbors4 = sort(collect(PointNeighbors.eachneighbor(particle_position1, |
59 | | - nhs2))) |
| 56 | + neighbors4 = sort(collect(PointNeighbors.eachneighbor(particle_position1, nhs2))) |
60 | 57 |
|
61 | 58 | # Move particles |
62 | 59 | coordinates2 = coordinates1 .+ [0.4, -0.4] |
|
65 | 62 | update!(nhs2, coordinates2, coordinates2) |
66 | 63 |
|
67 | 64 | # Get each neighbor in double search radius |
68 | | - neighbors5 = sort(collect(PointNeighbors.eachneighbor(particle_position1, |
69 | | - nhs2))) |
| 65 | + neighbors5 = sort(collect(PointNeighbors.eachneighbor(particle_position1, nhs2))) |
70 | 66 |
|
71 | 67 | #### Verification against lists of potential neighbors built by hand |
72 | 68 | @test neighbors1 == [17, 18, 19, 24, 25, 26, 31, 32, 33] |
|
101 | 97 | initialize_grid!(nhs1, coords_fun) |
102 | 98 |
|
103 | 99 | # Get each neighbor for `particle_position1` |
104 | | - neighbors1 = sort(collect(PointNeighbors.eachneighbor(particle_position1, |
105 | | - nhs1))) |
| 100 | + neighbors1 = sort(collect(PointNeighbors.eachneighbor(particle_position1, nhs1))) |
106 | 101 |
|
107 | 102 | # Move particles |
108 | 103 | coordinates2 = coordinates1 .+ [1.4, -3.5, 0.8] |
|
112 | 107 | update_grid!(nhs1, coords_fun2) |
113 | 108 |
|
114 | 109 | # Get each neighbor for updated NHS |
115 | | - neighbors2 = sort(collect(PointNeighbors.eachneighbor(particle_position1, |
116 | | - nhs1))) |
| 110 | + neighbors2 = sort(collect(PointNeighbors.eachneighbor(particle_position1, nhs1))) |
117 | 111 |
|
118 | 112 | # Change position |
119 | 113 | particle_position2 = particle_position1 .+ [1.4, -3.5, 0.8] |
120 | 114 |
|
121 | 115 | # Get each neighbor for `particle_position2` |
122 | | - neighbors3 = sort(collect(PointNeighbors.eachneighbor(particle_position2, |
123 | | - nhs1))) |
| 116 | + neighbors3 = sort(collect(PointNeighbors.eachneighbor(particle_position2, nhs1))) |
124 | 117 |
|
125 | 118 | #### Verification against lists of potential neighbors built by hand |
126 | 119 | @test neighbors1 == |
|
0 commit comments