comparison test/Grids/equidistant_grid_test.jl @ 1586:d4a6f9effcdd feature/grids/manifolds

Remove mapped_grid(::Chart) and add equidistant_grid(::Chart)
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 26 Apr 2024 22:49:01 +0200
parents c3425b4302b8
children 8250cf5a3ce9
comparison
equal deleted inserted replaced
1583:2a9ec1e2abad 1586:d4a6f9effcdd
149 @testset "equidistant_grid(::ParameterSpace)" begin 149 @testset "equidistant_grid(::ParameterSpace)" begin
150 ps = HyperBox((0,0),(2,1)) 150 ps = HyperBox((0,0),(2,1))
151 151
152 @test equidistant_grid(ps, 3,4) == equidistant_grid((0,0), (2,1), 3,4) 152 @test equidistant_grid(ps, 3,4) == equidistant_grid((0,0), (2,1), 3,4)
153 end 153 end
154
155
156 @testset "equidistant_grid(::Chart)" begin
157 c = Chart(unitsquare()) do (ξ,η)
158 @SVector[2ξ, 3η]
159 end
160 Grids.jacobian(c::typeof(c), ξ̄) = @SMatrix[2 0; 0 3]
161
162 @test equidistant_grid(c, 5, 4) isa Grid
163 end
154 end 164 end
155 165
156 166
157 @testset "change_length" begin 167 @testset "change_length" begin
158 @test Grids.change_length(0:20, 21) == 0:20 168 @test Grids.change_length(0:20, 21) == 0:20