comparison src/SbpOperators/boundaryops/normal_derivative.jl @ 1658:cc9d18a5ff2d feature/sbp_operators/laplace_curvilinear

Simplify normal_derivative
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 28 Jun 2024 17:00:57 +0200
parents 9c84e97de895
children b30db2ea34ed
comparison
equal deleted inserted replaced
1657:9c84e97de895 1658:cc9d18a5ff2d
29 return BoundaryOperator(g, scaled_stencil, boundary) 29 return BoundaryOperator(g, scaled_stencil, boundary)
30 end 30 end
31 31
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(logicalgrid(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⁻¹ = geometric_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,:]