Mercurial > repos > public > sbplib_julia
comparison test/testGrids.jl @ 352:a18bd337a280 feature/equidistant_grid/subgrid
Add function for getting a one dimensional grid for a given dimension from a equidistant grid
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sun, 27 Sep 2020 14:38:05 +0200 |
parents | 2b0c9b30ea3b |
children | 8257cc75ea6b |
comparison
equal
deleted
inserted
replaced
350:28e71a861531 | 352:a18bd337a280 |
---|---|
5 | 5 |
6 @testset "EquidistantGrid" begin | 6 @testset "EquidistantGrid" begin |
7 @test EquidistantGrid(4,0,1) isa EquidistantGrid | 7 @test EquidistantGrid(4,0,1) isa EquidistantGrid |
8 @test dimension(EquidistantGrid(4,0,1)) == 1 | 8 @test dimension(EquidistantGrid(4,0,1)) == 1 |
9 @test EquidistantGrid(4,0,1) == EquidistantGrid((4,),(0,),(1,)) | 9 @test EquidistantGrid(4,0,1) == EquidistantGrid((4,),(0,),(1,)) |
10 | |
11 g = EquidistantGrid((5,3), (0,0), (2,1)) | |
12 @test subgrid(g, 1) == EquidistantGrid(5,0,2) | |
13 @test subgrid(g, 2) == EquidistantGrid(3,0,1) | |
10 end | 14 end |
11 | 15 |
12 end | 16 end |