Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/boundaryops/normal_derivative.jl @ 1680:b30db2ea34ed feature/sbp_operators/laplace_curvilinear
Add concistency tests for normal_derivative and and fix bug regarding sign of boundary
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sun, 30 Jun 2024 15:57:22 +0200 |
parents | cc9d18a5ff2d |
children | 29b96fc75bee |
line wrap: on
line diff
--- a/src/SbpOperators/boundaryops/normal_derivative.jl Sun Jun 30 10:57:05 2024 +0200 +++ b/src/SbpOperators/boundaryops/normal_derivative.jl Sun Jun 30 15:57:22 2024 +0200 @@ -42,13 +42,19 @@ gᵏⁱ./sqrt(gᵏᵏ) end + σ = ScalingTensor( + Grids._boundary_sign(component_type(g), boundary), + size(boundary_grid(g,boundary)), + ) + + # Assemble difference operator mapreduce(+,1:ndims(g)) do i if i == k ∂_ξᵢ = normal_derivative(logicalgrid(g), stencil_set, boundary) else e = boundary_restriction(logicalgrid(g), stencil_set, boundary) - ∂_ξᵢ = e ∘ first_derivative(logicalgrid(g), stencil_set, i) + ∂_ξᵢ = σ ∘ e ∘ first_derivative(logicalgrid(g), stencil_set, i) end αᵢ = componentview(α,i)