Mercurial > repos > public > sbplib_julia
changeset 1572:157c43966b06 feature/grids/manifolds
Add some tests and implement parameterspace for ConcreteChart
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 25 Apr 2024 14:13:41 +0200 |
parents | c2620118f110 |
children | bbb9065834ce |
files | src/Grids/Grids.jl src/Grids/manifolds.jl test/Grids/manifolds_test.jl |
diffstat | 3 files changed, 10 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Grids/Grids.jl Thu Apr 25 14:00:40 2024 +0200 +++ b/src/Grids/Grids.jl Thu Apr 25 14:13:41 2024 +0200 @@ -22,6 +22,7 @@ export Chart export ConcreteChart +export parameterspace # Grid export Grid
--- a/src/Grids/manifolds.jl Thu Apr 25 14:00:40 2024 +0200 +++ b/src/Grids/manifolds.jl Thu Apr 25 14:13:41 2024 +0200 @@ -99,7 +99,8 @@ parameterspace::PST end -(c::Chart)(x̄) = c.mapping(x̄) +(c::ConcreteChart)(x̄) = c.mapping(x̄) +parameterspace(c::ConcreteChart) = c.parameterspace """
--- a/test/Grids/manifolds_test.jl Thu Apr 25 14:00:40 2024 +0200 +++ b/test/Grids/manifolds_test.jl Thu Apr 25 14:13:41 2024 +0200 @@ -35,7 +35,13 @@ end @testset "Chart" begin - @test ConcreteChart(x->2x, unitsquare()) isa Chart{2} +end + +@testset "ConcreteChart" begin + c = ConcreteChart(x->2x, unitsquare()) + @test c isa Chart{2} + @test c([3,2]) == [6,4] + @test parameterspace(c) == unitsquare() end @testset "Atlas" begin