Mercurial > repos > public > sbplib_julia
changeset 695:fc755b29d418 refactor/operator_naming
Rename quadrature to inner_product
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Sun, 14 Feb 2021 13:47:34 +0100 |
parents | 6ab473e0ea80 |
children | 0bec3c4e78c0 |
files | src/SbpOperators/volumeops/quadratures/quadrature.jl |
diffstat | 1 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/SbpOperators/volumeops/quadratures/quadrature.jl Sat Feb 13 16:07:46 2021 +0100 +++ b/src/SbpOperators/volumeops/quadratures/quadrature.jl Sun Feb 14 13:47:34 2021 +0100 @@ -1,21 +1,21 @@ """ - quadrature(grid::EquidistantGrid, closure_stencils, inner_stencil) - quadrature(grid::EquidistantGrid, closure_stencils) + inner_product(grid::EquidistantGrid, closure_stencils, inner_stencil) -Creates the quadrature operator `H` as a `TensorMapping` +Creates the discrete inner product operator `H` as a `TensorMapping` on an equidistant +grid, defined as `(u,v) = u'Hv` for grid functions `u,v`. -`H` approximiates the integral operator on `grid` the using the stencil -`inner_stencil` in the interior and a set of stencils `closure_stencils` -for the points in the closure regions. If `inner_stencil` is omitted a central -interior stencil with weight 1 is used. +`inner_product(grid::EquidistantGrid, closure_stencils, inner_stencil)` creates +`H` on `grid` the using a set of stencils `closure_stencils` for the points in +the closure regions and the stencil and `inner_stencil` in the interior. If +`inner_stencil` is omitted a central interior stencil with weight 1 is used. -On a one-dimensional `grid`, `H` is a `VolumeOperator`. On a multi-dimensional -`grid`, `H` is the outer product of the 1-dimensional quadrature operators in +On a 1-dimensional `grid`, `H` is a `VolumeOperator`. On a N-dimensional +`grid`, `H` is the outer product of the 1-dimensional inner product operators in each coordinate direction. Also see the documentation of `SbpOperators.volume_operator(...)` for more details. On a 0-dimensional `grid`, `H` is a 0-dimensional `IdentityMapping`. """ -function quadrature(grid::EquidistantGrid, closure_stencils, inner_stencil = CenteredStencil(one(eltype(grid)))) +function inner_product(grid::EquidistantGrid, closure_stencils, inner_stencil = CenteredStencil(one(eltype(grid)))) h = spacing(grid) H = SbpOperators.volume_operator(grid, scale(inner_stencil,h[1]), scale.(closure_stencils,h[1]), even, 1) for i ∈ 2:dimension(grid) @@ -24,6 +24,6 @@ end return H end -export quadrature +export inner_product -quadrature(grid::EquidistantGrid{0}, closure_stencils, inner_stencil) = IdentityMapping{eltype(grid)}() +inner_product(grid::EquidistantGrid{0}, closure_stencils, inner_stencil) = IdentityMapping{eltype(grid)}()