Mercurial > repos > public > sbplib_julia
view src/SbpOperators/boundaryops/boundary_restriction.jl @ 1284:f19c51ddbd72 tooling/benchmarks
Update readme with info about running benchmarks from make. Fix typos
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 02 Mar 2023 09:59:42 +0100 |
parents | c0ab81e4c39c |
children | 1cc45207817e |
line wrap: on
line source
""" boundary_restriction(grid, closure_stencil::Stencil, boundary) Creates boundary restriction operators `e` as `LazyTensor`s on `boundary` `e` is the restriction of a grid function to `boundary` using a `Stencil` `closure_stencil`. `e'` is the prolongation of a grid function on `boundary` to the whole grid using the same `closure_stencil`. On a one-dimensional `grid`, `e` is a `BoundaryOperator`. On a multi-dimensional `grid`, `e` is the inflation of a `BoundaryOperator`. See also: [`BoundaryOperator`](@ref), [`LazyTensors.inflate`](@ref). """ function boundary_restriction(grid, closure_stencil, boundary) converted_stencil = convert(Stencil{eltype(grid)}, closure_stencil) op = BoundaryOperator(restrict(grid, dim(boundary)), converted_stencil, region(boundary)) return LazyTensors.inflate(op, size(grid), dim(boundary)) end """ boundary_restriction(grid, stencil_set, boundary) Creates a `boundary_restriction` operator on `grid` given a `stencil_set`. """ boundary_restriction(grid, stencil_set::StencilSet, boundary) = boundary_restriction(grid, parse_stencil(stencil_set["e"]["closure"]), boundary)