Mercurial > repos > public > sbplib_julia
changeset 1501:553111a15506 feature/grids/curvilinear
Add some TBDs and TODOs
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 16 Feb 2024 10:28:02 +0100 |
parents | ae2dbfb984a9 |
children | a2dc80396808 |
files | src/Grids/curvilinear_grid.jl src/Grids/equidistant_grid.jl src/Grids/grid.jl |
diffstat | 3 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Grids/curvilinear_grid.jl Fri Dec 01 15:01:44 2023 +0100 +++ b/src/Grids/curvilinear_grid.jl Fri Feb 16 10:28:02 2024 +0100 @@ -2,7 +2,7 @@ struct CurvilinearGrid{T,D, GT<:Grid{<:Any,D}, CT<:AbstractArray{T,D}, JT<:AbstractArray{<:AbstractArray{<:Any, 2}, D}} <: Grid{T,D} logicalgrid::GT physicalcoordinates::CT - jacobian::JT + jacobian::JT # TBD: currectly ∂xᵢ/∂ξⱼ. Is this the correct index order? end jacobian(g::CurvilinearGrid) = g.jacobian @@ -38,8 +38,6 @@ ) end - - # Do we add a convenience function `curvilinear_grid`? It could help with # creating the logical grid, evaluating functions and possibly calculating the # entries in the jacobian.
--- a/src/Grids/equidistant_grid.jl Fri Dec 01 15:01:44 2023 +0100 +++ b/src/Grids/equidistant_grid.jl Fri Feb 16 10:28:02 2024 +0100 @@ -106,6 +106,7 @@ grid. This simlifies the implementation and avoids certain surprise behaviours. """ +# TODO: Change signature to `equidistant_grid(limit_lower,limit_upper, size...) function equidistant_grid(size::Dims, limit_lower, limit_upper) gs = map(equidistant_grid, size, limit_lower, limit_upper) return TensorGrid(gs...)
--- a/src/Grids/grid.jl Fri Dec 01 15:01:44 2023 +0100 +++ b/src/Grids/grid.jl Fri Feb 16 10:28:02 2024 +0100 @@ -132,6 +132,7 @@ if hasmethod(f, (Any,)) return LazyTensors.LazyFunctionArray((I...)->f(g[I...]), size(g)) else + # TBD This branch can be removed if we accept the trade off that we define f with the syntax f((x,y)) instead if we don't want to handle the vector in the body of f. (Add an example in the docs) return LazyTensors.LazyFunctionArray((I...)->f(g[I...]...), size(g)) end end