Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/boundaryops/boundary_restriction.jl @ 1162:62aaed9cf76b feature/dissipation_operators
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 29 Nov 2022 22:43:57 +0100 |
parents | c0ab81e4c39c |
children | 1cc45207817e |
comparison
equal
deleted
inserted
replaced
1098:6f51160c7ca7 | 1162:62aaed9cf76b |
---|---|
6 `e` is the restriction of a grid function to `boundary` using a `Stencil` `closure_stencil`. | 6 `e` is the restriction of a grid function to `boundary` using a `Stencil` `closure_stencil`. |
7 `e'` is the prolongation of a grid function on `boundary` to the whole grid using the same `closure_stencil`. | 7 `e'` is the prolongation of a grid function on `boundary` to the whole grid using the same `closure_stencil`. |
8 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 |
9 a `BoundaryOperator`. | 9 a `BoundaryOperator`. |
10 | 10 |
11 See also: [`boundary_operator`](@ref). | 11 See also: [`BoundaryOperator`](@ref), [`LazyTensors.inflate`](@ref). |
12 """ | 12 """ |
13 function boundary_restriction(grid, closure_stencil, boundary) | 13 function boundary_restriction(grid, closure_stencil, boundary) |
14 converted_stencil = convert(Stencil{eltype(grid)}, closure_stencil) | 14 converted_stencil = convert(Stencil{eltype(grid)}, closure_stencil) |
15 return SbpOperators.boundary_operator(grid, converted_stencil, boundary) | 15 |
16 op = BoundaryOperator(restrict(grid, dim(boundary)), converted_stencil, region(boundary)) | |
17 return LazyTensors.inflate(op, size(grid), dim(boundary)) | |
16 end | 18 end |
17 | 19 |
18 """ | 20 """ |
19 boundary_restriction(grid, stencil_set, boundary) | 21 boundary_restriction(grid, stencil_set, boundary) |
20 | 22 |