Mercurial > repos > public > sbplib_julia
annotate src/SbpOperators/volumeops/derivatives/second_derivative.jl @ 947:38d1752a9aff feature/laplace_opset
Reformat "See also:"
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sun, 13 Mar 2022 21:01:09 +0100 |
parents | 22c80fb36400 |
children | 6a8d7fbf55fc |
rev | line source |
---|---|
623
914428a1fc61
Add documentation
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
619
diff
changeset
|
1 """ |
820
b4acd25943f4
Remove some more types and type parameters
Jonatan Werpers <jonatan@werpers.com>
parents:
776
diff
changeset
|
2 second_derivative(grid::EquidistantGrid, inner_stencil, closure_stencils, direction) |
623
914428a1fc61
Add documentation
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
619
diff
changeset
|
3 |
914428a1fc61
Add documentation
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
619
diff
changeset
|
4 Creates the second-derivative operator `D2` as a `TensorMapping` |
914428a1fc61
Add documentation
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
619
diff
changeset
|
5 |
914428a1fc61
Add documentation
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
619
diff
changeset
|
6 `D2` approximates the second-derivative d²/dξ² on `grid` along the coordinate dimension specified by |
914428a1fc61
Add documentation
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
619
diff
changeset
|
7 `direction`, using the stencil `inner_stencil` in the interior and a set of stencils `closure_stencils` |
914428a1fc61
Add documentation
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
619
diff
changeset
|
8 for the points in the closure regions. |
914428a1fc61
Add documentation
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
619
diff
changeset
|
9 |
914428a1fc61
Add documentation
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
619
diff
changeset
|
10 On a one-dimensional `grid`, `D2` is a `VolumeOperator`. On a multi-dimensional `grid`, `D2` is the outer product of the |
914428a1fc61
Add documentation
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
619
diff
changeset
|
11 one-dimensional operator with the `IdentityMapping`s in orthogonal coordinate dirrections. |
947 | 12 |
13 See also: [`volume_operator`](@ref). | |
623
914428a1fc61
Add documentation
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
619
diff
changeset
|
14 """ |
820
b4acd25943f4
Remove some more types and type parameters
Jonatan Werpers <jonatan@werpers.com>
parents:
776
diff
changeset
|
15 function second_derivative(grid::EquidistantGrid, inner_stencil, closure_stencils, direction) |
611
e71f2f81b5f8
NOT WORKING: Draft implementation of VolumeOperator and make SecondDerivative specialize it. Reformulate Laplace for the new SecondDerivative.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
548
diff
changeset
|
16 h_inv = inverse_spacing(grid)[direction] |
619
332f65c1abf3
Remove export of BoundaryOperator and VolumeOperator
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
618
diff
changeset
|
17 return SbpOperators.volume_operator(grid, scale(inner_stencil,h_inv^2), scale.(closure_stencils,h_inv^2), even, direction) |
356
0844069ab5ff
Reinclude SbpOperators and fix most of the code and tests there.
Jonatan Werpers <jonatan@werpers.com>
parents:
348
diff
changeset
|
18 end |
690
1accc3e051d0
Start changing the name of functions creating operators that are not types to lower case. E.g SecondDerivative->second_derivative
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
623
diff
changeset
|
19 second_derivative(grid::EquidistantGrid{1}, inner_stencil, closure_stencils) = second_derivative(grid,inner_stencil,closure_stencils,1) |