comparison src/Grids/curvilinear_grid.jl @ 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 64b58740e029
children a2dc80396808
comparison
equal deleted inserted replaced
1496:ae2dbfb984a9 1501:553111a15506
1 # TBD: Rename to MappedGrid? 1 # TBD: Rename to MappedGrid?
2 struct CurvilinearGrid{T,D, GT<:Grid{<:Any,D}, CT<:AbstractArray{T,D}, JT<:AbstractArray{<:AbstractArray{<:Any, 2}, D}} <: Grid{T,D} 2 struct CurvilinearGrid{T,D, GT<:Grid{<:Any,D}, CT<:AbstractArray{T,D}, JT<:AbstractArray{<:AbstractArray{<:Any, 2}, D}} <: Grid{T,D}
3 logicalgrid::GT 3 logicalgrid::GT
4 physicalcoordinates::CT 4 physicalcoordinates::CT
5 jacobian::JT 5 jacobian::JT # TBD: currectly ∂xᵢ/∂ξⱼ. Is this the correct index order?
6 end 6 end
7 7
8 jacobian(g::CurvilinearGrid) = g.jacobian 8 jacobian(g::CurvilinearGrid) = g.jacobian
9 logicalgrid(g::CurvilinearGrid) = g.logicalgrid 9 logicalgrid(g::CurvilinearGrid) = g.logicalgrid
10 10
36 g.physicalcoordinates[b_indices...], 36 g.physicalcoordinates[b_indices...],
37 g.jacobian[b_indices...], 37 g.jacobian[b_indices...],
38 ) 38 )
39 end 39 end
40 40
41
42
43 # Do we add a convenience function `curvilinear_grid`? It could help with 41 # Do we add a convenience function `curvilinear_grid`? It could help with
44 # creating the logical grid, evaluating functions and possibly calculating the 42 # creating the logical grid, evaluating functions and possibly calculating the
45 # entries in the jacobian. 43 # entries in the jacobian.
46 44