Mercurial > repos > public > sbplib_julia
diff src/Grids/mapped_grid.jl @ 1950:e4500727f435
Merge feature/grids/parameter_spaces
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 11 Feb 2025 08:53:09 +0100 |
parents | dcbe8119fb0a |
children | e97f4352b8d0 |
line wrap: on
line diff
--- a/src/Grids/mapped_grid.jl Fri Jan 31 20:35:28 2025 +0100 +++ b/src/Grids/mapped_grid.jl Tue Feb 11 08:53:09 2025 +0100 @@ -92,9 +92,8 @@ ) end -# TODO: Make sure all methods of `mapped_grid` are implemented correctly and tested. """ - mapped_grid(x, J, size::Vararg{Int}) + mapped_grid(x, J, size...) A `MappedGrid` with a default logical grid on the D-dimensional unit hyper box [0,1]ᴰ. `x` and `J` are functions to be evaluated on the logical grid @@ -102,8 +101,7 @@ """ function mapped_grid(x, J, size::Vararg{Int}) D = length(size) - lg = equidistant_grid(ntuple(i->0., D), ntuple(i->1., D), size...) # TODO: Clean this up with ParamaterSpace once feature/grids/manifolds is merged - return mapped_grid(x, J, lg) + return mapped_grid(x, J, unithyperbox(D), size...) end """ @@ -121,13 +119,13 @@ end """ - mapped_grid(x, J, parameterspace, size) + mapped_grid(x, J, ps::ParameterSpace, size...) A `MappedGrid` with logical grid `lg`. Physical coordinates and Jacobian are determined by the functions `x` and `J`. """ -function mapped_grid(x, J, parameterspace, size::Vararg{Int}) - lg = equidistant_grid(parameterspace, size...) +function mapped_grid(x, J, ps::ParameterSpace, size::Vararg{Int}) + lg = equidistant_grid(ps, size...) return mapped_grid(x, J, lg) end