Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/boundaryops/normal_derivative.jl @ 1696:29b96fc75bee feature/sbp_operators/laplace_curvilinear
Merge feature/grids/manifolds
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 28 Aug 2024 10:50:15 +0200 |
parents | b30db2ea34ed |
children | 1f42944d4a72 |
comparison
equal
deleted
inserted
replaced
1693:c7eee3952dcd | 1696:29b96fc75bee |
---|---|
32 function normal_derivative(g::MappedGrid, stencil_set::StencilSet, boundary) | 32 function normal_derivative(g::MappedGrid, stencil_set::StencilSet, boundary) |
33 k = grid_id(boundary) | 33 k = grid_id(boundary) |
34 b_indices = boundary_indices(g, boundary) | 34 b_indices = boundary_indices(g, boundary) |
35 | 35 |
36 # Compute the weights for the logical derivatives | 36 # Compute the weights for the logical derivatives |
37 g⁻¹ = geometric_tensor_inverse(g) | 37 g⁻¹ = metric_tensor_inverse(g) |
38 α = map(CartesianIndices(g⁻¹)[b_indices...]) do I # TODO: Fix iterator here | 38 α = map(CartesianIndices(g⁻¹)[b_indices...]) do I # TODO: Fix iterator here |
39 gᵏⁱ = g⁻¹[I][k,:] | 39 gᵏⁱ = g⁻¹[I][k,:] |
40 gᵏᵏ = g⁻¹[I][k,k] | 40 gᵏᵏ = g⁻¹[I][k,k] |
41 | 41 |
42 gᵏⁱ./sqrt(gᵏᵏ) | 42 gᵏⁱ./sqrt(gᵏᵏ) |