Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/boundaryops/boundary_restriction.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 99d1f5651d0b |
children | 157a78959e5d |
comparison
equal
deleted
inserted
replaced
1037:9e76bf19904c | 1040:7fc8df5157a7 |
---|---|
1 # TODO: The type parameter closure_stencil::Stencil is required since there isnt any suitable type | |
2 # for stencil_set. We should consider adding type ::StencilSet and dispatch on that instead. | |
3 # The same goes for other operators | |
4 """ | 1 """ |
5 boundary_restriction(grid, closure_stencil::Stencil, boundary) | 2 boundary_restriction(grid, closure_stencil::Stencil, boundary) |
6 | 3 |
7 Creates boundary restriction operators `e` as `LazyTensor`s on `boundary` | 4 Creates boundary restriction operators `e` as `LazyTensor`s on `boundary` |
8 | 5 |
11 On a one-dimensional `grid`, `e` is a `BoundaryOperator`. On a multi-dimensional `grid`, `e` is the inflation of | 8 On a one-dimensional `grid`, `e` is a `BoundaryOperator`. On a multi-dimensional `grid`, `e` is the inflation of |
12 a `BoundaryOperator`. | 9 a `BoundaryOperator`. |
13 | 10 |
14 See also: [`boundary_operator`](@ref). | 11 See also: [`boundary_operator`](@ref). |
15 """ | 12 """ |
16 function boundary_restriction(grid, closure_stencil::Stencil, boundary) | 13 function boundary_restriction(grid, closure_stencil, boundary) |
17 converted_stencil = convert(Stencil{eltype(grid)}, closure_stencil) | 14 converted_stencil = convert(Stencil{eltype(grid)}, closure_stencil) |
18 return SbpOperators.boundary_operator(grid, converted_stencil, boundary) | 15 return SbpOperators.boundary_operator(grid, converted_stencil, boundary) |
19 end | 16 end |
20 | 17 |
21 """ | 18 """ |
22 boundary_restriction(grid, stencil_set, boundary) | 19 boundary_restriction(grid, stencil_set, boundary) |
23 | 20 |
24 Creates a `boundary_restriction` operator on `grid` given a parsed TOML | 21 Creates a `boundary_restriction` operator on `grid` given a `stencil_set`. |
25 `stencil_set`. | |
26 """ | 22 """ |
27 boundary_restriction(grid, stencil_set, boundary) = boundary_restriction(grid, parse_stencil(stencil_set["e"]["closure"]), boundary) | 23 boundary_restriction(grid, stencil_set::StencilSet, boundary) = boundary_restriction(grid, parse_stencil(stencil_set["e"]["closure"]), boundary) |