Mercurial > repos > public > sbplib_julia
comparison src/Grids/geometry.jl @ 1977:270675bb97be feature/grids/geometry_functions
Implement Grids.jacobian for TransfiniteInterpolationSurface
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Tue, 25 Feb 2025 23:33:56 +0100 |
| parents | 34a7e3919e9a |
| children | d7a5129517d9 |
comparison
equal
deleted
inserted
replaced
| 1976:34a7e3919e9a | 1977:270675bb97be |
|---|---|
| 116 end | 116 end |
| 117 | 117 |
| 118 return true | 118 return true |
| 119 end | 119 end |
| 120 | 120 |
| 121 function Grids.jacobian(s::TransfiniteInterpolationSurface, ξ̄) | |
| 122 u, v = ξ̄ | |
| 123 | |
| 124 c₁, c₂, c₃, c₄ = s.c₁, s.c₂, s.c₃, s.c₄ | |
| 125 P₀₀ = c₁(0) | |
| 126 P₁₀ = c₂(0) | |
| 127 P₁₁ = c₃(0) | |
| 128 P₀₁ = c₄(0) | |
| 129 | |
| 130 ∂x̄∂ξ₁ = (1-v)*jacobian(c₁,u) + c₂(v) - v*jacobian(c₃,1-u) -c₄(1-v) - ( | |
| 131 -(1-v)*P₀₀ + (1-v)*P₁₀ + v*P₁₁ - v*P₀₁ | |
| 132 ) | |
| 133 | |
| 134 | |
| 135 (1-v)*c₁(u) + u*c₂(v) + v*c₃(1-u) + (1-u)*c₄(1-v) - ( | |
| 136 (1-u)*(1-v)*P₀₀ + u*(1-v)*P₁₀ + u*v*P₁₁ + (1-u)*v*P₀₁ | |
| 137 ) | |
| 138 | |
| 139 | |
| 140 ∂x̄∂ξ₂ = -c₁(u) + u*jacobian(c₂,v) + c₃(1-u) - (1-u)*jacobian(c₄,1-v) - ( | |
| 141 -(1-u)*P₀₀ - u*P₁₀ + u*P₁₁ + (1-u)*P₀₁ | |
| 142 ) | |
| 143 | |
| 144 return [∂x̄∂ξ₁ ∂x̄∂ξ₂] | |
| 145 end | |
| 146 | |
| 121 # TODO: Implement jacobian() for the different mapping helpers | 147 # TODO: Implement jacobian() for the different mapping helpers |
| 122 # TODO: Add doc strings | 148 # TODO: Add doc strings |
