comparison src/SbpOperators/boundaryops/boundary_restriction.jl @ 1221:b3b4d29b46c3 refactor/grids

Merge default
author Jonatan Werpers <jonatan@werpers.com>
date Fri, 10 Feb 2023 08:36:56 +0100
parents c0ab81e4c39c
children 1cc45207817e
comparison
equal deleted inserted replaced
1220:93bba649aea2 1221:b3b4d29b46c3
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