annotate src/SbpOperators/boundaryops/normal_derivative.jl @ 637:4a81812150f4 feature/volume_and_boundary_operators

Change qudrature closure from tuple of reals to tuple of Stencils. Also remove parametrization of stencil width in D2 since this was illformed for the 2nd order case.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Sun, 03 Jan 2021 18:15:14 +0100
parents bfc893d03cbf
children 1accc3e051d0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
620
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
1 """
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
2 NormalDerivative(grid::EquidistantGrid, closure_stencil::Stencil, boundary::CartesianBoundary)
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
3 NormalDerivative(grid::EquidistantGrid{1}, closure_stencil::Stencil, region::Region)
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
4
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
5 Creates the normal derivative boundary operator `d` as a `TensorMapping`
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
6
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
7 `d` is the normal derivative of a grid function at the boundary specified by `boundary` or `region` using some `closure_stencil`.
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
8 `d'` is the prolongation of the normal derivative of a grid function to the whole grid using the same `closure_stencil`.
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
9 On a one-dimensional `grid`, `d` is a `BoundaryOperator`. On a multi-dimensional `grid`, `d` is the inflation of
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
10 a `BoundaryOperator`. Also see the documentation of `SbpOperators.boundary_operator(...)` for more details.
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
11 """
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
12 function NormalDerivative(grid::EquidistantGrid, closure_stencil::Stencil, boundary::CartesianBoundary)
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
13 direction = dim(boundary)
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
14 h_inv = inverse_spacing(grid)[direction]
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
15 return SbpOperators.boundary_operator(grid, scale(closure_stencil,h_inv), boundary)
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
16 end
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
17 NormalDerivative(grid::EquidistantGrid{1}, closure_stencil::Stencil, region::Region) = NormalDerivative(grid, closure_stencil, CartesianBoundary{1,typeof(region)}())
bfc893d03cbf Add NormalDerivative as a BoundaryOperator and reintroduce tests.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
18 export NormalDerivative