Mercurial > repos > public > sbplib_julia
comparison test/Grids/mapped_grid_test.jl @ 1956:b0fcb29e3620 feature/grids/multiblock_boundaries
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 11 Feb 2025 08:54:18 +0100 |
parents | f93ba5832146 |
children | 04c251bccbd4 |
comparison
equal
deleted
inserted
replaced
1912:e68669552ed8 | 1956:b0fcb29e3620 |
---|---|
276 @testset "mapped_grid" begin | 276 @testset "mapped_grid" begin |
277 x̄, J = _partially_curved_mapping() | 277 x̄, J = _partially_curved_mapping() |
278 mg = mapped_grid(x̄, J, 10, 11) | 278 mg = mapped_grid(x̄, J, 10, 11) |
279 @test mg isa MappedGrid{SVector{2,Float64}, 2} | 279 @test mg isa MappedGrid{SVector{2,Float64}, 2} |
280 | 280 |
281 lg = equidistant_grid((0,0), (1,1), 10, 11) | 281 lg = equidistant_grid(unitsquare(), 10, 11) |
282 @test logical_grid(mg) == lg | 282 @test logical_grid(mg) == lg |
283 @test collect(mg) == map(x̄, lg) | 283 @test collect(mg) == map(x̄, lg) |
284 | 284 |
285 @test mapped_grid(x̄, J, lg) == mg | 285 @test mapped_grid(x̄, J, lg) == mg |
286 | |
287 @test mapped_grid(x̄, J, unitsquare(), 10, 11) == mg | |
286 end | 288 end |
287 | 289 |
288 @testset "metric_tensor" begin | 290 @testset "metric_tensor" begin |
289 x̄((ξ, η)) = @SVector[ξ*η, ξ + η^2] | 291 x̄((ξ, η)) = @SVector[ξ*η, ξ + η^2] |
290 J((ξ, η)) = @SMatrix[ | 292 J((ξ, η)) = @SMatrix[ |