Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/boundaryops/boundary_restriction.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 | 365bc4e2a6a2 |
| children | 99d1f5651d0b |
comparison
equal
deleted
inserted
replaced
| 988:83046af6143a | 989:7bf3121c6864 |
|---|---|
| 11 On a one-dimensional `grid`, `e` is a `BoundaryOperator`. On a multi-dimensional `grid`, `e` is the inflation of | 11 On a one-dimensional `grid`, `e` is a `BoundaryOperator`. On a multi-dimensional `grid`, `e` is the inflation of |
| 12 a `BoundaryOperator`. | 12 a `BoundaryOperator`. |
| 13 | 13 |
| 14 See also: [`boundary_operator`](@ref). | 14 See also: [`boundary_operator`](@ref). |
| 15 """ | 15 """ |
| 16 function boundary_restriction(grid, closure_stencil::Stencil, boundary) | 16 function boundary_restriction(grid, closure_stencil, boundary) |
| 17 converted_stencil = convert(Stencil{eltype(grid)}, closure_stencil) | 17 converted_stencil = convert(Stencil{eltype(grid)}, closure_stencil) |
| 18 return SbpOperators.boundary_operator(grid, converted_stencil, boundary) | 18 return SbpOperators.boundary_operator(grid, converted_stencil, boundary) |
| 19 end | 19 end |
| 20 | 20 |
| 21 """ | 21 """ |
| 22 boundary_restriction(grid, stencil_set, boundary) | 22 boundary_restriction(grid, stencil_set, boundary) |
| 23 | 23 |
| 24 Creates a `boundary_restriction` operator on `grid` given a parsed TOML | 24 Creates a `boundary_restriction` operator on `grid` given a `stencil_set`. |
| 25 `stencil_set`. | |
| 26 """ | 25 """ |
| 27 boundary_restriction(grid, stencil_set, boundary) = boundary_restriction(grid, parse_stencil(stencil_set["e"]["closure"]), boundary) | 26 boundary_restriction(grid, stencil_set::StencilSet, boundary) = boundary_restriction(grid, parse_stencil(stencil_set["e"]["closure"]), boundary) |
