Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/volumeops/volume_operator.jl @ 774:d8c0916853fc refactor/sbp_operators_method_signatures
Remove unneeded type parameter and rewirte documentation for volume_operator
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sat, 17 Jul 2021 10:23:59 +0200 |
parents | 86bb3606b215 |
children | b6c0963100cd |
comparison
equal
deleted
inserted
replaced
773:86bb3606b215 | 774:d8c0916853fc |
---|---|
1 """ | 1 """ |
2 volume_operator(grid,inner_stencil,closure_stencils,parity,direction) | 2 volume_operator(grid, inner_stencil, closure_stencils, parity, direction) |
3 | |
3 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 |
4 specified coordinate `direction`. The action of the operator is determined by the | 5 specified coordinate `direction`. The action of the operator is determined by |
5 stencils `inner_stencil` and `closure_stencils`. | 6 the stencils `inner_stencil` and `closure_stencils`. When `Dim=1`, the |
6 When `Dim=1`, the corresponding `VolumeOperator` tensor mapping is returned. | 7 corresponding `VolumeOperator` tensor mapping is returned. When `Dim>1`, the |
7 When `Dim>1`, the `VolumeOperator` `op` is inflated by the outer product | 8 returned operator is the appropriate outer product of a one-dimensional |
8 of `IdentityMappings` in orthogonal coordinate directions, e.g for `Dim=3`, | 9 operators and `IdentityMapping`s, e.g for `Dim=2`, `I⊗op⊗I`. |
9 the boundary restriction operator in the y-direction direction is `Ix⊗op⊗Iz`. | |
10 """ | 10 """ |
11 function volume_operator(grid::EquidistantGrid{Dim,T}, inner_stencil, closure_stencils, parity, direction) where {Dim,T,M} | 11 function volume_operator(grid::EquidistantGrid{Dim,T}, inner_stencil, closure_stencils, parity, direction) where {Dim,T} |
12 #TODO: Check that direction <= Dim? | 12 #TODO: Check that direction <= Dim? |
13 | 13 |
14 # Create 1D volume operator in along coordinate direction | 14 # Create 1D volume operator in along coordinate direction |
15 op = VolumeOperator(restrict(grid, direction), inner_stencil, closure_stencils, parity) | 15 op = VolumeOperator(restrict(grid, direction), inner_stencil, closure_stencils, parity) |
16 # Create 1D IdentityMappings for each coordinate direction | 16 # Create 1D IdentityMappings for each coordinate direction |