Mercurial > repos > public > sbplib_julia
diff test/Grids/tensor_grid_test.jl @ 1595:611ae2308aa1 feature/boundary_conditions
Add orthogonal_grid
author | Vidar Stiernström <vidar.stiernstrom@gmail.com> |
---|---|
date | Sun, 26 May 2024 17:35:52 -0700 |
parents | 88e738d807cb |
children | 3e7438e2a033 |
line wrap: on
line diff
--- a/test/Grids/tensor_grid_test.jl Sat May 25 16:07:10 2024 -0700 +++ b/test/Grids/tensor_grid_test.jl Sun May 26 17:35:52 2024 -0700 @@ -184,6 +184,17 @@ @test boundary_indices(TensorGrid(g₄,g₁), TensorGridBoundary{2, Lower}()) == (1,) @test boundary_indices(TensorGrid(g₄,g₁), TensorGridBoundary{2, Upper}()) == (11,) end + + @testset "orthogonal_grid" begin + g₁ = EquidistantGrid(range(0,1,length=11)) + g₂ = EquidistantGrid(range(2,3,length=6)) + g₃ = EquidistantGrid(range(4,5,length=7)) + + @test orthogonal_grid(TensorGrid(g₁, g₂, g₃), TensorGridBoundary{1, Lower}()) == g₁ + @test orthogonal_grid(TensorGrid(g₁, g₂, g₃), TensorGridBoundary{2, Lower}()) == g₂ + @test orthogonal_grid(TensorGrid(g₁, g₂, g₃), TensorGridBoundary{3, Upper}()) == g₃ + end + end @testset "combined_coordinate_vector_type" begin