Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/volumeops/derivatives/secondderivative.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 | 914428a1fc61 |
children |
comparison
equal
deleted
inserted
replaced
674:621460cf8279 | 690:1accc3e051d0 |
---|---|
1 """ | 1 """ |
2 SecondDerivative(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils, direction) | 2 second_derivative(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils, direction) |
3 SecondDerivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) | 3 second_derivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) |
4 | 4 |
5 Creates the second-derivative operator `D2` as a `TensorMapping` | 5 Creates the second-derivative operator `D2` as a `TensorMapping` |
6 | 6 |
7 `D2` approximates the second-derivative d²/dξ² on `grid` along the coordinate dimension specified by | 7 `D2` approximates the second-derivative d²/dξ² on `grid` along the coordinate dimension specified by |
8 `direction`, using the stencil `inner_stencil` in the interior and a set of stencils `closure_stencils` | 8 `direction`, using the stencil `inner_stencil` in the interior and a set of stencils `closure_stencils` |
10 | 10 |
11 On a one-dimensional `grid`, `D2` is a `VolumeOperator`. On a multi-dimensional `grid`, `D2` is the outer product of the | 11 On a one-dimensional `grid`, `D2` is a `VolumeOperator`. On a multi-dimensional `grid`, `D2` is the outer product of the |
12 one-dimensional operator with the `IdentityMapping`s in orthogonal coordinate dirrections. | 12 one-dimensional operator with the `IdentityMapping`s in orthogonal coordinate dirrections. |
13 Also see the documentation of `SbpOperators.volume_operator(...)` for more details. | 13 Also see the documentation of `SbpOperators.volume_operator(...)` for more details. |
14 """ | 14 """ |
15 function SecondDerivative(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils, direction) where Dim | 15 function second_derivative(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils, direction) where Dim |
16 h_inv = inverse_spacing(grid)[direction] | 16 h_inv = inverse_spacing(grid)[direction] |
17 return SbpOperators.volume_operator(grid, scale(inner_stencil,h_inv^2), scale.(closure_stencils,h_inv^2), even, direction) | 17 return SbpOperators.volume_operator(grid, scale(inner_stencil,h_inv^2), scale.(closure_stencils,h_inv^2), even, direction) |
18 end | 18 end |
19 SecondDerivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) = SecondDerivative(grid,inner_stencil,closure_stencils,1) | 19 second_derivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) = second_derivative(grid,inner_stencil,closure_stencils,1) |
20 export SecondDerivative | 20 export second_derivative |