Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/volumeops/volume_operator.jl @ 1023:52f07c77299d refactor/sbpoperators/inflation
Merge refactor/lazy_tensors
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 21 Mar 2022 09:51:07 +0100 |
parents | bbbc31953367 1ba8a398af9c |
children | 14cb97284373 05a25a5063bb |
comparison
equal
deleted
inserted
replaced
1022:bbbc31953367 | 1023:52f07c77299d |
---|---|
4 Creates a volume operator on a `Dim`-dimensional grid acting along the | 4 Creates a volume operator on a `Dim`-dimensional grid acting along the |
5 specified coordinate `direction`. The action of the operator is determined by | 5 specified coordinate `direction`. The action of the operator is determined by |
6 the stencils `inner_stencil` and `closure_stencils`. When `Dim=1`, the | 6 the stencils `inner_stencil` and `closure_stencils`. When `Dim=1`, the |
7 corresponding `VolumeOperator` tensor mapping is returned. When `Dim>1`, the | 7 corresponding `VolumeOperator` tensor mapping is returned. When `Dim>1`, the |
8 returned operator is the appropriate outer product of a one-dimensional | 8 returned operator is the appropriate outer product of a one-dimensional |
9 operators and `IdentityMapping`s, e.g for `Dim=3` the volume operator in the | 9 operators and `IdentityTensor`s, e.g for `Dim=3` the volume operator in the |
10 y-direction is `I⊗op⊗I`. | 10 y-direction is `I⊗op⊗I`. |
11 """ | 11 """ |
12 function volume_operator(grid::EquidistantGrid, inner_stencil, closure_stencils, parity, direction) | 12 function volume_operator(grid::EquidistantGrid, inner_stencil, closure_stencils, parity, direction) |
13 #TODO: Check that direction <= Dim? | 13 #TODO: Check that direction <= Dim? |
14 | 14 |
19 | 19 |
20 """ | 20 """ |
21 VolumeOperator{T,N,M,K} <: TensorOperator{T,1} | 21 VolumeOperator{T,N,M,K} <: TensorOperator{T,1} |
22 Implements a one-dimensional constant coefficients volume operator | 22 Implements a one-dimensional constant coefficients volume operator |
23 """ | 23 """ |
24 struct VolumeOperator{T,N,M,K} <: TensorMapping{T,1,1} | 24 struct VolumeOperator{T,N,M,K} <: LazyTensor{T,1,1} |
25 inner_stencil::Stencil{T,N} | 25 inner_stencil::Stencil{T,N} |
26 closure_stencils::NTuple{M,Stencil{T,K}} | 26 closure_stencils::NTuple{M,Stencil{T,K}} |
27 size::NTuple{1,Int} | 27 size::NTuple{1,Int} |
28 parity::Parity | 28 parity::Parity |
29 end | 29 end |