comparison src/SbpOperators/boundaryops/boundary_restriction.jl @ 583:6db96ef13a29 feature/boundary_ops

Fix bug in boundary_restriction
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 02 Dec 2020 08:18:09 +0100
parents aa44edea36fc
children 0e1a95b35999
comparison
equal deleted inserted replaced
582:aa44edea36fc 583:6db96ef13a29
6 function boundary_restriction(grid::EquidistantGrid{D,T}, closureStencil::Stencil{T,M}, boundary::CartesianBoundary) where {D,T,M} 6 function boundary_restriction(grid::EquidistantGrid{D,T}, closureStencil::Stencil{T,M}, boundary::CartesianBoundary) where {D,T,M}
7 r = region(boundary) 7 r = region(boundary)
8 d = dim(boundary) 8 d = dim(boundary)
9 e = BoundaryRestriction(restrict(grid, d), closureStencil, r) 9 e = BoundaryRestriction(restrict(grid, d), closureStencil, r)
10 10
11 one_d_grids = restrict.(Ref(grid), tuple(1:D)) 11 one_d_grids = restrict.(Ref(grid), Tuple(1:D))
12
12 Is = IdentityMapping{T}.(size.(one_d_grids)) 13 Is = IdentityMapping{T}.(size.(one_d_grids))
13 parts = Base.setindex(Is, e, d) 14 parts = Base.setindex(Is, e, d)
14 return foldl(⊗, parts) 15 return foldl(⊗, parts)
15 end 16 end
16 17