Mercurial > repos > public > sbplib_julia
diff test/Grids/mapped_grid_test.jl @ 1678:13a7a4ff49e3 feature/grids/manifolds
Merge feature/grids/curvilinear
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sun, 30 Jun 2024 10:50:44 +0200 |
parents | d4a6f9effcdd 3bbcd496e021 |
children | a4c52ae93b11 |
line wrap: on
line diff
--- a/test/Grids/mapped_grid_test.jl Wed Jun 26 12:42:28 2024 +0200 +++ b/test/Grids/mapped_grid_test.jl Sun Jun 30 10:50:44 2024 +0200 @@ -183,4 +183,15 @@ lg = equidistant_grid((0,0), (1,1), 10, 11) @test logicalgrid(mg) == lg @test collect(mg) == map(x̄, lg) + + + @testset "normal" begin + @test normal(mg, CartesianBoundary{1,Lower}()) == fill(@SVector[-1,0], 11) + @test normal(mg, CartesianBoundary{1,Upper}()) == fill(@SVector[1,0], 11) + @test normal(mg, CartesianBoundary{2,Lower}()) == fill(@SVector[0,-1], 10) + @test normal(mg, CartesianBoundary{2,Upper}()) ≈ map(boundary_grid(mg,CartesianBoundary{2,Upper}())|>logicalgrid) do ξ̄ + α = 1-2ξ̄[1] + @SVector[α,1]/√(α^2 + 1) + end + end end