Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/boundaryops/boundary_operator.jl @ 1073:5a3281429a48 feature/variable_derivatives
Merge feature/variable_derivatives
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 24 Mar 2022 12:35:14 +0100 |
parents | 3bb94ce74697 52f07c77299d |
children | 102ebdaf7c11 |
line wrap: on
line diff
--- a/src/SbpOperators/boundaryops/boundary_operator.jl Wed Mar 23 13:32:51 2022 +0100 +++ b/src/SbpOperators/boundaryops/boundary_operator.jl Thu Mar 24 12:35:14 2022 +0100 @@ -12,19 +12,14 @@ function boundary_operator(grid::EquidistantGrid, closure_stencil, boundary::CartesianBoundary) #TODO:Check that dim(boundary) <= Dim? - # Create 1D boundary operator - r = region(boundary) d = dim(boundary) - op = BoundaryOperator(restrict(grid, d), closure_stencil, r) + op = BoundaryOperator(restrict(grid, d), closure_stencil, region(boundary)) # Create 1D IdentityTensors for each coordinate direction one_d_grids = restrict.(Ref(grid), Tuple(1:dimension(grid))) Is = IdentityTensor{eltype(grid)}.(size.(one_d_grids)) - # Formulate the correct outer product sequence of the identity mappings and - # the boundary operator - parts = Base.setindex(Is, op, d) - return foldl(⊗, parts) + return LazyTensors.inflate(op, size(grid), d) end """