Mercurial > repos > public > sbplib_julia
annotate src/SbpOperators/volumeops/laplace/laplace.jl @ 648:d6edde60909b feature/volume_and_boundary_operators
Fix typo in documentation and remove obsolete out-commented code.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 08 Jan 2021 16:05:53 +0100 |
parents | a85db383484f |
children | f3a0d1f7d842 1accc3e051d0 |
rev | line source |
---|---|
624
a85db383484f
Update documentation and remove some out-commented lines
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
618
diff
changeset
|
1 """ |
a85db383484f
Update documentation and remove some out-commented lines
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
618
diff
changeset
|
2 Laplace(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils) |
a85db383484f
Update documentation and remove some out-commented lines
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
618
diff
changeset
|
3 |
648
d6edde60909b
Fix typo in documentation and remove obsolete out-commented code.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
624
diff
changeset
|
4 Creates the Laplace operator operator `Δ` as a `TensorMapping` |
624
a85db383484f
Update documentation and remove some out-commented lines
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
618
diff
changeset
|
5 |
a85db383484f
Update documentation and remove some out-commented lines
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
618
diff
changeset
|
6 `Δ` approximates the Laplace operator ∑d²/xᵢ² , i = 1,...,`Dim` on `grid`, using |
a85db383484f
Update documentation and remove some out-commented lines
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
618
diff
changeset
|
7 the stencil `inner_stencil` in the interior and a set of stencils `closure_stencils` |
a85db383484f
Update documentation and remove some out-commented lines
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
618
diff
changeset
|
8 for the points in the closure regions. |
a85db383484f
Update documentation and remove some out-commented lines
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
618
diff
changeset
|
9 |
a85db383484f
Update documentation and remove some out-commented lines
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
618
diff
changeset
|
10 On a one-dimensional `grid`, `Δ` is a `SecondDerivative`. On a multi-dimensional `grid`, `Δ` is the sum of |
a85db383484f
Update documentation and remove some out-commented lines
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
618
diff
changeset
|
11 multi-dimensional `SecondDerivative`s where the sum is carried out lazily. |
a85db383484f
Update documentation and remove some out-commented lines
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
618
diff
changeset
|
12 """ |
616
d9324671b412
Use julian naming conventions
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
611
diff
changeset
|
13 function Laplace(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils) where Dim |
d9324671b412
Use julian naming conventions
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
611
diff
changeset
|
14 Δ = SecondDerivative(grid, inner_stencil, closure_stencils, 1) |
611
e71f2f81b5f8
NOT WORKING: Draft implementation of VolumeOperator and make SecondDerivative specialize it. Reformulate Laplace for the new SecondDerivative.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
542
diff
changeset
|
15 for d = 2:Dim |
616
d9324671b412
Use julian naming conventions
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
611
diff
changeset
|
16 Δ += SecondDerivative(grid, inner_stencil, closure_stencils, d) |
356
0844069ab5ff
Reinclude SbpOperators and fix most of the code and tests there.
Jonatan Werpers <jonatan@werpers.com>
parents:
333
diff
changeset
|
17 end |
611
e71f2f81b5f8
NOT WORKING: Draft implementation of VolumeOperator and make SecondDerivative specialize it. Reformulate Laplace for the new SecondDerivative.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
542
diff
changeset
|
18 return Δ |
356
0844069ab5ff
Reinclude SbpOperators and fix most of the code and tests there.
Jonatan Werpers <jonatan@werpers.com>
parents:
333
diff
changeset
|
19 end |
611
e71f2f81b5f8
NOT WORKING: Draft implementation of VolumeOperator and make SecondDerivative specialize it. Reformulate Laplace for the new SecondDerivative.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
542
diff
changeset
|
20 export Laplace |