Mercurial > repos > public > sbplib_julia
comparison src/Grids/mapped_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 | 1c58005429fd |
children | 81559cb7b11c |
comparison
equal
deleted
inserted
replaced
1841:1c58005429fd | 1842:f2b32da29b73 |
---|---|
116 return MappedGrid( | 116 return MappedGrid( |
117 lg, | 117 lg, |
118 map(x,lg), | 118 map(x,lg), |
119 map(J,lg), | 119 map(J,lg), |
120 ) | 120 ) |
121 end | |
122 | |
123 """ | |
124 mapped_grid(x, J, parameterspace, size) | |
125 | |
126 A `MappedGrid` with logical grid `lg`. Physical coordinates and Jacobian are | |
127 determined by the functions `x` and `J`. | |
128 """ | |
129 function mapped_grid(x, J, ps::ParameterSpace, size::Vararg{Int}) | |
130 lg = equidistant_grid(ps, size...) | |
131 return mapped_grid(lg, x, J) | |
121 end | 132 end |
122 | 133 |
123 """ | 134 """ |
124 metric_tensor(g::MappedGrid) | 135 metric_tensor(g::MappedGrid) |
125 | 136 |