Mercurial > repos > public > sbplib_julia
comparison src/Grids/manifolds.jl @ 1999:a1b2453c02c9 feature/grids/manifolds
Add check in jacobian for the coordinate to be in the parameterspace of the chart
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 25 Apr 2025 16:05:58 +0200 |
parents | 6dd00ea0511a |
children |
comparison
equal
deleted
inserted
replaced
1998:6dd00ea0511a | 1999:a1b2453c02c9 |
---|---|
34 c = Chart(f, ps) | 34 c = Chart(f, ps) |
35 jacobian(c::typeof(c),ξ) = f′(ξ) | 35 jacobian(c::typeof(c),ξ) = f′(ξ) |
36 ``` | 36 ``` |
37 which will both allow calling `jacobian(c,ξ)`. | 37 which will both allow calling `jacobian(c,ξ)`. |
38 """ | 38 """ |
39 jacobian(c::Chart, ξ) = jacobian(c.mapping, ξ) | 39 function jacobian(c::Chart, ξ) |
40 if ξ ∉ parameterspace(c) | |
41 throw(DomainError(ξ, "jacobian was called with logical coordinates outside the parameterspace of the chart. If this was inteded, use the `mapping` field from the Chart struct instead.")) | |
42 end | |
43 return jacobian(c.mapping, ξ) | |
44 end | |
40 | 45 |
41 boundary_identifiers(c::Chart) = boundary_identifiers(parameterspace(c)) | 46 boundary_identifiers(c::Chart) = boundary_identifiers(parameterspace(c)) |
42 | 47 |
43 | 48 |
44 """ | 49 """ |