diff src/SbpOperators/boundaryops/boundary_restriction.jl @ 1160:1e44375d8a67

Merge refactor/sbpoperators/inflation
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 29 Nov 2022 22:11:01 +0100
parents c0ab81e4c39c
children 1cc45207817e
line wrap: on
line diff
--- a/src/SbpOperators/boundaryops/boundary_restriction.jl	Fri Oct 21 21:41:43 2022 +0200
+++ b/src/SbpOperators/boundaryops/boundary_restriction.jl	Tue Nov 29 22:11:01 2022 +0100
@@ -8,11 +8,13 @@
 On a one-dimensional `grid`, `e` is a `BoundaryOperator`. On a multi-dimensional `grid`, `e` is the inflation of
 a `BoundaryOperator`.
 
-See also: [`boundary_operator`](@ref).
+See also: [`BoundaryOperator`](@ref), [`LazyTensors.inflate`](@ref).
 """
 function boundary_restriction(grid, closure_stencil, boundary)
     converted_stencil = convert(Stencil{eltype(grid)}, closure_stencil)
-    return SbpOperators.boundary_operator(grid, converted_stencil, boundary)
+
+    op = BoundaryOperator(restrict(grid, dim(boundary)), converted_stencil, region(boundary))
+    return LazyTensors.inflate(op, size(grid), dim(boundary))
 end
 
 """