comparison test/Grids/geometry_test.jl @ 1974:3ed7ca1f60c4 feature/grids/geometry_functions

Implement Grids.jacobian for Line
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 25 Feb 2025 22:39:28 +0100
parents 8e9575b518a1
children 79adad4a15d6
comparison
equal deleted inserted replaced
1973:8e9575b518a1 1974:3ed7ca1f60c4
18 l = Line([1,2],[2,3]) 18 l = Line([1,2],[2,3])
19 19
20 @test l(0) == [1,2] 20 @test l(0) == [1,2]
21 @test l(1) == [1,2] + [2,3] 21 @test l(1) == [1,2] + [2,3]
22 @test l(1/2) == [1,2] + [2,3]/2 22 @test l(1/2) == [1,2] + [2,3]/2
23 end
24
25 @testset "Grids.jacobian" begin
26 l = Line([1,2],[2,3])
27
28 @test Grids.jacobian(l,0) == [2,3]
29 @test Grids.jacobian(l,1) == [2,3]
30 @test Grids.jacobian(l,1/2) == [2,3]
23 end 31 end
24 end 32 end
25 33
26 @testset "LineSegment" begin 34 @testset "LineSegment" begin
27 @testset "Constructors" begin 35 @testset "Constructors" begin