comparison test/Grids/tensor_grid_test.jl @ 1602:3e7438e2a033 feature/boundary_conditions

Address review comments (1 left to be discussed)
author Vidar Stiernström <vidar.stiernstrom@gmail.com>
date Sat, 01 Jun 2024 17:39:54 -0700
parents 611ae2308aa1
children b459082533f7
comparison
equal deleted inserted replaced
1601:fad18896d20a 1602:3e7438e2a033
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 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
198 end 188 end
199 189
200 @testset "combined_coordinate_vector_type" begin 190 @testset "combined_coordinate_vector_type" begin
201 @test Grids.combined_coordinate_vector_type(Float64) == Float64 191 @test Grids.combined_coordinate_vector_type(Float64) == Float64
202 @test Grids.combined_coordinate_vector_type(Float64, Int) == SVector{2,Float64} 192 @test Grids.combined_coordinate_vector_type(Float64, Int) == SVector{2,Float64}