Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/volumeops/derivatives/secondderivative.jl @ 618:c64793f77509 feature/volume_and_boundary_operators
Move Laplace and SecondDerivative into the volumeops directory
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Mon, 07 Dec 2020 12:16:09 +0100 |
parents | src/SbpOperators/laplace/secondderivative.jl@1db945cba3a2 |
children | 332f65c1abf3 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/SbpOperators/volumeops/derivatives/secondderivative.jl Mon Dec 07 12:16:09 2020 +0100 @@ -0,0 +1,6 @@ +function SecondDerivative(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils, direction) where Dim + h_inv = inverse_spacing(grid)[direction] + return volume_operator(grid, scale(inner_stencil,h_inv^2), scale.(closure_stencils,h_inv^2), even, direction) +end +SecondDerivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) = SecondDerivative(grid,inner_stencil,closure_stencils,1) +export SecondDerivative