Mercurial > repos > public > sbplib_julia
diff src/SbpOperators/volumeops/derivatives/secondderivative.jl @ 701:38f9894279cd
Merging branch refactor/operator_naming
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Mon, 15 Feb 2021 11:13:12 +0100 |
parents | 1accc3e051d0 |
children |
line wrap: on
line diff
--- a/src/SbpOperators/volumeops/derivatives/secondderivative.jl Sat Feb 13 16:05:02 2021 +0100 +++ b/src/SbpOperators/volumeops/derivatives/secondderivative.jl Mon Feb 15 11:13:12 2021 +0100 @@ -1,6 +1,6 @@ """ - SecondDerivative(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils, direction) - SecondDerivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) + second_derivative(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils, direction) + second_derivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) Creates the second-derivative operator `D2` as a `TensorMapping` @@ -12,9 +12,9 @@ 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 +function second_derivative(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) end -SecondDerivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) = SecondDerivative(grid,inner_stencil,closure_stencils,1) -export SecondDerivative +second_derivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) = second_derivative(grid,inner_stencil,closure_stencils,1) +export second_derivative