comparison test/Grids/manifolds_test.jl @ 1558:81e97d3bec8c feature/grids/manifolds

Start adding manifolds
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 24 Apr 2024 13:26:30 +0200
parents
children 35fe4375b35f
comparison
equal deleted inserted replaced
1556:ec5e7926c37b 1558:81e97d3bec8c
1 using Test
2
3 using Sbplib.Grids
4 using Sbplib.RegionIndices
5 using Sbplib.LazyTensors
6
7 # using StaticArrays
8
9 @testset "HyperBox" begin
10 @test HyperBox([1,1], [2,2]) isa HyperBox{Int, 2}
11
12 @test limits(HyperBox([1,2], [3,4])) == ([1,2], [3,4])
13 @test limits(HyperBox([1,2], [3,4]), 1) == (1,3)
14 @test limits(HyperBox([1,2], [3,4]), 2) == (2,4)
15
16 @test unitinterval() isa HyperBox{Float64,1}
17 @test limits(unitinterval()) == ([0], [1])
18
19 @test unitinterval(Int) isa HyperBox{Int,1}
20 @test limits(unitinterval(Int)) == ([0], [1])
21
22 @test unitsquare() isa HyperBox{Float64,2}
23 @test limits(unitsquare()) == ([0,0],[1,1])
24
25 @test unitcube() isa HyperBox{Float64,3}
26 @test limits(unitcube()) == ([0,0,0],[1,1,1])
27
28 @test unithyperbox(4) isa HyperBox{Float64,4}
29 @test limits(unithyperbox(4)) == ([0,0,0,0],[1,1,1,1])
30 end
31
32 @testset "Simplex" begin
33 @test Simplex([1,2], [3,4]) isa Simplex{Int, 2}
34 @test Simplex([1,2,3], [4,5,6]) isa Simplex{Int, 3}
35 end
36
37 @testset "Chart" begin
38
39 end
40
41 @testset "Atlas" begin
42
43 end