Mercurial > repos > public > sbplib_julia
comparison src/Grids/EquidistantGrid.jl @ 765:fdd48f6ace1c operator_storage_array_of_table
Merge in default
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sun, 07 Feb 2021 21:32:21 +0100 |
parents | f0ceddeae993 |
children | 1d3e29ffc6c6 |
comparison
equal
deleted
inserted
replaced
764:d34b515b0ae7 | 765:fdd48f6ace1c |
---|---|
44 """ | 44 """ |
45 dimension(grid::EquidistantGrid) | 45 dimension(grid::EquidistantGrid) |
46 | 46 |
47 The dimension of the grid. | 47 The dimension of the grid. |
48 """ | 48 """ |
49 function dimension(grid::EquidistantGrid) | 49 dimension(grid::EquidistantGrid{Dim}) where Dim = Dim |
50 return length(grid.size) | |
51 end | |
52 | |
53 | 50 |
54 """ | 51 """ |
55 spacing(grid::EquidistantGrid) | 52 spacing(grid::EquidistantGrid) |
56 | 53 |
57 The spacing between the grid points of the grid. | 54 The spacing between the grid points of the grid. |
93 limit_upper = grid.limit_upper[dim] | 90 limit_upper = grid.limit_upper[dim] |
94 | 91 |
95 return EquidistantGrid(size, limit_lower, limit_upper) | 92 return EquidistantGrid(size, limit_lower, limit_upper) |
96 end | 93 end |
97 export restrict | 94 export restrict |
95 | |
96 """ | |
97 boundary_identifiers(::EquidistantGrid) | |
98 | |
99 Returns a tuple containing the boundary identifiers for the grid, stored as | |
100 (CartesianBoundary(1,Lower), | |
101 CartesianBoundary(1,Upper), | |
102 CartesianBoundary(2,Lower), | |
103 ...) | |
104 """ | |
105 boundary_identifiers(g::EquidistantGrid) = (((ntuple(i->(CartesianBoundary{i,Lower}(),CartesianBoundary{i,Upper}()),dimension(g)))...)...,) | |
106 export boundary_identifiers |