Mercurial > repos > public > sbplib_julia
comparison test/Grids/equidistant_grid_test.jl @ 1901:edee7d677efb feature/grids/manifolds
Merge default
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Sat, 01 Feb 2025 21:38:49 +0100 |
| parents | a93d2b668446 871f3f1decea |
| children | 04c251bccbd4 |
comparison
equal
deleted
inserted
replaced
| 1870:27534b471b6a | 1901:edee7d677efb |
|---|---|
| 73 @test boundary_grid(g, UpperBoundary()) == ZeroDimGrid(1.0) | 73 @test boundary_grid(g, UpperBoundary()) == ZeroDimGrid(1.0) |
| 74 end | 74 end |
| 75 | 75 |
| 76 @testset "boundary_indices" begin | 76 @testset "boundary_indices" begin |
| 77 g = EquidistantGrid(0:0.1:1) | 77 g = EquidistantGrid(0:0.1:1) |
| 78 @test boundary_indices(g, LowerBoundary()) == (1,) | 78 @test boundary_indices(g, LowerBoundary()) == 1 |
| 79 @test boundary_indices(g, UpperBoundary()) == (11,) | 79 @test boundary_indices(g, UpperBoundary()) == 11 |
| 80 | |
| 81 gf = collect(g) | |
| 82 @test gf[boundary_indices(g, LowerBoundary())] == gf[1] | |
| 83 @test gf[boundary_indices(g, UpperBoundary())] == gf[11] | |
| 80 | 84 |
| 81 g = EquidistantGrid(2:0.1:10) | 85 g = EquidistantGrid(2:0.1:10) |
| 82 @test boundary_indices(g, LowerBoundary()) == (1,) | 86 @test boundary_indices(g, LowerBoundary()) == 1 |
| 83 @test boundary_indices(g, UpperBoundary()) == (81,) | 87 @test boundary_indices(g, UpperBoundary()) == 81 |
| 84 | |
| 85 end | 88 end |
| 86 | 89 |
| 87 @testset "refine" begin | 90 @testset "refine" begin |
| 88 g = EquidistantGrid(0:0.1:1) | 91 g = EquidistantGrid(0:0.1:1) |
| 89 @test refine(g, 1) == g | 92 @test refine(g, 1) == g |
