comparison test/Grids/mapped_grid_test.jl @ 1574:aeb561754248 feature/grids/manifolds

Implement mapped_grid for a chart
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 25 Apr 2024 14:38:15 +0200
parents c2620118f110
children d5aa72662161
comparison
equal deleted inserted replaced
1573:bbb9065834ce 1574:aeb561754248
183 lg = equidistant_grid((0,0), (1,1), 10, 11) 183 lg = equidistant_grid((0,0), (1,1), 10, 11)
184 @test logicalgrid(mg) == lg 184 @test logicalgrid(mg) == lg
185 @test collect(mg) == map(x̄, lg) 185 @test collect(mg) == map(x̄, lg)
186 186
187 187
188 @testset "mapped_grid(::Chart,J)" begin 188 @testset "mapped_grid(::Chart)" begin
189 c = ConcreteChart(unitsquare()) do (x,y) 189 c = ConcreteChart(unitsquare()) do (ξ,η)
190 @SVector[2x, 3y] 190 @SVector[2ξ, 3η]
191 end 191 end
192 Grids.jacobian(c::typeof(c)) = x̄ -> @SMatrix[2 0; 0 3] ## TODO Maybe shouldn't return a function
192 193
193 @test mapped_grid(c, 5, 4) 194 @test mapped_grid(c, 5, 4) isa Grid
194 end 195 end
195 196
196 end 197 end