Mercurial > repos > public > sbplib_julia
comparison test/Grids/EquidistantGrid_test.jl @ 877:dd2ab001a7b6 feature/equidistant_grid/refine
Implement refine function, move exports to the top of the file, change location of constuctors.
The constructors were changed have only one inner constructor and simpler outer constructors.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 14 Feb 2022 09:39:58 +0100 |
parents | 3e64e102e161 |
children | e81b89ae17c4 |
comparison
equal
deleted
inserted
replaced
864:9a2776352c2a | 877:dd2ab001a7b6 |
---|---|
96 @test boundary_grid(g,id_t) == restrict(g,[1,2]) | 96 @test boundary_grid(g,id_t) == restrict(g,[1,2]) |
97 @test boundary_grid(g,id_b) == restrict(g,[1,2]) | 97 @test boundary_grid(g,id_b) == restrict(g,[1,2]) |
98 @test_throws DomainError boundary_grid(g,CartesianBoundary{4,Lower}()) | 98 @test_throws DomainError boundary_grid(g,CartesianBoundary{4,Lower}()) |
99 end | 99 end |
100 end | 100 end |
101 | |
102 @testset "refine" begin | |
103 @test refine(EquidistantGrid{Float64}(), 1) == EquidistantGrid{Float64}() | |
104 @test refine(EquidistantGrid{Float64}(), 2) == EquidistantGrid{Float64}() | |
105 | |
106 g = EquidistantGrid((10,5),(0.,1.),(2.,3.)) | |
107 @test refine(g, 1) == g | |
108 @test refine(g, 2) == EquidistantGrid((19,9),(0.,1.),(2.,3.)) | |
109 @test refine(g, 3) == EquidistantGrid((28,13),(0.,1.),(2.,3.)) | |
110 end | |
101 end | 111 end |