`gridGen` and `jacobian2D` disagree on array orientation
- Dominant language
- MATLAB
- Stars
- 41
- Forks
- 85
- Avg merge
- 2d 31m
- Merged PRs (30d)
- 7
Description
`gridGen` returns `X` with xi-nodes as **rows**. `grad2DCurv`, `div2DCurv` and
`jacobian2D` all do `[n, m] = size(X)` and therefore want rows = eta.
Transposing two axes is an odd permutation, so handedness inverts:
```
gridGen returns : [99 38] (xi-nodes as ROWS)
grad2DCurv wants : rows = eta, cols = xi
as returned : jacobian2D -> ALL - |J| 387.3 .. 2747
transposed : jacobian2D -> ALL + |J| 387.3 .. 2747
```
Same grid, same magnitudes to the last digit, opposite sign. Passing `gridGen`
output straight into the curvilinear operators yields a globally left-handed
grid, and nothing anywhere warns.
A uniform sign flip is self-consistent for `grad` and `div` alone — J flips, the
cofactors flip with it, and gradients still come out exact. It stops being
harmless as soon as anything downstream assumes a fixed physical orientation:
a buoyancy term, a volume weighting, a `sqrt(J)`.
Originally reported by @manuelvalera
Contributor guide
Assessment
This issue has not been assessed yet.