diff test/Grids/manifolds_test.jl @ 1998:6dd00ea0511a feature/grids/manifolds

Add check if the logical coordinates are in the parameter space when calling a chart
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 25 Apr 2025 08:28:34 +0200
parents c63116e2ec8e
children a1b2453c02c9
line wrap: on
line diff
--- a/test/Grids/manifolds_test.jl	Fri Apr 25 08:18:36 2025 +0200
+++ b/test/Grids/manifolds_test.jl	Fri Apr 25 08:28:34 2025 +0200
@@ -18,10 +18,15 @@
     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
 
+    @testset "Calling" begin
+        c = Chart(X, unitsquare())
+        @test c([.3,.2]) == [.6,.4]
+        @test_throws DomainError c([3,2])
+    end
+
     @test jacobian(c, [3,2]) == [2,2]
 
     @test Set(boundary_identifiers(Chart(X,unitsquare()))) == Set([east(),west(),south(),north()])