Mercurial > repos > public > sbplib_julia
comparison 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 |
comparison
equal
deleted
inserted
replaced
1683:88021d580320 | 1684:22a9992471be |
---|---|
167 | 167 |
168 @testset "metric_tensor_inverse" begin | 168 @testset "metric_tensor_inverse" begin |
169 @test_broken false | 169 @test_broken false |
170 end | 170 end |
171 | 171 |
172 | |
173 @testset "min_spacing" begin | |
174 let g = mapped_grid(identity, x->@SMatrix[1], 11) | |
175 @test min_spacing(g) ≈ 0.1 | |
176 end | |
177 | |
178 let g = mapped_grid(x->x+x.^2/2, x->@SMatrix[1 .+ x], 11) | |
179 @test min_spacing(g) ≈ 0.105 | |
180 end | |
181 | |
182 let g = mapped_grid(x->x + x.*(1 .- x)/2, x->@SMatrix[1.5 .- x], 11) | |
183 @test min_spacing(g) ≈ 0.055 | |
184 end | |
185 end | |
186 | |
172 end | 187 end |
173 | 188 |
174 @testset "mapped_grid" begin | 189 @testset "mapped_grid" begin |
175 x̄((ξ, η)) = @SVector[ξ, η*(1+ξ*(ξ-1))] | 190 x̄((ξ, η)) = @SVector[ξ, η*(1+ξ*(ξ-1))] |
176 J((ξ, η)) = @SMatrix[ | 191 J((ξ, η)) = @SMatrix[ |