Mercurial > repos > public > sbplib_julia
comparison test/Grids/grid_test.jl @ 1557:9113f437431d feature/grids/curvilinear
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sat, 13 Apr 2024 23:52:40 +0200 |
parents | 43aaf710463e |
children | 471a948cd2b2 |
comparison
equal
deleted
inserted
replaced
1527:69790e9d1652 | 1557:9113f437431d |
---|---|
45 | 45 |
46 @test eval_on(EquidistantGrid(range(0,1,length=4)), x->2x) isa LazyArray | 46 @test eval_on(EquidistantGrid(range(0,1,length=4)), x->2x) isa LazyArray |
47 @test eval_on(EquidistantGrid(range(0,1,length=4)), x->2x) == 2 .* range(0,1,length=4) | 47 @test eval_on(EquidistantGrid(range(0,1,length=4)), x->2x) == 2 .* range(0,1,length=4) |
48 | 48 |
49 | 49 |
50 g = equidistant_grid((5,3), (0.0,0.0), (2.0,1.0)) | 50 g = equidistant_grid((0.0,0.0), (2.0,1.0), 5, 3) |
51 | 51 |
52 @test eval_on(g, x̄ -> 0.) isa LazyArray | 52 @test eval_on(g, x̄ -> 0.) isa LazyArray |
53 @test eval_on(g, x̄ -> 0.) == fill(0., (5,3)) | 53 @test eval_on(g, x̄ -> 0.) == fill(0., (5,3)) |
54 | 54 |
55 @test eval_on(g, x̄ -> sin(x̄[1])*cos(x̄[2])) == map(x̄->sin(x̄[1])*cos(x̄[2]), g) | 55 @test eval_on(g, x̄ -> sin(x̄[1])*cos(x̄[2])) == map(x̄->sin(x̄[1])*cos(x̄[2]), g) |