Mercurial > repos > public > sbplib_julia
annotate src/SbpOperators/boundaryops/boundary_restriction.jl @ 1085:d5a82a142d6a feature/scalar_times_tensor
Close branch before merge
| author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
|---|---|
| date | Sun, 08 May 2022 11:34:51 +0200 |
| parents | 7fc8df5157a7 |
| children | 157a78959e5d |
| rev | line source |
|---|---|
|
510
db64cfe4d9de
Start sketching on 1D boundary restriction operators.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff
changeset
|
1 """ |
|
925
6b47a9ee1632
Add functionality for creating operators from a stencil set. Note: Tests are not updated yet!
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
871
diff
changeset
|
2 boundary_restriction(grid, closure_stencil::Stencil, boundary) |
|
580
0779713f95a2
Add constructor that infers T and N
Jonatan Werpers <jonatan@werpers.com>
parents:
579
diff
changeset
|
3 |
| 995 | 4 Creates boundary restriction operators `e` as `LazyTensor`s on `boundary` |
|
510
db64cfe4d9de
Start sketching on 1D boundary restriction operators.
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
diff
changeset
|
5 |
|
925
6b47a9ee1632
Add functionality for creating operators from a stencil set. Note: Tests are not updated yet!
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
871
diff
changeset
|
6 `e` is the restriction of a grid function to `boundary` using a `Stencil` `closure_stencil`. |
|
936
22c80fb36400
Fix docs and add some references
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
925
diff
changeset
|
7 `e'` is the prolongation of a grid function on `boundary` to the whole grid using the same `closure_stencil`. |
|
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
|
8 On a one-dimensional `grid`, `e` is a `BoundaryOperator`. On a multi-dimensional `grid`, `e` is the inflation of |
| 947 | 9 a `BoundaryOperator`. |
| 10 | |
| 11 See also: [`boundary_operator`](@ref). | |
|
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
|
12 """ |
|
989
7bf3121c6864
Add type StencilSet
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
966
diff
changeset
|
13 function boundary_restriction(grid, closure_stencil, boundary) |
|
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
|
14 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
|
15 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
|
16 end |
|
925
6b47a9ee1632
Add functionality for creating operators from a stencil set. Note: Tests are not updated yet!
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
871
diff
changeset
|
17 |
|
6b47a9ee1632
Add functionality for creating operators from a stencil set. Note: Tests are not updated yet!
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
871
diff
changeset
|
18 """ |
|
6b47a9ee1632
Add functionality for creating operators from a stencil set. Note: Tests are not updated yet!
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
871
diff
changeset
|
19 boundary_restriction(grid, stencil_set, boundary) |
|
6b47a9ee1632
Add functionality for creating operators from a stencil set. Note: Tests are not updated yet!
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
871
diff
changeset
|
20 |
|
989
7bf3121c6864
Add type StencilSet
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
966
diff
changeset
|
21 Creates a `boundary_restriction` operator on `grid` given a `stencil_set`. |
|
925
6b47a9ee1632
Add functionality for creating operators from a stencil set. Note: Tests are not updated yet!
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
871
diff
changeset
|
22 """ |
|
989
7bf3121c6864
Add type StencilSet
Vidar Stiernström <vidar.stiernstrom@it.uu.se>
parents:
966
diff
changeset
|
23 boundary_restriction(grid, stencil_set::StencilSet, boundary) = boundary_restriction(grid, parse_stencil(stencil_set["e"]["closure"]), boundary) |
