Mercurial > repos > public > sbplib_julia
comparison Grids/src/EquidistantGrid.jl @ 241:1128ab4f5758 boundary_conditions
Add size method to EquidistantGrid
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Wed, 26 Jun 2019 20:23:23 +0200 |
| parents | 235f0a771c8f |
| children | d8f42733f392 |
comparison
equal
deleted
inserted
replaced
| 240:6bce42abf43d | 241:1128ab4f5758 |
|---|---|
| 22 end | 22 end |
| 23 | 23 |
| 24 function Base.eachindex(grid::EquidistantGrid) | 24 function Base.eachindex(grid::EquidistantGrid) |
| 25 CartesianIndices(grid.size) | 25 CartesianIndices(grid.size) |
| 26 end | 26 end |
| 27 | |
| 28 Base.size(g::EquidistantGrid) = g.size | |
| 27 | 29 |
| 28 # Returns the number of dimensions of an EquidistantGrid. | 30 # Returns the number of dimensions of an EquidistantGrid. |
| 29 # | 31 # |
| 30 # @Input: grid - an EquidistantGrid | 32 # @Input: grid - an EquidistantGrid |
| 31 # @Return: dimension - The dimension of the grid | 33 # @Return: dimension - The dimension of the grid |
