Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/boundaryops/boundary_operator.jl @ 1143:9275d95e2d90 refactor/grids
Merge with default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 19 Oct 2022 22:36:02 +0200 |
parents | fc57804c9bf4 |
children | 5ddf5ae48391 |
comparison
equal
deleted
inserted
replaced
1092:c4ea28d904f5 | 1143:9275d95e2d90 |
---|---|
16 r = region(boundary) | 16 r = region(boundary) |
17 d = dim(boundary) | 17 d = dim(boundary) |
18 op = BoundaryOperator(restrict(grid, d), closure_stencil, r) | 18 op = BoundaryOperator(restrict(grid, d), closure_stencil, r) |
19 | 19 |
20 # Create 1D IdentityTensors for each coordinate direction | 20 # Create 1D IdentityTensors for each coordinate direction |
21 one_d_grids = restrict.(Ref(grid), Tuple(1:dimension(grid))) | 21 one_d_grids = restrict.(Ref(grid), Tuple(dims(grid))) |
22 Is = IdentityTensor{eltype(grid)}.(size.(one_d_grids)) | 22 Is = IdentityTensor{eltype(grid)}.(size.(one_d_grids)) |
23 | 23 |
24 # Formulate the correct outer product sequence of the identity mappings and | 24 # Formulate the correct outer product sequence of the identity mappings and |
25 # the boundary operator | 25 # the boundary operator |
26 parts = Base.setindex(Is, op, d) | 26 parts = Base.setindex(Is, op, d) |