Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/boundaryops/normal_derivative.jl @ 1040:7fc8df5157a7 refactor/lazy_tensors
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 22 Mar 2022 14:23:55 +0100 |
parents | 1ba8a398af9c 7bf3121c6864 |
children | 157a78959e5d |
comparison
equal
deleted
inserted
replaced
1037:9e76bf19904c | 1040:7fc8df5157a7 |
---|---|
8 On a one-dimensional `grid`, `d` is a `BoundaryOperator`. On a multi-dimensional `grid`, `d` is the inflation of | 8 On a one-dimensional `grid`, `d` is a `BoundaryOperator`. On a multi-dimensional `grid`, `d` is the inflation of |
9 a `BoundaryOperator`. | 9 a `BoundaryOperator`. |
10 | 10 |
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, 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 return SbpOperators.boundary_operator(grid, scale(closure_stencil,h_inv), boundary) |
17 end | 17 end |
18 | 18 |
19 """ | 19 """ |
20 normal_derivative(grid, stencil_set, boundary) | 20 normal_derivative(grid, stencil_set, boundary) |
21 | 21 |
22 Creates a `normal_derivative` operator on `grid` given a parsed TOML | 22 Creates a `normal_derivative` operator on `grid` given a `stencil_set`. |
23 `stencil_set`. | |
24 """ | 23 """ |
25 normal_derivative(grid, stencil_set, boundary) = normal_derivative(grid, parse_stencil(stencil_set["d1"]["closure"]), boundary) | 24 normal_derivative(grid, stencil_set::StencilSet, boundary) = normal_derivative(grid, parse_stencil(stencil_set["d1"]["closure"]), boundary) |