Mercurial > repos > public > sbplib_julia
comparison test/Grids/mapped_grid_test.jl @ 1660:6d196fb85133 feature/sbp_operators/laplace_curvilinear
Merge feature/grids/curvilinear
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 28 Jun 2024 17:04:05 +0200 |
parents | d4a6f9effcdd 3bbcd496e021 |
children | a4c52ae93b11 |
comparison
equal
deleted
inserted
replaced
1658:cc9d18a5ff2d | 1660:6d196fb85133 |
---|---|
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 |