Mercurial > repos > public > sbplib_julia
comparison 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 |
comparison
equal
deleted
inserted
replaced
1594:d68d02dd882f | 1595:611ae2308aa1 |
---|---|
182 @test boundary_indices(TensorGrid(g₁, g₄), TensorGridBoundary{1, Lower}()) == (1,) | 182 @test boundary_indices(TensorGrid(g₁, g₄), TensorGridBoundary{1, Lower}()) == (1,) |
183 @test boundary_indices(TensorGrid(g₁, g₄), TensorGridBoundary{1, Upper}()) == (11,) | 183 @test boundary_indices(TensorGrid(g₁, g₄), TensorGridBoundary{1, Upper}()) == (11,) |
184 @test boundary_indices(TensorGrid(g₄,g₁), TensorGridBoundary{2, Lower}()) == (1,) | 184 @test boundary_indices(TensorGrid(g₄,g₁), TensorGridBoundary{2, Lower}()) == (1,) |
185 @test boundary_indices(TensorGrid(g₄,g₁), TensorGridBoundary{2, Upper}()) == (11,) | 185 @test boundary_indices(TensorGrid(g₄,g₁), TensorGridBoundary{2, Upper}()) == (11,) |
186 end | 186 end |
187 | |
188 @testset "orthogonal_grid" begin | |
189 g₁ = EquidistantGrid(range(0,1,length=11)) | |
190 g₂ = EquidistantGrid(range(2,3,length=6)) | |
191 g₃ = EquidistantGrid(range(4,5,length=7)) | |
192 | |
193 @test orthogonal_grid(TensorGrid(g₁, g₂, g₃), TensorGridBoundary{1, Lower}()) == g₁ | |
194 @test orthogonal_grid(TensorGrid(g₁, g₂, g₃), TensorGridBoundary{2, Lower}()) == g₂ | |
195 @test orthogonal_grid(TensorGrid(g₁, g₂, g₃), TensorGridBoundary{3, Upper}()) == g₃ | |
196 end | |
197 | |
187 end | 198 end |
188 | 199 |
189 @testset "combined_coordinate_vector_type" begin | 200 @testset "combined_coordinate_vector_type" begin |
190 @test Grids.combined_coordinate_vector_type(Float64) == Float64 | 201 @test Grids.combined_coordinate_vector_type(Float64) == Float64 |
191 @test Grids.combined_coordinate_vector_type(Float64, Int) == SVector{2,Float64} | 202 @test Grids.combined_coordinate_vector_type(Float64, Int) == SVector{2,Float64} |