Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/boundaryops/boundary_operator.jl @ 1114:fc57804c9bf4 feature/grids
Add function dims
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 15 Jul 2022 09:38:08 +0200 |
parents | 1ba8a398af9c |
children | 5ddf5ae48391 |
comparison
equal
deleted
inserted
replaced
1113:4e4c5011140d | 1114:fc57804c9bf4 |
---|---|
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) |