comparison src/SbpOperators/boundaryops/normal_derivative.jl @ 1039:696a3307b6a4

Merge feature/stencil_set_type
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Tue, 22 Mar 2022 14:14:31 +0100
parents 7bf3121c6864
children 7fc8df5157a7
comparison
equal deleted inserted replaced
988:83046af6143a 1039:696a3307b6a4
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)