Mercurial > repos > public > sbplib_julia
comparison src/Grids/mapped_grid.jl @ 1820:bddcae938ded feature/jet_aqua
Some clean up
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 18 Oct 2024 21:41:55 +0200 |
parents | d91a9f47380f |
children | a57cd6fa4ecb |
comparison
equal
deleted
inserted
replaced
1819:e89e28fa9637 | 1820:bddcae938ded |
---|---|
92 ) | 92 ) |
93 end | 93 end |
94 | 94 |
95 | 95 |
96 """ | 96 """ |
97 mapped_grid(x,J,size...) | |
98 mapped_grid(x,J,size...) | |
99 """ | |
100 function mapped_grid end | |
101 """ | |
102 mapped_grid(x, J, size::Vararg{Int}) | 97 mapped_grid(x, J, size::Vararg{Int}) |
103 | 98 |
104 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 |
105 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 |
106 and `size` determines the size of the logical grid. | 101 and `size` determines the size of the logical grid. |
107 """ | 102 """ |
108 function mapped_grid(x, J, size::Vararg{Int}) | 103 function mapped_grid(x, J, size::Vararg{Int}) |
109 D = length(size) | 104 D = length(size) |
110 lg = equidistant_grid(ntuple(i->0., D), ntuple(i->1., D), size...) | 105 lg = equidistant_grid(ntuple(i->0., D), ntuple(i->1., D), size...) # TODO: Clean this up with ParamaterSpace once feature/grids/manifolds is merged |
111 return mapped_grid(x, J, lg) | 106 return mapped_grid(x, J, lg) |
112 | |
113 # parameterspace = ... | |
114 # return mapped_grid(x, J, parameterspace, size...) | |
115 end | 107 end |
116 | 108 |
117 """ | 109 """ |
118 mapped_grid(x, J, lg::Grid) | 110 mapped_grid(x, J, lg::Grid) |
119 | 111 |
127 map(J,lg), | 119 map(J,lg), |
128 ) | 120 ) |
129 end | 121 end |
130 | 122 |
131 """ | 123 """ |
132 mapped_grid(x, J, lg::Grid) | 124 mapped_grid(x, J, parameterspace, size) |
133 | 125 |
134 A `MappedGrid` with logical grid `lg`. Physical coordinates and Jacobian are | 126 A `MappedGrid` with logical grid `lg`. Physical coordinates and Jacobian are |
135 determined by the functions `x` and `J`. | 127 determined by the functions `x` and `J`. |
136 """ | 128 """ |
137 function mapped_grid(x, J, parameterspace, size::Vararg{Int}) | 129 function mapped_grid(x, J, parameterspace, size::Vararg{Int}) |