|
127 | 127 | @test minimum(sub) == Point(Polar(T(1), T(2))) |
128 | 128 | @test maximum(sub) == Point(Polar(T(4), T(7))) |
129 | 129 |
|
| 130 | + # vertex iteration |
| 131 | + grid = RegularGrid((10, 10), cart(0, 0), T.((1, 1))) |
| 132 | + vertextest(grid) |
| 133 | + |
130 | 134 | # type stability |
131 | 135 | grid = RegularGrid((10, 20), Point(Polar(T(0), T(0))), T.((1, 1))) |
132 | 136 | @inferred vertex(grid, (1, 1)) |
|
501 | 505 | @test topology(rg) == topology(cg) |
502 | 506 | @test vertices(rg) == vertices(cg) |
503 | 507 |
|
| 508 | + # vertex iteration |
| 509 | + x = range(zero(T), stop=one(T), length=6) |
| 510 | + y = T[0.0, 0.1, 0.3, 0.7, 0.9, 1.0] |
| 511 | + grid = RectilinearGrid(x, y) |
| 512 | + vertextest(grid) |
| 513 | + |
504 | 514 | # type stability |
505 | 515 | x = range(zero(T), stop=one(T), length=6) * u"mm" |
506 | 516 | y = T[0.0, 0.1, 0.3, 0.7, 0.9, 1.0] * u"cm" |
|
682 | 692 | @test topology(sg) == topology(rg) |
683 | 693 | @test vertices(sg) == vertices(rg) |
684 | 694 |
|
| 695 | + # vertex iteration |
| 696 | + X = repeat(range(zero(T), stop=one(T), length=6), 1, 6) |
| 697 | + Y = repeat(T[0.0, 0.1, 0.3, 0.7, 0.9, 1.0]', 6, 1) |
| 698 | + grid = StructuredGrid(X, Y) |
| 699 | + vertextest(grid) |
| 700 | + |
685 | 701 | # type stability |
686 | 702 | X = repeat(range(zero(T), stop=one(T), length=6), 1, 6) * u"mm" |
687 | 703 | Y = repeat(T[0.0, 0.1, 0.3, 0.7, 0.9, 1.0]', 6, 1) * u"cm" |
|
929 | 945 | @test vertex(mesh, 4) == points[4] |
930 | 946 | @test vertex(mesh, 5) == points[5] |
931 | 947 |
|
| 948 | + # vertex iteration |
| 949 | + points = cart.([(0, 0), (1, 0), (0, 1), (1, 1), (0.5, 0.5)]) |
| 950 | + connec = connect.([(1, 2, 5), (2, 4, 5), (4, 3, 5), (3, 1, 5)], Triangle) |
| 951 | + mesh = SimpleMesh(points, connec) |
| 952 | + vertextest(mesh) |
| 953 | + |
932 | 954 | points = cart.([(0, 0), (1, 0), (0, 1), (1, 1), (0.5, 0.5)]) |
933 | 955 | connec = connect.([(1, 2, 5), (2, 4, 5), (4, 3, 5), (3, 1, 5)], Triangle) |
934 | 956 | mesh = SimpleMesh(points, connec) |
@@ -988,6 +1010,14 @@ end |
988 | 1010 | trans2 = Translate(T(-10), T(-10)) |
989 | 1011 | @test TransformedMesh(TransformedMesh(grid, trans1), trans2) == TransformedMesh(grid, trans1 → trans2) |
990 | 1012 |
|
| 1013 | + # vertex iteration |
| 1014 | + trans = Identity() |
| 1015 | + points = latlon.([(0, 0), (0, 1), (1, 0), (1, 1), (0.5, 0.5)]) |
| 1016 | + connec = connect.([(1, 2, 5), (2, 4, 5), (4, 3, 5), (3, 1, 5)], Triangle) |
| 1017 | + mesh = SimpleMesh(points, connec) |
| 1018 | + tmesh = TransformedMesh(mesh, trans) |
| 1019 | + vertextest(tmesh) |
| 1020 | + |
991 | 1021 | # transforms that change the Manifold and/or CRS |
992 | 1022 | points = latlon.([(0, 0), (0, 1), (1, 0), (1, 1), (0.5, 0.5)]) |
993 | 1023 | connec = connect.([(1, 2, 5), (2, 4, 5), (4, 3, 5), (3, 1, 5)], Triangle) |
|
0 commit comments