Mercurial > repos > public > sbplib_julia
comparison src/Grids/grid.jl @ 1466:de4e15924d26 feature/grids/boundary_indicies
Move def of boundary_indices, remove some new lines
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Wed, 29 Nov 2023 09:18:18 +0100 |
| parents | 455e6b4c8b02 |
| children | 07882e390ff5 |
comparison
equal
deleted
inserted
replaced
| 1465:88e738d807cb | 1466:de4e15924d26 |
|---|---|
| 72 """ | 72 """ |
| 73 function boundary_grid end | 73 function boundary_grid end |
| 74 # TBD: Can we implement a version here that accepts multiple ids and grouped boundaries? Maybe we need multiblock stuff? | 74 # TBD: Can we implement a version here that accepts multiple ids and grouped boundaries? Maybe we need multiblock stuff? |
| 75 | 75 |
| 76 """ | 76 """ |
| 77 boundary_indices(g::Grid, id::BoundaryIdentifier) | |
| 78 | |
| 79 A collection of indices corresponding to the boundary with given id. The | |
| 80 collection should be usable to index grid functions on the grid to obtain grid | |
| 81 functions on the boundary grid. | |
| 82 """ | |
| 83 function boundary_indices end | |
| 84 | |
| 85 """ | |
| 77 eval_on(g::Grid, f) | 86 eval_on(g::Grid, f) |
| 78 | 87 |
| 79 Lazy evaluation of `f` on the grid. `f` can either be on the form `f(x,y,...)` | 88 Lazy evaluation of `f` on the grid. `f` can either be on the form `f(x,y,...)` |
| 80 with each coordinate as an argument, or on the form `f(x̄)` taking a | 89 with each coordinate as an argument, or on the form `f(x̄)` taking a |
| 81 coordinate vector. | 90 coordinate vector. |
| 99 eval_on(g::Grid, f::Number) = return LazyTensors.LazyConstantArray(f, size(g)) | 108 eval_on(g::Grid, f::Number) = return LazyTensors.LazyConstantArray(f, size(g)) |
| 100 | 109 |
| 101 _ncomponents(::Type{<:Number}) = 1 | 110 _ncomponents(::Type{<:Number}) = 1 |
| 102 _ncomponents(T::Type{<:SVector}) = length(T) | 111 _ncomponents(T::Type{<:SVector}) = length(T) |
| 103 | 112 |
| 104 """ | |
| 105 boundary_indices(g::Grid, id::BoundaryIdentifier) | |
| 106 | 113 |
| 107 A collection of indices corresponding to the boundary with given id. The | |
| 108 collection should be usable to index grid functions on the grid to obtain grid | |
| 109 functions on the boundary grid. | |
| 110 """ | |
| 111 function boundary_indices end |
