|
362 | 362 | @test all(r .≈ [f(t), f(t)])
|
363 | 363 | @test all(TB.revert(f, r, c) .≈ d)
|
364 | 364 |
|
| 365 | + # ------------ |
| 366 | + # REGULARGRID |
| 367 | + # ------------ |
| 368 | + |
| 369 | + f = Translate(T(1), T(1)) |
| 370 | + d = RegularGrid((8, 8), Point(Polar(T(0), T(0))), (T(1), T(π / 4))) |
| 371 | + r, c = TB.apply(f, d) |
| 372 | + @test r ≈ SimpleMesh(f.(vertices(d)), topology(d)) |
| 373 | + @test TB.revert(f, r, c) ≈ d |
| 374 | + |
365 | 375 | # --------------
|
366 | 376 | # CARTESIANGRID
|
367 | 377 | # --------------
|
|
384 | 394 | @test r ≈ RectilinearGrid(T.(1:11), T.(1:11))
|
385 | 395 | @test TB.revert(f, r, c) ≈ d
|
386 | 396 |
|
| 397 | + f = Translate(T(1), T(1)) |
| 398 | + g = RegularGrid((8, 8), Point(Polar(T(0), T(0))), (T(1), T(π / 4))) |
| 399 | + d = convert(RectilinearGrid, g) |
| 400 | + r, c = TB.apply(f, d) |
| 401 | + @test r ≈ SimpleMesh(f.(vertices(d)), topology(d)) |
| 402 | + @test TB.revert(f, r, c) ≈ d |
| 403 | + |
387 | 404 | # ---------------
|
388 | 405 | # STRUCTUREDGRID
|
389 | 406 | # ---------------
|
|
395 | 412 | @test r ≈ StructuredGrid(repeat(T.(1:11), 1, 11), repeat(T.(1:11)', 11, 1))
|
396 | 413 | @test TB.revert(f, r, c) ≈ d
|
397 | 414 |
|
| 415 | + f = Translate(T(1), T(1)) |
| 416 | + g = RegularGrid((8, 8), Point(Polar(T(0), T(0))), (T(1), T(π / 4))) |
| 417 | + d = convert(StructuredGrid, g) |
| 418 | + r, c = TB.apply(f, d) |
| 419 | + @test r ≈ SimpleMesh(f.(vertices(d)), topology(d)) |
| 420 | + @test TB.revert(f, r, c) ≈ d |
| 421 | + |
398 | 422 | # -----------
|
399 | 423 | # SIMPLEMESH
|
400 | 424 | # -----------
|
@@ -1403,6 +1427,15 @@ end
|
1403 | 1427 | r, c = TB.apply(f, d)
|
1404 | 1428 | @test all(r .≈ [f(t), f(t)])
|
1405 | 1429 |
|
| 1430 | + # ------------ |
| 1431 | + # REGULARGRID |
| 1432 | + # ------------ |
| 1433 | + |
| 1434 | + f = LengthUnit(u"cm") |
| 1435 | + d = RegularGrid((8, 8), Point(Polar(T(1), T(0))), (T(1), T(π / 4))) |
| 1436 | + r, c = TB.apply(f, d) |
| 1437 | + @test r ≈ RegularGrid((8, 8), Point(Polar(T(100) * u"cm", T(0) * u"rad")), (T(100) * u"cm", T(π / 4) * u"rad")) |
| 1438 | + |
1406 | 1439 | # --------------
|
1407 | 1440 | # CARTESIANGRID
|
1408 | 1441 | # --------------
|
@@ -1622,6 +1655,15 @@ end
|
1622 | 1655 | r, c = TB.apply(f, d)
|
1623 | 1656 | @test all(r .== [f(t), f(t)])
|
1624 | 1657 |
|
| 1658 | + # ------------ |
| 1659 | + # REGULARGRID |
| 1660 | + # ------------ |
| 1661 | + |
| 1662 | + f = Shadow(:yz) |
| 1663 | + d = RegularGrid((8, 8, 8), Point(Cylindrical(T(0), T(0), T(0))), (T(1), T(π / 4), T(1))) |
| 1664 | + r, c = TB.apply(f, d) |
| 1665 | + @test r == SimpleMesh(f.(vertices(d)), topology(d)) |
| 1666 | + |
1625 | 1667 | # --------------
|
1626 | 1668 | # CARTESIANGRID
|
1627 | 1669 | # --------------
|
|
0 commit comments