Mercurial > repos > public > sbplib_julia
comparison test/Grids/manifolds_test.jl @ 2003:524a52f190d7 feature/sbp_operators/laplace_curvilinear
Merge feature/grids/geometry_functions
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 29 Apr 2025 09:03:05 +0200 |
parents | a1b2453c02c9 |
children |
comparison
equal
deleted
inserted
replaced
1962:496b8d3903c6 | 2003:524a52f190d7 |
---|---|
13 bottom = CartesianBoundary{3, LowerBoundary} | 13 bottom = CartesianBoundary{3, LowerBoundary} |
14 top = CartesianBoundary{3, UpperBoundary} | 14 top = CartesianBoundary{3, UpperBoundary} |
15 | 15 |
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), ξ) = @SMatrix[2 0; 0 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 |
24 | 23 |
25 @test jacobian(c, [3,2]) == [2,2] | 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 | |
29 | |
30 @testset "jacobian(::Chart, ⋅)" begin | |
31 c = Chart(X, unitsquare()) | |
32 @test_throws DomainError jacobian(c, [3,2]) | |
33 @test jacobian(c, [.3,.2]) == [2 0; 0 2] | |
34 end | |
26 | 35 |
27 @test Set(boundary_identifiers(Chart(X,unitsquare()))) == Set([east(),west(),south(),north()]) | 36 @test Set(boundary_identifiers(Chart(X,unitsquare()))) == Set([east(),west(),south(),north()]) |
28 end | 37 end |
29 | 38 |
30 @testset "CartesianAtlas" begin | 39 @testset "CartesianAtlas" begin |