comparison src/SbpOperators/volumeops/volume_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
13 #TODO: Check that direction <= Dim? 13 #TODO: Check that direction <= Dim?
14 14
15 # Create 1D volume operator in along coordinate direction 15 # Create 1D volume operator in along coordinate direction
16 op = VolumeOperator(restrict(grid, direction), inner_stencil, closure_stencils, parity) 16 op = VolumeOperator(restrict(grid, direction), inner_stencil, closure_stencils, parity)
17 # Create 1D IdentityTensors for each coordinate direction 17 # Create 1D IdentityTensors for each coordinate direction
18 one_d_grids = restrict.(Ref(grid), Tuple(1:dimension(grid))) 18 one_d_grids = restrict.(Ref(grid), Tuple(dims(grid)))
19 Is = IdentityTensor{eltype(grid)}.(size.(one_d_grids)) 19 Is = IdentityTensor{eltype(grid)}.(size.(one_d_grids))
20 # Formulate the correct outer product sequence of the identity mappings and 20 # Formulate the correct outer product sequence of the identity mappings and
21 # the volume operator 21 # the volume operator
22 parts = Base.setindex(Is, op, direction) 22 parts = Base.setindex(Is, op, direction)
23 return foldl(⊗, parts) 23 return foldl(⊗, parts)