Mercurial > repos > public > sbplib_julia
comparison src/Grids/equidistant_grid.jl @ 1842:f2b32da29b73 feature/grids/manifolds
Introduce mapped_grid for ParameterSpace and simplify implementation of equidistant_grid(::Chart)
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Tue, 22 Oct 2024 15:32:33 +0200 |
| parents | 2a8a2b52a112 |
| children | 81559cb7b11c |
comparison
equal
deleted
inserted
replaced
| 1841:1c58005429fd | 1842:f2b32da29b73 |
|---|---|
| 153 | 153 |
| 154 equidistant_grid(d::Interval, size::Int) = equidistant_grid(limits(d)..., size) | 154 equidistant_grid(d::Interval, size::Int) = equidistant_grid(limits(d)..., size) |
| 155 equidistant_grid(hb::HyperBox, dims::Vararg{Int}) = equidistant_grid(limits(hb)..., dims...) | 155 equidistant_grid(hb::HyperBox, dims::Vararg{Int}) = equidistant_grid(limits(hb)..., dims...) |
| 156 | 156 |
| 157 function equidistant_grid(c::Chart, dims::Vararg{Int}) | 157 function equidistant_grid(c::Chart, dims::Vararg{Int}) |
| 158 lg = equidistant_grid(parameterspace(c), dims...) | 158 mapped_grid(c, ξ->jacobian(c,ξ), parameterspace(c), dims...) |
| 159 return MappedGrid( | |
| 160 lg, | |
| 161 map(c,lg), | |
| 162 map(ξ->jacobian(c, ξ), lg), | |
| 163 ) | |
| 164 end | 159 end |
| 165 | 160 |
| 166 | 161 |
| 167 CartesianBoundary{D,BID} = TensorGridBoundary{D,BID} # TBD: What should we do about the naming of this boundary? | 162 CartesianBoundary{D,BID} = TensorGridBoundary{D,BID} # TBD: What should we do about the naming of this boundary? |
| 168 | 163 |
