Mercurial > repos > public > sbplib_julia
comparison test/Grids/equidistant_grid_test.jl @ 1464:37cf9f79caa4 feature/grids/boundary_indicies
Make boundary_indices for EquidistantGrid return a tuple to be more concistent with how TensorGrid will implement it
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 29 Nov 2023 09:04:12 +0100 |
parents | 05eb8ba149e2 |
children | 43aaf710463e |
comparison
equal
deleted
inserted
replaced
1463:4ad1282f8bab | 1464:37cf9f79caa4 |
---|---|
68 @test boundary_grid(g, Upper()) == ZeroDimGrid(1.0) | 68 @test boundary_grid(g, Upper()) == ZeroDimGrid(1.0) |
69 end | 69 end |
70 | 70 |
71 @testset "boundary_indices" begin | 71 @testset "boundary_indices" begin |
72 g = EquidistantGrid(0:0.1:1) | 72 g = EquidistantGrid(0:0.1:1) |
73 @test boundary_indices(g, Lower()) == 1 | 73 @test boundary_indices(g, Lower()) == (1,) |
74 @test boundary_indices(g, Upper()) == 11 | 74 @test boundary_indices(g, Upper()) == (11,) |
75 | 75 |
76 g = EquidistantGrid(2:0.1:10) | 76 g = EquidistantGrid(2:0.1:10) |
77 @test boundary_indices(g, Lower()) == 1 | 77 @test boundary_indices(g, Lower()) == (1,) |
78 @test boundary_indices(g, Upper()) == 81 | 78 @test boundary_indices(g, Upper()) == (81,) |
79 | 79 |
80 end | 80 end |
81 | 81 |
82 @testset "refine" begin | 82 @testset "refine" begin |
83 g = EquidistantGrid(0:0.1:1) | 83 g = EquidistantGrid(0:0.1:1) |