Mercurial > repos > public > sbplib_julia
changeset 1927:fe18cdad2b27 feature/grids/manifolds
Test construction of CartesianAtlas with different type on the charts
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 07 Feb 2025 08:44:36 +0100 |
parents | c02797f146c1 |
children | 96b3e9c516fe |
files | src/Grids/manifolds.jl test/Grids/manifolds_test.jl |
diffstat | 2 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Grids/manifolds.jl Thu Feb 06 15:49:25 2025 +0100 +++ b/src/Grids/manifolds.jl Fri Feb 07 08:44:36 2025 +0100 @@ -58,8 +58,8 @@ """ function connections end -struct CartesianAtlas <: Atlas - charts::Matrix{Chart} +struct CartesianAtlas{D,C<:Chart} <: Atlas + charts::AbstractArray{C,D} end charts(a::CartesianAtlas) = a.charts
--- a/test/Grids/manifolds_test.jl Thu Feb 06 15:49:25 2025 +0100 +++ b/test/Grids/manifolds_test.jl Fri Feb 07 08:44:36 2025 +0100 @@ -25,6 +25,8 @@ @test a isa Atlas @test charts(a) == [c c; c c] + c2 = Chart(x->2x, unitsquare()) + @test CartesianAtlas([c c2; c2 c]) isa CartesianAtlas @testset "size" begin @test size(CartesianAtlas([c c; c c])) == (2,2)