Mercurial > repos > public > sbplib_julia
comparison src/Grids/equidistant_grid.jl @ 1650:8250cf5a3ce9 feature/grids/manifolds
Merge feature/grids/curvilinear
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Wed, 26 Jun 2024 12:42:28 +0200 |
| parents | e213bd857f3f b02917bcd7d5 |
| children | 13a7a4ff49e3 |
comparison
equal
deleted
inserted
replaced
| 1644:e213bd857f3f | 1650:8250cf5a3ce9 |
|---|---|
| 105 completely integer grid, `equidistant_grid` will still return a floating point | 105 completely integer grid, `equidistant_grid` will still return a floating point |
| 106 grid. This simplifies the implementation and avoids certain surprise | 106 grid. This simplifies the implementation and avoids certain surprise |
| 107 behaviors. | 107 behaviors. |
| 108 """ | 108 """ |
| 109 function equidistant_grid(limit_lower, limit_upper, dims::Vararg{Int}) | 109 function equidistant_grid(limit_lower, limit_upper, dims::Vararg{Int}) |
| 110 if !(length(limit_lower) == length(limit_upper) == length(dims)) | |
| 111 throw(ArgumentError("All arguments must be of the same length")) | |
| 112 end | |
| 110 gs = map(equidistant_grid, limit_lower, limit_upper, dims) | 113 gs = map(equidistant_grid, limit_lower, limit_upper, dims) |
| 111 return TensorGrid(gs...) | 114 return TensorGrid(gs...) |
| 112 end | 115 end |
| 113 | 116 |
| 114 """ | 117 """ |
