Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/boundaryops/boundary_restriction.jl @ 2042:5fb64e42138c bugfix/zero_dim_grid_boundary_ops
Add implementation of boundary_restriction for ZeroDimGrid throwing an error
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Thu, 05 Feb 2026 22:22:25 +0100 |
| parents | 08f06bfacd5c |
| children |
comparison
equal
deleted
inserted
replaced
| 2041:07315bc72b31 | 2042:5fb64e42138c |
|---|---|
| 23 function boundary_restriction(g::EquidistantGrid, stencil_set::StencilSet, boundary) | 23 function boundary_restriction(g::EquidistantGrid, stencil_set::StencilSet, boundary) |
| 24 closure_stencil = parse_stencil(stencil_set["e"]["closure"]) | 24 closure_stencil = parse_stencil(stencil_set["e"]["closure"]) |
| 25 converted_stencil = convert(Stencil{eltype(g)}, closure_stencil) | 25 converted_stencil = convert(Stencil{eltype(g)}, closure_stencil) |
| 26 return BoundaryOperator(g, converted_stencil, boundary) | 26 return BoundaryOperator(g, converted_stencil, boundary) |
| 27 end | 27 end |
| 28 | |
| 29 boundary_restriction(::ZeroDimGrid, stencil_set::StencilSet, boundary) = throw(ArgumentError("ZeroDimGrid has no boundaries")) |
