Mercurial > repos > public > sbplib_julia
diff test/Grids/manifolds_test.jl @ 2002:4300c59bbeff feature/grids/geometry_functions
Merge feature/grids/manifolds
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 29 Apr 2025 09:00:42 +0200 |
parents | a1b2453c02c9 |
children |
line wrap: on
line diff
--- a/test/Grids/manifolds_test.jl Wed Feb 26 22:50:52 2025 +0100 +++ b/test/Grids/manifolds_test.jl Tue Apr 29 09:00:42 2025 +0200 @@ -15,14 +15,23 @@ @testset "Chart" begin X(ξ) = 2ξ - Grids.jacobian(::typeof(X), ξ) = @SVector[2,2] + Grids.jacobian(::typeof(X), ξ) = @SMatrix[2 0; 0 2] c = Chart(X, unitsquare()) @test c isa Chart{2} - @test c([3,2]) == [6,4] @test parameterspace(c) == unitsquare() @test ndims(c) == 2 - @test jacobian(c, [3,2]) == [2,2] + @testset "Calling" begin + c = Chart(X, unitsquare()) + @test c([.3,.2]) == [.6,.4] + @test_throws DomainError c([3,2]) + end + + @testset "jacobian(::Chart, ⋅)" begin + c = Chart(X, unitsquare()) + @test_throws DomainError jacobian(c, [3,2]) + @test jacobian(c, [.3,.2]) == [2 0; 0 2] + end @test Set(boundary_identifiers(Chart(X,unitsquare()))) == Set([east(),west(),south(),north()]) end