Mercurial > repos > public > sbplib_julia
comparison src/Grids/mapped_grid.jl @ 1902:f93ba5832146 feature/grids/parameter_spaces
Copy changes related to ParameterSpace from feature/grids/manifolds
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sat, 01 Feb 2025 22:12:53 +0100 |
parents | 516eaabf1169 |
children | 04c251bccbd4 dcbe8119fb0a |
comparison
equal
deleted
inserted
replaced
1900:418566cdd689 | 1902:f93ba5832146 |
---|---|
92 ) | 92 ) |
93 end | 93 end |
94 | 94 |
95 # TODO: Make sure all methods of `mapped_grid` are implemented correctly and tested. | 95 # TODO: Make sure all methods of `mapped_grid` are implemented correctly and tested. |
96 """ | 96 """ |
97 mapped_grid(x, J, size::Vararg{Int}) | 97 mapped_grid(x, J, size...) |
98 | 98 |
99 A `MappedGrid` with a default logical grid on the D-dimensional unit hyper | 99 A `MappedGrid` with a default logical grid on the D-dimensional unit hyper |
100 box [0,1]ᴰ. `x` and `J` are functions to be evaluated on the logical grid | 100 box [0,1]ᴰ. `x` and `J` are functions to be evaluated on the logical grid |
101 and `size` determines the size of the logical grid. | 101 and `size` determines the size of the logical grid. |
102 """ | 102 """ |
119 map(J,lg), | 119 map(J,lg), |
120 ) | 120 ) |
121 end | 121 end |
122 | 122 |
123 """ | 123 """ |
124 mapped_grid(x, J, parameterspace, size) | 124 mapped_grid(x, J, ps::ParameterSpace, size...) |
125 | 125 |
126 A `MappedGrid` with logical grid `lg`. Physical coordinates and Jacobian are | 126 A `MappedGrid` with logical grid `lg`. Physical coordinates and Jacobian are |
127 determined by the functions `x` and `J`. | 127 determined by the functions `x` and `J`. |
128 """ | 128 """ |
129 function mapped_grid(x, J, parameterspace, size::Vararg{Int}) | 129 function mapped_grid(x, J, ps::ParameterSpace, size::Vararg{Int}) |
130 lg = equidistant_grid(parameterspace, size...) | 130 lg = equidistant_grid(ps, size...) |
131 return mapped_grid(x, J, lg) | 131 return mapped_grid(x, J, lg) |
132 end | 132 end |
133 | 133 |
134 """ | 134 """ |
135 metric_tensor(g::MappedGrid) | 135 metric_tensor(g::MappedGrid) |