|
8 | 8 | @test eltype(mesh) <: Triangle |
9 | 9 | @test vertices(mesh) == pts |
10 | 10 | @test collect(elements(mesh)) == tris |
| 11 | + |
| 12 | + # type stability tests |
| 13 | + poly = PolyArea(cart(0, 0), cart(1, 0), cart(1, 1), cart(0, 1)) |
| 14 | + @inferred discretize(poly, FanTriangulation()) |
11 | 15 | end |
12 | 16 |
|
13 | 17 | @testitem "DehnTriangulation" setup = [Setup] begin |
|
26 | 30 | @test nelements(mesh) == 6 |
27 | 31 | @test eltype(mesh) <: Triangle |
28 | 32 |
|
29 | | - # type stability tests |
30 | | - poly = PolyArea(cart(0, 0), cart(1, 0), cart(1, 1), cart(0, 1)) |
31 | | - @inferred discretize(poly, DehnTriangulation()) |
32 | | - |
33 | 33 | octa = Octagon( |
34 | 34 | cart(0.2, 0.2, 0.0), |
35 | 35 | cart(0.5, -0.5, 0.0), |
|
44 | 44 | @test nvertices(mesh) == 8 |
45 | 45 | @test nelements(mesh) == 6 |
46 | 46 | @test eltype(mesh) <: Triangle |
| 47 | + |
| 48 | + # type stability tests |
| 49 | + poly = PolyArea(cart(0, 0), cart(1, 0), cart(1, 1), cart(0, 1)) |
| 50 | + @inferred discretize(poly, DehnTriangulation()) |
47 | 51 | end |
48 | 52 |
|
49 | 53 | @testitem "HeldTriangulation" setup = [Setup] begin |
|
128 | 132 | mesh = discretize(poly, HeldTriangulation(rng)) |
129 | 133 | @test nvertices(mesh) == 5 |
130 | 134 | @test nelements(mesh) == 3 |
| 135 | + |
| 136 | + # type stability tests |
| 137 | + poly = PolyArea(cart(0, 0), cart(1, 0), cart(1, 1), cart(0, 1)) |
| 138 | + @inferred discretize(poly, HeldTriangulation()) |
131 | 139 | end |
132 | 140 |
|
133 | 141 | @testitem "DelaunayTriangulation" setup = [Setup] begin |
|
0 commit comments