Mercurial > repos > public > sbplib_julia
comparison test/Grids/mapped_grid_test.jl @ 1704:e5e76c8e52c5 feature/grids/curvilinear
Fix todos and add broken test for mapped_grid(::Grid,...)
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Wed, 04 Sep 2024 15:26:59 +0200 |
| parents | 6eb5b48607e0 |
| children | 4870fc3faa25 |
comparison
equal
deleted
inserted
replaced
| 1703:6eb5b48607e0 | 1704:e5e76c8e52c5 |
|---|---|
| 33 J = map(ξ̄ -> @SArray(fill(2., 2, 2)), lg) | 33 J = map(ξ̄ -> @SArray(fill(2., 2, 2)), lg) |
| 34 mg = MappedGrid(lg, x̄, J) | 34 mg = MappedGrid(lg, x̄, J) |
| 35 | 35 |
| 36 # TODO: Test constructor for different dims of range and domain for the coordinates | 36 # TODO: Test constructor for different dims of range and domain for the coordinates |
| 37 # TODO: Test constructor with different type than TensorGrid. a dummy type? | 37 # TODO: Test constructor with different type than TensorGrid. a dummy type? |
| 38 # TODO: Test that the element types agree | |
| 38 | 39 |
| 39 @test_broken false # @test_throws ArgumentError("Sizes must match") MappedGrid(lg, map(ξ̄ -> @SArray[ξ̄[1], ξ̄[2], -ξ̄[1]], lg), rand(SMatrix{2,3,Float64},15,11)) | 40 @test_broken false # @test_throws ArgumentError("Sizes must match") MappedGrid(lg, map(ξ̄ -> @SArray[ξ̄[1], ξ̄[2], -ξ̄[1]], lg), rand(SMatrix{2,3,Float64},15,11)) |
| 40 | 41 |
| 41 | 42 |
| 42 @test mg isa Grid{SVector{2, Float64},2} | 43 @test mg isa Grid{SVector{2, Float64},2} |
| 184 @test mg isa MappedGrid{SVector{2,Float64}, 2} | 185 @test mg isa MappedGrid{SVector{2,Float64}, 2} |
| 185 | 186 |
| 186 lg = equidistant_grid((0,0), (1,1), 10, 11) | 187 lg = equidistant_grid((0,0), (1,1), 10, 11) |
| 187 @test logicalgrid(mg) == lg | 188 @test logicalgrid(mg) == lg |
| 188 @test collect(mg) == map(x̄, lg) | 189 @test collect(mg) == map(x̄, lg) |
| 190 | |
| 191 @test_broken mapped_grid(lg, x̄, J) == mg | |
| 189 end | 192 end |
| 190 | 193 |
| 191 @testset "jacobian_determinant" begin | 194 @testset "jacobian_determinant" begin |
| 192 @test_broken false | 195 @test_broken false |
| 193 end | 196 end |
