view src/SbpOperators/volumeops/laplace/laplace.jl @ 681:43cf58c69f91 feature/boundary_quads

Remove methods boundary_quadrature, and instead specialize quadrature on a zero-dimensional grid to return the IdentityMapping
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Mon, 08 Feb 2021 18:44:44 +0100
parents d6edde60909b
children f3a0d1f7d842 1accc3e051d0
line wrap: on
line source

"""
    Laplace(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils)

Creates the Laplace operator operator `Δ` as a `TensorMapping`

`Δ` approximates the Laplace operator ∑d²/xᵢ² , i = 1,...,`Dim` on `grid`, using
the stencil `inner_stencil` in the interior and a set of stencils `closure_stencils`
for the points in the closure regions.

On a one-dimensional `grid`, `Δ` is a `SecondDerivative`. On a multi-dimensional `grid`, `Δ` is the sum of
multi-dimensional `SecondDerivative`s where the sum is carried out lazily.
"""
function Laplace(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils) where Dim
    Δ = SecondDerivative(grid, inner_stencil, closure_stencils, 1)
    for d = 2:Dim
        Δ += SecondDerivative(grid, inner_stencil, closure_stencils, d)
    end
    return Δ
end
export Laplace