Mercurial > repos > public > sbplib_julia
comparison src/Grids/grid.jl @ 1461:455e6b4c8b02 feature/grids/boundary_indicies
Add a function declaration for boundary_indices
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Tue, 28 Nov 2023 08:42:00 +0100 |
| parents | 2ad518182b37 |
| children | de4e15924d26 |
comparison
equal
deleted
inserted
replaced
| 1443:f217c6167952 | 1461:455e6b4c8b02 |
|---|---|
| 98 """ | 98 """ |
| 99 eval_on(g::Grid, f::Number) = return LazyTensors.LazyConstantArray(f, size(g)) | 99 eval_on(g::Grid, f::Number) = return LazyTensors.LazyConstantArray(f, size(g)) |
| 100 | 100 |
| 101 _ncomponents(::Type{<:Number}) = 1 | 101 _ncomponents(::Type{<:Number}) = 1 |
| 102 _ncomponents(T::Type{<:SVector}) = length(T) | 102 _ncomponents(T::Type{<:SVector}) = length(T) |
| 103 | |
| 104 """ | |
| 105 boundary_indices(g::Grid, id::BoundaryIdentifier) | |
| 106 | |
| 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 |
