Mercurial > repos > public > sbplib_julia
comparison src/Grids/tensor_grid.jl @ 1828:8adecef380b4 refactor/grids/iterable_boundary_indices
Add some todos
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Tue, 17 Sep 2024 11:20:00 +0200 |
| parents | ab397590898e |
| children | 871f3f1decea |
comparison
equal
deleted
inserted
replaced
| 1827:ab397590898e | 1828:8adecef380b4 |
|---|---|
| 95 | 95 |
| 96 b_ind = Base.setindex(all_indices, local_b_ind, grid_id(id)) | 96 b_ind = Base.setindex(all_indices, local_b_ind, grid_id(id)) |
| 97 | 97 |
| 98 return view(_combine_indices(all_indices...), LazyTensors.concatenate_tuples(bla.(b_ind)...)...) | 98 return view(_combine_indices(all_indices...), LazyTensors.concatenate_tuples(bla.(b_ind)...)...) |
| 99 end | 99 end |
| 100 # TODO: There must be a way to make the above code cleaner? | |
| 100 | 101 |
| 101 # function _combine_indices(Is::Vararg{Union{Int, <:AbstractRange}}) | 102 # function _combine_indices(Is::Vararg{Union{Int, <:AbstractRange}}) |
| 102 function _combine_indices(Is...) | 103 function _combine_indices(Is...) |
| 103 return CartesianIndices(LazyTensors.concatenate_tuples(bla.(Is)...)) | 104 return CartesianIndices(LazyTensors.concatenate_tuples(bla.(Is)...)) |
| 104 end | 105 end |
