Mercurial > repos > public > sbplib_julia
diff test/Grids/geometry_test.jl @ 2074:8fe7233067fb feature/sbp_operators/laplace_curvilinear
Merge feature/grids/geometry_functions
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Tue, 17 Feb 2026 21:01:50 +0100 |
| parents | c36812de3f2d |
| children |
line wrap: on
line diff
--- a/test/Grids/geometry_test.jl Sun Feb 08 00:05:40 2026 +0100 +++ b/test/Grids/geometry_test.jl Tue Feb 17 21:01:50 2026 +0100 @@ -321,6 +321,14 @@ @test ti(1/2, 1) == (c+d)/2 @test ti(0, 1/2) == (a+d)/2 @test ti(1, 1/2) == (b+c)/2 + + @testset "Out of domain error" begin + @test_throws DomainError ti(-0.1, 0) + @test_throws DomainError ti(1.1, 0) + @test_throws DomainError ti(0, -0.1) + @test_throws DomainError ti(0, 1.1) + @test_throws DomainError ti(1.1, -0.1) + end end @testset "check_transfiniteinterpolation" begin @@ -385,5 +393,13 @@ @test Grids.jacobian(ti, [1/2, 1]) ≈ [c-d mid(c,d)-mid(a,b)] @test Grids.jacobian(ti, [0, 1/2]) ≈ [mid(b,c)-mid(a,d) d-a] @test Grids.jacobian(ti, [1, 1/2]) ≈ [mid(b,c)-mid(a,d) c-b] + + @testset "Out of domain error" begin + @test_throws DomainError Grids.jacobian(ti, [-0.1, 0]) + @test_throws DomainError Grids.jacobian(ti, [1.1, 0]) + @test_throws DomainError Grids.jacobian(ti, [0, -0.1]) + @test_throws DomainError Grids.jacobian(ti, [0, 1.1]) + @test_throws DomainError Grids.jacobian(ti, [1.1, -0.1]) + end end end
