Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/boundaryops/boundary_restriction.jl @ 1049:3bb94ce74697 feature/variable_derivatives
Merge default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 23 Mar 2022 12:54:45 +0100 |
parents | 7fc8df5157a7 |
children | 157a78959e5d |
line wrap: on
line diff
--- a/src/SbpOperators/boundaryops/boundary_restriction.jl Mon Mar 21 13:21:48 2022 +0100 +++ b/src/SbpOperators/boundaryops/boundary_restriction.jl Wed Mar 23 12:54:45 2022 +0100 @@ -1,10 +1,7 @@ -# TODO: The type parameter closure_stencil::Stencil is required since there isnt any suitable type -# for stencil_set. We should consider adding type ::StencilSet and dispatch on that instead. -# The same goes for other operators """ boundary_restriction(grid, closure_stencil::Stencil, boundary) -Creates boundary restriction operators `e` as `TensorMapping`s on `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`. @@ -13,7 +10,7 @@ See also: [`boundary_operator`](@ref). """ -function boundary_restriction(grid, closure_stencil::Stencil, boundary) +function boundary_restriction(grid, closure_stencil, boundary) converted_stencil = convert(Stencil{eltype(grid)}, closure_stencil) return SbpOperators.boundary_operator(grid, converted_stencil, boundary) end @@ -21,7 +18,6 @@ """ boundary_restriction(grid, stencil_set, boundary) -Creates a `boundary_restriction` operator on `grid` given a parsed TOML -`stencil_set`. +Creates a `boundary_restriction` operator on `grid` given a `stencil_set`. """ -boundary_restriction(grid, stencil_set, boundary) = boundary_restriction(grid, parse_stencil(stencil_set["e"]["closure"]), boundary) +boundary_restriction(grid, stencil_set::StencilSet, boundary) = boundary_restriction(grid, parse_stencil(stencil_set["e"]["closure"]), boundary)