Mercurial > repos > public > sbplib_julia
comparison test/Grids/equidistant_grid_test.jl @ 1877:21e5fe1545c0 refactor/lazy_tensors/elementwise_ops
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 27 Jan 2025 16:56:04 +0100 |
parents | 871f3f1decea |
children | edee7d677efb f93ba5832146 |
comparison
equal
deleted
inserted
replaced
1840:cb3a8450ed44 | 1877:21e5fe1545c0 |
---|---|
72 @test boundary_grid(g, UpperBoundary()) == ZeroDimGrid(1.0) | 72 @test boundary_grid(g, UpperBoundary()) == ZeroDimGrid(1.0) |
73 end | 73 end |
74 | 74 |
75 @testset "boundary_indices" begin | 75 @testset "boundary_indices" begin |
76 g = EquidistantGrid(0:0.1:1) | 76 g = EquidistantGrid(0:0.1:1) |
77 @test boundary_indices(g, LowerBoundary()) == (1,) | 77 @test boundary_indices(g, LowerBoundary()) == 1 |
78 @test boundary_indices(g, UpperBoundary()) == (11,) | 78 @test boundary_indices(g, UpperBoundary()) == 11 |
79 | |
80 gf = collect(g) | |
81 @test gf[boundary_indices(g, LowerBoundary())] == gf[1] | |
82 @test gf[boundary_indices(g, UpperBoundary())] == gf[11] | |
79 | 83 |
80 g = EquidistantGrid(2:0.1:10) | 84 g = EquidistantGrid(2:0.1:10) |
81 @test boundary_indices(g, LowerBoundary()) == (1,) | 85 @test boundary_indices(g, LowerBoundary()) == 1 |
82 @test boundary_indices(g, UpperBoundary()) == (81,) | 86 @test boundary_indices(g, UpperBoundary()) == 81 |
83 | |
84 end | 87 end |
85 | 88 |
86 @testset "refine" begin | 89 @testset "refine" begin |
87 g = EquidistantGrid(0:0.1:1) | 90 g = EquidistantGrid(0:0.1:1) |
88 @test refine(g, 1) == g | 91 @test refine(g, 1) == g |