Mercurial > repos > public > sbplib_julia
comparison test/testGrids.jl @ 765:fdd48f6ace1c operator_storage_array_of_table
Merge in default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sun, 07 Feb 2021 21:32:21 +0100 |
parents | f0ceddeae993 |
children | 1d3e29ffc6c6 |
comparison
equal
deleted
inserted
replaced
764:d34b515b0ae7 | 765:fdd48f6ace1c |
---|---|
1 using Sbplib.Grids | 1 using Sbplib.Grids |
2 using Test | 2 using Test |
3 using Sbplib.RegionIndices | |
3 | 4 |
4 @testset "Grids" begin | 5 @testset "Grids" begin |
5 | 6 |
6 @testset "EquidistantGrid" begin | 7 @testset "EquidistantGrid" begin |
7 @test EquidistantGrid(4,0.0,1.0) isa EquidistantGrid | 8 @test EquidistantGrid(4,0.0,1.0) isa EquidistantGrid |
51 @test restrict(g, 3) == EquidistantGrid(3,0.0,3.0) | 52 @test restrict(g, 3) == EquidistantGrid(3,0.0,3.0) |
52 @test restrict(g, 1:2) == EquidistantGrid((2,5),(0.0,0.0),(2.0,1.0)) | 53 @test restrict(g, 1:2) == EquidistantGrid((2,5),(0.0,0.0),(2.0,1.0)) |
53 @test restrict(g, 2:3) == EquidistantGrid((5,3),(0.0,0.0),(1.0,3.0)) | 54 @test restrict(g, 2:3) == EquidistantGrid((5,3),(0.0,0.0),(1.0,3.0)) |
54 @test restrict(g, [1,3]) == EquidistantGrid((2,3),(0.0,0.0),(2.0,3.0)) | 55 @test restrict(g, [1,3]) == EquidistantGrid((2,3),(0.0,0.0),(2.0,3.0)) |
55 @test restrict(g, [2,1]) == EquidistantGrid((5,2),(0.0,0.0),(1.0,2.0)) | 56 @test restrict(g, [2,1]) == EquidistantGrid((5,2),(0.0,0.0),(1.0,2.0)) |
57 | |
58 @testset "boundary_identifiers" begin | |
59 g = EquidistantGrid((2,5,3), (0.0,0.0,0.0), (2.0,1.0,3.0)) | |
60 bids = (CartesianBoundary{1,Lower}(),CartesianBoundary{1,Upper}(), | |
61 CartesianBoundary{2,Lower}(),CartesianBoundary{2,Upper}(), | |
62 CartesianBoundary{3,Lower}(),CartesianBoundary{3,Upper}()) | |
63 @test boundary_identifiers(g) == bids | |
64 @inferred boundary_identifiers(g) | |
65 end | |
56 end | 66 end |
57 | 67 |
58 end | 68 end |