Mercurial > repos > public > sbplib_julia
diff src/Grids/mapped_grid.jl @ 1841:1c58005429fd feature/grids/manifolds
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 22 Oct 2024 08:50:23 +0200 |
parents | 2b5f81e288f1 f21bfc5f21aa |
children | f2b32da29b73 |
line wrap: on
line diff
--- a/src/Grids/mapped_grid.jl Wed Oct 02 08:51:37 2024 +0200 +++ b/src/Grids/mapped_grid.jl Tue Oct 22 08:50:23 2024 +0200 @@ -173,6 +173,8 @@ function normal(g::MappedGrid, boundary) b_indices = boundary_indices(g, boundary) σ = _boundary_sign(component_type(g), boundary) + + # TODO: Refactor this when `boundary_indices(g, ...)` has been made iterable. return map(jacobian(g)[b_indices...]) do ∂x∂ξ ∂ξ∂x = inv(∂x∂ξ) k = grid_id(boundary) @@ -180,6 +182,11 @@ end end +""" + normal(g::MappedGrid, boundary, i...) + +The outward pointing normal to the specified boundary in grid point `i`. +""" function normal(g::MappedGrid, boundary, i...) σ = _boundary_sign(component_type(g), boundary) ∂ξ∂x = inv(jacobian(g)[i...])