diff src/Grids/geometry.jl @ 1975:79adad4a15d6 feature/grids/geometry_functions

Implement Grids.jacobian for LineSegment
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 25 Feb 2025 22:42:14 +0100
parents 3ed7ca1f60c4
children 34a7e3919e9a
line wrap: on
line diff
--- a/src/Grids/geometry.jl	Tue Feb 25 22:39:28 2025 +0100
+++ b/src/Grids/geometry.jl	Tue Feb 25 22:42:14 2025 +0100
@@ -34,6 +34,7 @@
 
 (c::LineSegment)(s) = (1-s)*c.a + s*c.b
 
+Grids.jacobian(c::LineSegment, s) = c.b - c.a
 
 function linesegments(ps...)
     return [LineSegment(ps[i], ps[i+1]) for i ∈ 1:length(ps)-1]