|
467 | 467 | @test nelements(mesh) == 404 |
468 | 468 | @test eltype(mesh) <: Segment |
469 | 469 | @test nvertices.(mesh) ⊆ [2] |
| 470 | + |
| 471 | + tri = Triangle(cart(0, 0), cart(10, 0), cart(0, 10)) |
| 472 | + mesh = discretize(tri, MaxLengthDiscretization(T(3))) |
| 473 | + @test nvertices(mesh) == 15 |
| 474 | + @test nelements(mesh) == 16 |
| 475 | + @test eltype(mesh) <: Triangle |
| 476 | + @test nvertices.(mesh) ⊆ [3] |
| 477 | + |
| 478 | + quad = Quadrangle(latlon(0, 0), latlon(0, 45), latlon(45, 45), latlon(45, 0)) |
| 479 | + mesh = discretize(quad, MaxLengthDiscretization(T(1e6))) |
| 480 | + @test nvertices(mesh) == 81 |
| 481 | + @test nelements(mesh) == 128 |
| 482 | + @test eltype(mesh) <: Triangle |
| 483 | + @test nvertices.(mesh) ⊆ [3] |
| 484 | + |
| 485 | + quad1 = Quadrangle(latlon(0, 0), latlon(0, 45), latlon(45, 45), latlon(45, 0)) |
| 486 | + quad2 = Quadrangle(latlon(0, 0), latlon(-45, 0), latlon(-45, 45), latlon(0, 45)) |
| 487 | + multi = Multi([quad1, quad2]) |
| 488 | + mesh = discretize(multi, MaxLengthDiscretization(T(1e6))) |
| 489 | + @test nvertices(mesh) == 162 |
| 490 | + @test nelements(mesh) == 256 |
| 491 | + @test eltype(mesh) <: Triangle |
| 492 | + @test nvertices.(mesh) ⊆ [3] |
470 | 493 | end |
471 | 494 |
|
472 | 495 | @testitem "Discretize" setup = [Setup] begin |
|
0 commit comments