changeset 623:914428a1fc61 feature/volume_and_boundary_operators

Add documentation
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Mon, 21 Dec 2020 23:11:09 +0100
parents f799678357df
children a85db383484f
files src/SbpOperators/volumeops/derivatives/secondderivative.jl
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/SbpOperators/volumeops/derivatives/secondderivative.jl	Wed Dec 16 16:47:17 2020 +0100
+++ b/src/SbpOperators/volumeops/derivatives/secondderivative.jl	Mon Dec 21 23:11:09 2020 +0100
@@ -1,3 +1,17 @@
+"""
+    SecondDerivative(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils, direction)
+    SecondDerivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils)
+
+Creates the second-derivative operator `D2` as a `TensorMapping`
+
+`D2` approximates the second-derivative d²/dξ² on `grid` along the coordinate dimension specified by
+`direction`, 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`, `D2` is a `VolumeOperator`. On a multi-dimensional `grid`, `D2` is the outer product of the
+one-dimensional operator with the `IdentityMapping`s in orthogonal coordinate dirrections.
+Also see the documentation of `SbpOperators.volume_operator(...)` for more details.
+"""
 function SecondDerivative(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils, direction) where Dim
     h_inv = inverse_spacing(grid)[direction]
     return SbpOperators.volume_operator(grid, scale(inner_stencil,h_inv^2), scale.(closure_stencils,h_inv^2), even, direction)