comparison src/SbpOperators/volumeops/laplace/laplace.jl @ 651:67639b1c99ea

Merged feature/volume_and_boundary_operators
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Wed, 20 Jan 2021 17:52:55 +0100
parents d6edde60909b
children f3a0d1f7d842 1accc3e051d0
comparison
equal deleted inserted replaced
615:52749b687a67 651:67639b1c99ea
1 """
2 Laplace(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils)
3
4 Creates the Laplace operator operator `Δ` as a `TensorMapping`
5
6 `Δ` approximates the Laplace operator ∑d²/xᵢ² , i = 1,...,`Dim` on `grid`, using
7 the stencil `inner_stencil` in the interior and a set of stencils `closure_stencils`
8 for the points in the closure regions.
9
10 On a one-dimensional `grid`, `Δ` is a `SecondDerivative`. On a multi-dimensional `grid`, `Δ` is the sum of
11 multi-dimensional `SecondDerivative`s where the sum is carried out lazily.
12 """
13 function Laplace(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils) where Dim
14 Δ = SecondDerivative(grid, inner_stencil, closure_stencils, 1)
15 for d = 2:Dim
16 Δ += SecondDerivative(grid, inner_stencil, closure_stencils, d)
17 end
18 return Δ
19 end
20 export Laplace