annotate src/SbpOperators/boundaryops/boundary_restriction.jl @ 827:beae513ef8b3 operator_storage_array_of_table

Fix bug in boundary_restriction when grids and stencil does not have matching type
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 12 Jan 2022 07:45:38 +0100
parents 5eb1edef8a7b
children 86776d06b883
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
510
db64cfe4d9de Start sketching on 1D boundary restriction operators.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
1 """
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: 619
diff changeset
2 boundary_restriction(grid::EquidistantGrid, closure_stencil::Stencil, boundary::CartesianBoundary)
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: 619
diff changeset
3 boundary_restriction(grid::EquidistantGrid{1}, closure_stencil::Stencil, region::Region)
580
0779713f95a2 Add constructor that infers T and N
Jonatan Werpers <jonatan@werpers.com>
parents: 579
diff changeset
4
610
e40e7439d1b4 Add a general boundary operator and make BoundaryRestriction a specialization of it.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents: 588
diff changeset
5 Creates the boundary restriction operator `e` as a `TensorMapping`
510
db64cfe4d9de Start sketching on 1D boundary restriction operators.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff changeset
6
610
e40e7439d1b4 Add a general boundary operator and make BoundaryRestriction a specialization of it.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents: 588
diff changeset
7 `e` is the restriction of a grid function to the boundary specified by `boundary` or `region` using some `closure_stencil`.
e40e7439d1b4 Add a general boundary operator and make BoundaryRestriction a specialization of it.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents: 588
diff changeset
8 `e'` is the prolongation of a grid function on the boundary to the whole grid using the same `closure_stencil`.
e40e7439d1b4 Add a general boundary operator and make BoundaryRestriction a specialization of it.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents: 588
diff changeset
9 On a one-dimensional `grid`, `e` is a `BoundaryOperator`. On a multi-dimensional `grid`, `e` is the inflation of
619
332f65c1abf3 Remove export of BoundaryOperator and VolumeOperator
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents: 610
diff changeset
10 a `BoundaryOperator`. Also see the documentation of `SbpOperators.boundary_operator(...)` for more details.
610
e40e7439d1b4 Add a general boundary operator and make BoundaryRestriction a specialization of it.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents: 588
diff changeset
11 """
827
beae513ef8b3 Fix bug in boundary_restriction when grids and stencil does not have matching type
Jonatan Werpers <jonatan@werpers.com>
parents: 777
diff changeset
12 function boundary_restriction(grid::EquidistantGrid, closure_stencil, boundary::CartesianBoundary)
beae513ef8b3 Fix bug in boundary_restriction when grids and stencil does not have matching type
Jonatan Werpers <jonatan@werpers.com>
parents: 777
diff changeset
13 converted_stencil = convert(Stencil{eltype(grid)}, closure_stencil)
beae513ef8b3 Fix bug in boundary_restriction when grids and stencil does not have matching type
Jonatan Werpers <jonatan@werpers.com>
parents: 777
diff changeset
14 return SbpOperators.boundary_operator(grid, converted_stencil, boundary)
beae513ef8b3 Fix bug in boundary_restriction when grids and stencil does not have matching type
Jonatan Werpers <jonatan@werpers.com>
parents: 777
diff changeset
15 end
777
5eb1edef8a7b Remove some more unneded types
Jonatan Werpers <jonatan@werpers.com>
parents: 690
diff changeset
16 boundary_restriction(grid::EquidistantGrid{1}, closure_stencil, region::Region) = boundary_restriction(grid, closure_stencil, CartesianBoundary{1,typeof(region)}())
513
547639572208 Get some kind of tested working implementation.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents: 512
diff changeset
17
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: 619
diff changeset
18 export boundary_restriction