Mercurial > repos > public > sbplib_julia
comparison src/Grids/equidistant_grid.jl @ 1649:b02917bcd7d5 feature/grids/curvilinear
Merge default
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Wed, 26 Jun 2024 12:41:03 +0200 |
| parents | 9113f437431d b459082533f7 |
| children | 8250cf5a3ce9 51f0c5f895fb |
comparison
equal
deleted
inserted
replaced
| 1645:64452a678e7a | 1649:b02917bcd7d5 |
|---|---|
| 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 """ |
