comparison src/Grids/equidistant_grid.jl @ 1126:832ac87a54a3 feature/grids

Remove boundary_size
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Wed, 05 Oct 2022 21:25:12 +0200
parents c2d7e940639e
children dfbd62c7eb09
comparison
equal deleted inserted replaced
1125:b9c6b0d8f0fa 1126:832ac87a54a3
156 end 156 end
157 boundary_grid(::EquidistantGrid{1,T},::CartesianBoundary{1}) where T = EquidistantGrid{T}() 157 boundary_grid(::EquidistantGrid{1,T},::CartesianBoundary{1}) where T = EquidistantGrid{T}()
158 158
159 159
160 """ 160 """
161 boundary_size(grid::EquidistantGrid, id::CartesianBoundary)
162
163 Returns the size of the boundary of `grid` specified by `id`.
164 """
165 function boundary_size(grid::EquidistantGrid, id::CartesianBoundary)
166 orth_dims = orthogonal_dims(grid, dim(id))
167 return grid.size[orth_dims]
168 end
169 boundary_size(::EquidistantGrid{1,T},::CartesianBoundary{1}) where T = ()
170
171
172 """
173 refine(grid::EquidistantGrid, r::Int) 161 refine(grid::EquidistantGrid, r::Int)
174 162
175 Refines `grid` by a factor `r`. The factor is applied to the number of 163 Refines `grid` by a factor `r`. The factor is applied to the number of
176 intervals which is 1 less than the size of the grid. 164 intervals which is 1 less than the size of the grid.
177 165