Mercurial > repos > public > sbplib_julia
comparison test/Grids/mapped_grid_test.jl @ 1954:b0915f43b122 feature/sbp_operators/laplace_curvilinear
Merge feature/grids/geometry_functions
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sat, 08 Feb 2025 09:38:58 +0100 |
parents | 04c251bccbd4 |
children |
comparison
equal
deleted
inserted
replaced
1953:835b1dcee38e | 1954:b0915f43b122 |
---|---|
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(lg, x̄, J) == 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[ |