Mercurial > repos > public > sbplib_julia
comparison src/SbpOperators/volumeops/derivatives/second_derivative.jl @ 820:b4acd25943f4 refactor/sbp_operators_method_signatures
Remove some more types and type parameters
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 13 Jan 2022 08:27:36 +0100 |
parents | 6fb556b02f7c |
children | 6b47a9ee1632 |
comparison
equal
deleted
inserted
replaced
819:f378cc64bafd | 820:b4acd25943f4 |
---|---|
1 """ | 1 """ |
2 second_derivative(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils, direction) | 2 second_derivative(grid::EquidistantGrid, inner_stencil, closure_stencils, direction) |
3 second_derivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) | |
4 | 3 |
5 Creates the second-derivative operator `D2` as a `TensorMapping` | 4 Creates the second-derivative operator `D2` as a `TensorMapping` |
6 | 5 |
7 `D2` approximates the second-derivative d²/dξ² on `grid` along the coordinate dimension specified by | 6 `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` | 7 `direction`, using the stencil `inner_stencil` in the interior and a set of stencils `closure_stencils` |
10 | 9 |
11 On a one-dimensional `grid`, `D2` is a `VolumeOperator`. On a multi-dimensional `grid`, `D2` is the outer product of the | 10 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. | 11 one-dimensional operator with the `IdentityMapping`s in orthogonal coordinate dirrections. |
13 Also see the documentation of `SbpOperators.volume_operator(...)` for more details. | 12 Also see the documentation of `SbpOperators.volume_operator(...)` for more details. |
14 """ | 13 """ |
15 function second_derivative(grid::EquidistantGrid{Dim}, inner_stencil, closure_stencils, direction) where Dim | 14 function second_derivative(grid::EquidistantGrid, inner_stencil, closure_stencils, direction) |
16 h_inv = inverse_spacing(grid)[direction] | 15 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) | 16 return SbpOperators.volume_operator(grid, scale(inner_stencil,h_inv^2), scale.(closure_stencils,h_inv^2), even, direction) |
18 end | 17 end |
19 second_derivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) = second_derivative(grid,inner_stencil,closure_stencils,1) | 18 second_derivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) = second_derivative(grid,inner_stencil,closure_stencils,1) |
20 export second_derivative | 19 export second_derivative |