Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/boundaryops/boundary_restriction.jl @ 563:212e266043dd feature/boundary_ops
Fix region(CartesianBoundary) not returning an instance.
| author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
|---|---|
| date | Mon, 30 Nov 2020 18:34:48 +0100 |
| parents | 8f7919a9b398 |
| children | ccb41095def6 |
comparison
equal
deleted
inserted
replaced
| 562:8f7919a9b398 | 563:212e266043dd |
|---|---|
| 2 boundary_restriction(grid,closureStencil,boundary) | 2 boundary_restriction(grid,closureStencil,boundary) |
| 3 | 3 |
| 4 Creates a BoundaryRestriction operator for the specified boundary | 4 Creates a BoundaryRestriction operator for the specified boundary |
| 5 """ | 5 """ |
| 6 function boundary_restriction(grid::EquidistantGrid{1,T}, closureStencil::Stencil{T,M}, boundary::CartesianBoundary{1}) where {T,M} | 6 function boundary_restriction(grid::EquidistantGrid{1,T}, closureStencil::Stencil{T,M}, boundary::CartesianBoundary{1}) where {T,M} |
| 7 r = region(boundary) | 7 return e = BoundaryRestriction(grid, closureStencil, region(boundary)) |
| 8 return e = BoundaryRestriction(grid, closureStencil, r()) | |
| 9 end | 8 end |
| 10 | 9 |
| 11 function boundary_restriction(grid::EquidistantGrid{2,T}, closureStencil::Stencil{T,M}, boundary::CartesianBoundary{1}) where {T,M} | 10 function boundary_restriction(grid::EquidistantGrid{2,T}, closureStencil::Stencil{T,M}, boundary::CartesianBoundary{1}) where {T,M} |
| 12 r = region(boundary) | 11 e = BoundaryRestriction(restrict(grid, 1), closureStencil, region(boundary)) |
| 13 e = BoundaryRestriction(restrict(grid, 1), closureStencil, r()) | |
| 14 I = IdentityMapping{T}(size(restrict(grid,2))) | 12 I = IdentityMapping{T}(size(restrict(grid,2))) |
| 15 return e⊗I | 13 return e⊗I |
| 16 end | 14 end |
| 17 | 15 |
| 18 function boundary_restriction(grid::EquidistantGrid{2,T}, closureStencil::Stencil{T,M}, boundary::CartesianBoundary{2}) where {T,M} | 16 function boundary_restriction(grid::EquidistantGrid{2,T}, closureStencil::Stencil{T,M}, boundary::CartesianBoundary{2}) where {T,M} |
| 19 r = region(boundary) | 17 e = BoundaryRestriction(restrict(grid, 2), closureStencil, region(boundary)) |
| 20 e = BoundaryRestriction(restrict(grid, 2), closureStencil, r()) | |
| 21 I = IdentityMapping{T}(size(restrict(grid,1))) | 18 I = IdentityMapping{T}(size(restrict(grid,1))) |
| 22 return I⊗e | 19 return I⊗e |
| 23 end | 20 end |
| 24 export boundary_restriction | 21 export boundary_restriction |
| 25 | 22 |
