comparison src/Grids/mapped_grid.jl @ 1908:dcbe8119fb0a feature/grids/parameter_spaces

Clean up mapped_grid a little but
author Jonatan Werpers <jonatan@werpers.com>
date Sat, 01 Feb 2025 22:59:39 +0100
parents f93ba5832146
children e97f4352b8d0
comparison
equal deleted inserted replaced
1907:09c4fda8779d 1908:dcbe8119fb0a
90 boundary_physicalcoordinates, 90 boundary_physicalcoordinates,
91 boundary_jacobian, 91 boundary_jacobian,
92 ) 92 )
93 end 93 end
94 94
95 # TODO: Make sure all methods of `mapped_grid` are implemented correctly and tested.
96 """ 95 """
97 mapped_grid(x, J, size...) 96 mapped_grid(x, J, size...)
98 97
99 A `MappedGrid` with a default logical grid on the D-dimensional unit hyper 98 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 99 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. 100 and `size` determines the size of the logical grid.
102 """ 101 """
103 function mapped_grid(x, J, size::Vararg{Int}) 102 function mapped_grid(x, J, size::Vararg{Int})
104 D = length(size) 103 D = length(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 104 return mapped_grid(x, J, unithyperbox(D), size...)
106 return mapped_grid(x, J, lg)
107 end 105 end
108 106
109 """ 107 """
110 mapped_grid(x, J, lg::Grid) 108 mapped_grid(x, J, lg::Grid)
111 109