Mercurial > repos > public > sbplib_julia
comparison 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 |
comparison
equal
deleted
inserted
replaced
1650:8250cf5a3ce9 | 1678:13a7a4ff49e3 |
---|---|
181 @test mg isa MappedGrid{SVector{2,Float64}, 2} | 181 @test mg isa MappedGrid{SVector{2,Float64}, 2} |
182 | 182 |
183 lg = equidistant_grid((0,0), (1,1), 10, 11) | 183 lg = equidistant_grid((0,0), (1,1), 10, 11) |
184 @test logicalgrid(mg) == lg | 184 @test logicalgrid(mg) == lg |
185 @test collect(mg) == map(x̄, lg) | 185 @test collect(mg) == map(x̄, lg) |
186 | |
187 | |
188 @testset "normal" begin | |
189 @test normal(mg, CartesianBoundary{1,Lower}()) == fill(@SVector[-1,0], 11) | |
190 @test normal(mg, CartesianBoundary{1,Upper}()) == fill(@SVector[1,0], 11) | |
191 @test normal(mg, CartesianBoundary{2,Lower}()) == fill(@SVector[0,-1], 10) | |
192 @test normal(mg, CartesianBoundary{2,Upper}()) ≈ map(boundary_grid(mg,CartesianBoundary{2,Upper}())|>logicalgrid) do ξ̄ | |
193 α = 1-2ξ̄[1] | |
194 @SVector[α,1]/√(α^2 + 1) | |
195 end | |
196 end | |
186 end | 197 end |