Mercurial > repos > public > sbplib_julia
diff test/Grids/mapped_grid_test.jl @ 1684:22a9992471be feature/grids/curvilinear
Add min_spacing for mapped 1d grid
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Wed, 21 Aug 2024 19:03:01 +0200 |
| parents | 4ce9cb21220c |
| children | 72776d3d5fd6 |
line wrap: on
line diff
--- a/test/Grids/mapped_grid_test.jl Thu Jul 11 11:50:10 2024 +0200 +++ b/test/Grids/mapped_grid_test.jl Wed Aug 21 19:03:01 2024 +0200 @@ -169,6 +169,21 @@ @test_broken false end + + @testset "min_spacing" begin + let g = mapped_grid(identity, x->@SMatrix[1], 11) + @test min_spacing(g) ≈ 0.1 + end + + let g = mapped_grid(x->x+x.^2/2, x->@SMatrix[1 .+ x], 11) + @test min_spacing(g) ≈ 0.105 + end + + let g = mapped_grid(x->x + x.*(1 .- x)/2, x->@SMatrix[1.5 .- x], 11) + @test min_spacing(g) ≈ 0.055 + end + end + end @testset "mapped_grid" begin
