Mercurial > repos > public > sbplib_julia
changeset 1921:7fb713570965 feature/grids/manifolds
Add test for jacobian
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 06 Feb 2025 08:41:50 +0100 |
parents | ae83c91286a2 |
children | 84e5ab97902d |
files | test/Grids/manifolds_test.jl |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/test/Grids/manifolds_test.jl Wed Feb 05 16:17:29 2025 +0100 +++ b/test/Grids/manifolds_test.jl Thu Feb 06 08:41:50 2025 +0100 @@ -4,14 +4,18 @@ using Diffinitive.RegionIndices using Diffinitive.LazyTensors +using StaticArrays + @testset "Chart" begin - c = Chart(x->2x, unitsquare()) + X(ξ) = 2ξ + Grids.jacobian(::typeof(X), ξ) = @SVector[2,2] + c = Chart(X, unitsquare()) @test c isa Chart{2} @test c([3,2]) == [6,4] @test parameterspace(c) == unitsquare() @test ndims(c) == 2 - @test_broken jacobian(c, [3,2]) + @test jacobian(c, [3,2]) == [2,2] end @testset "CartesianAtlas" begin