comparison test/Grids/geometry_test.jl @ 2071:9e9c56f5a656 feature/grids/geometry_functions

Add parameter validation when calling a transfinite interpolation object
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 17 Feb 2026 20:37:53 +0100
parents 5c2448d6a201
children c36812de3f2d
comparison
equal deleted inserted replaced
2070:c68fa6c74477 2071:9e9c56f5a656
319 319
320 @test ti(1/2, 0) == [1/2, 1/8] 320 @test ti(1/2, 0) == [1/2, 1/8]
321 @test ti(1/2, 1) == (c+d)/2 321 @test ti(1/2, 1) == (c+d)/2
322 @test ti(0, 1/2) == (a+d)/2 322 @test ti(0, 1/2) == (a+d)/2
323 @test ti(1, 1/2) == (b+c)/2 323 @test ti(1, 1/2) == (b+c)/2
324
325 @testset "Out of domain error" begin
326 @test_throws DomainError ti(-0.1, 0)
327 @test_throws DomainError ti(1.1, 0)
328 @test_throws DomainError ti(0, -0.1)
329 @test_throws DomainError ti(0, 1.1)
330 @test_throws DomainError ti(1.1, -0.1)
331 end
324 end 332 end
325 333
326 @testset "check_transfiniteinterpolation" begin 334 @testset "check_transfiniteinterpolation" begin
327 cs = polygon_edges([0,0],[1,0],[1,1],[0,1]) 335 cs = polygon_edges([0,0],[1,0],[1,1],[0,1])
328 ti = TransfiniteInterpolationSurface(cs...) 336 ti = TransfiniteInterpolationSurface(cs...)