Mercurial > repos > public > sbplib_julia
comparison test/Grids/manifolds_test.jl @ 1998:6dd00ea0511a feature/grids/manifolds
Add check if the logical coordinates are in the parameter space when calling a chart
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 25 Apr 2025 08:28:34 +0200 |
parents | c63116e2ec8e |
children | a1b2453c02c9 |
comparison
equal
deleted
inserted
replaced
1997:6dc6dfd11820 | 1998:6dd00ea0511a |
---|---|
16 @testset "Chart" begin | 16 @testset "Chart" begin |
17 X(ξ) = 2ξ | 17 X(ξ) = 2ξ |
18 Grids.jacobian(::typeof(X), ξ) = @SVector[2,2] | 18 Grids.jacobian(::typeof(X), ξ) = @SVector[2,2] |
19 c = Chart(X, unitsquare()) | 19 c = Chart(X, unitsquare()) |
20 @test c isa Chart{2} | 20 @test c isa Chart{2} |
21 @test c([3,2]) == [6,4] | |
22 @test parameterspace(c) == unitsquare() | 21 @test parameterspace(c) == unitsquare() |
23 @test ndims(c) == 2 | 22 @test ndims(c) == 2 |
23 | |
24 @testset "Calling" begin | |
25 c = Chart(X, unitsquare()) | |
26 @test c([.3,.2]) == [.6,.4] | |
27 @test_throws DomainError c([3,2]) | |
28 end | |
24 | 29 |
25 @test jacobian(c, [3,2]) == [2,2] | 30 @test jacobian(c, [3,2]) == [2,2] |
26 | 31 |
27 @test Set(boundary_identifiers(Chart(X,unitsquare()))) == Set([east(),west(),south(),north()]) | 32 @test Set(boundary_identifiers(Chart(X,unitsquare()))) == Set([east(),west(),south(),north()]) |
28 end | 33 end |