Mercurial > repos > public > sbplib_julia
comparison src/Grids/mapped_grid.jl @ 1752:c98d9c528a22 feature/grids/curvilinear
Review: Added review comments to Grids.jl and mapped_grid.jl
author | Vidar Stiernström <vidar.stiernstrom@gmail.com> |
---|---|
date | Fri, 13 Sep 2024 10:27:17 -0700 |
parents | e4353d5e8fc3 |
children | 672897f64d58 |
comparison
equal
deleted
inserted
replaced
1749:e4353d5e8fc3 | 1752:c98d9c528a22 |
---|---|
36 same_jacobian = jacobian(a) == jacobian(b) | 36 same_jacobian = jacobian(a) == jacobian(b) |
37 | 37 |
38 return same_logicalgrid && same_coordinates && same_jacobian | 38 return same_logicalgrid && same_coordinates && same_jacobian |
39 end | 39 end |
40 | 40 |
41 # Review: rename function logicalgrid to logical_grid | |
42 # for consistency with mapped_grid. | |
41 """ | 43 """ |
42 logicalgrid(g::MappedGrid) | 44 logicalgrid(g::MappedGrid) |
43 | 45 |
44 The logical grid of `g`. | 46 The logical grid of `g`. |
45 """ | 47 """ |
132 end | 134 end |
133 # TBD: Should this be changed to calculate sqrt(g) instead? | 135 # TBD: Should this be changed to calculate sqrt(g) instead? |
134 # This would make it well defined also for n-dim grids embedded in higher dimensions. | 136 # This would make it well defined also for n-dim grids embedded in higher dimensions. |
135 # TBD: Is there a better name? metric_determinant? | 137 # TBD: Is there a better name? metric_determinant? |
136 # TBD: Is the best option to delete it? | 138 # TBD: Is the best option to delete it? |
139 # Review: I don't think we should delete it. Users building their own | |
140 # curvilinear operators will need the functionality. Also the | |
141 # determinant of the jacobian (and not its square root) is required | |
142 # for quadratures on mapped grids right? For that reason I think we should | |
143 # keep the function as is. We could provide a function for the square root | |
144 # as well if we think it would be helpfull. Regarding naming, perhaps | |
145 # metric_determinant is better? | |
137 | 146 |
138 """ | 147 """ |
139 metric_tensor(g::MappedGrid) | 148 metric_tensor(g::MappedGrid) |
140 | 149 |
141 The metric tensor of `g` as a grid function. | 150 The metric tensor of `g` as a grid function. |