Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/volumeops/laplace/laplace.jl @ 690:1accc3e051d0 refactor/operator_naming
Start changing the name of functions creating operators that are not types to lower case. E.g SecondDerivative->second_derivative
| author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
|---|---|
| date | Fri, 12 Feb 2021 16:16:45 +0100 |
| parents | d6edde60909b |
| children | 3cd582257072 b4acd25943f4 |
comparison
equal
deleted
inserted
replaced
| 674:621460cf8279 | 690:1accc3e051d0 |
|---|---|
| 1 """ | 1 """ |
| 2 Laplace(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils) | 2 laplace(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils) |
| 3 | 3 |
| 4 Creates the Laplace operator operator `Δ` as a `TensorMapping` | 4 Creates the Laplace operator operator `Δ` as a `TensorMapping` |
| 5 | 5 |
| 6 `Δ` approximates the Laplace operator ∑d²/xᵢ² , i = 1,...,`Dim` on `grid`, using | 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` | 7 the stencil `inner_stencil` in the interior and a set of stencils `closure_stencils` |
| 8 for the points in the closure regions. | 8 for the points in the closure regions. |
| 9 | 9 |
| 10 On a one-dimensional `grid`, `Δ` is a `SecondDerivative`. On a multi-dimensional `grid`, `Δ` is the sum of | 10 On a one-dimensional `grid`, `Δ` is equivalent to `second_derivative`. On a |
| 11 multi-dimensional `SecondDerivative`s where the sum is carried out lazily. | 11 multi-dimensional `grid`, `Δ` is the sum of multi-dimensional `second_derivative`s |
| 12 where the sum is carried out lazily. | |
| 12 """ | 13 """ |
| 13 function Laplace(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils) where Dim | 14 function laplace(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils) where Dim |
| 14 Δ = SecondDerivative(grid, inner_stencil, closure_stencils, 1) | 15 Δ = second_derivative(grid, inner_stencil, closure_stencils, 1) |
| 15 for d = 2:Dim | 16 for d = 2:Dim |
| 16 Δ += SecondDerivative(grid, inner_stencil, closure_stencils, d) | 17 Δ += second_derivative(grid, inner_stencil, closure_stencils, d) |
| 17 end | 18 end |
| 18 return Δ | 19 return Δ |
| 19 end | 20 end |
| 20 export Laplace | 21 export laplace |
