Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/boundaryops/normal_derivative.jl @ 1099:05a25a5063bb refactor/sbpoperators/inflation
Try to remove volume_operator and boundary_operator methods
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 21 Mar 2022 12:51:39 +0100 |
parents | 1ba8a398af9c |
children | 157a78959e5d |
comparison
equal
deleted
inserted
replaced
1024:5be17f647018 | 1099:05a25a5063bb |
---|---|
11 See also: [`boundary_operator`](@ref). | 11 See also: [`boundary_operator`](@ref). |
12 """ | 12 """ |
13 function normal_derivative(grid, closure_stencil::Stencil, boundary) | 13 function normal_derivative(grid, closure_stencil::Stencil, boundary) |
14 direction = dim(boundary) | 14 direction = dim(boundary) |
15 h_inv = inverse_spacing(grid)[direction] | 15 h_inv = inverse_spacing(grid)[direction] |
16 return SbpOperators.boundary_operator(grid, scale(closure_stencil,h_inv), boundary) | 16 |
17 op = BoundaryOperator(restrict(grid, dim(boundary)), scale(closure_stencil,h_inv), region(boundary)) | |
18 return LazyTensors.inflate(op, size(grid), dim(boundary)) | |
17 end | 19 end |
18 | 20 |
19 """ | 21 """ |
20 normal_derivative(grid, stencil_set, boundary) | 22 normal_derivative(grid, stencil_set, boundary) |
21 | 23 |