Mercurial > repos > public > sbplib_julia
comparison src/Grids/curvilinear_grid.jl @ 1505:63101a1cd0e6 feature/grids/curvilinear
Remove some comments
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 16 Feb 2024 14:33:13 +0100 |
parents | 976f5784d7b9 |
children |
comparison
equal
deleted
inserted
replaced
1504:976f5784d7b9 | 1505:63101a1cd0e6 |
---|---|
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 # TBD: currectly ∂xᵢ/∂ξⱼ. Is this the correct index order? | 5 jacobian::JT |
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 |
47 boundary_physicalcoordinates, | 47 boundary_physicalcoordinates, |
48 boundary_jacobian, | 48 boundary_jacobian, |
49 ) | 49 ) |
50 end | 50 end |
51 | 51 |
52 # Do we add a convenience function `curvilinear_grid`? It could help with | |
53 # creating the logical grid, evaluating functions and possibly calculating the | |
54 # entries in the jacobian. | |
55 | |
56 function curvilinear_grid(x, J, size...) | 52 function curvilinear_grid(x, J, size...) |
57 D = length(size) | 53 D = length(size) |
58 lg = equidistant_grid(size, ntuple(i->0., D), ntuple(i->1., D)) | 54 lg = equidistant_grid(size, ntuple(i->0., D), ntuple(i->1., D)) |
59 return CurvilinearGrid( | 55 return CurvilinearGrid( |
60 lg, | 56 lg, |