comparison src/SbpOperators/boundaryops/normal_derivative.jl @ 989:7bf3121c6864 feature/stencil_set_type

Add type StencilSet
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 17 Mar 2022 21:31:20 +0100
parents 38d1752a9aff
children 7fc8df5157a7
comparison
equal deleted inserted replaced
988:83046af6143a 989:7bf3121c6864
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)