diff src/Grids/geometry.jl @ 2072:c36812de3f2d feature/grids/geometry_functions

Add parameter validation when evaluating jacobian for transfinite interpolation
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 17 Feb 2026 20:40:21 +0100
parents 9e9c56f5a656
children bc09d0bfac65
line wrap: on
line diff
--- a/src/Grids/geometry.jl	Tue Feb 17 20:37:53 2026 +0100
+++ b/src/Grids/geometry.jl	Tue Feb 17 20:40:21 2026 +0100
@@ -306,6 +306,9 @@
 end
 
 function Grids.jacobian(s::TransfiniteInterpolationSurface, ξ̄)
+    if ξ̄ ∉ unitsquare()
+        throw(DomainError(ξ̄, "Transfinite interpolation was called with parameters outside the unit square."))
+    end
     u, v = ξ̄
 
     c₁, c₂, c₃, c₄ = s.c₁, s.c₂, s.c₃, s.c₄