Version
v2026.4.2
How did you install UXarray?
Source
What happened?
The uxarray docs page about vector calculus mentions that curl(grad(f)) should be approximately 0 for any scalar field f. However, the example shown demonstrates that it is not close to 0 (probably, depending on what "close" means here). Rather, the example shows that the values range from -4.51 to 4.35. It looks like the data is roughly 1 in order of magnitude (f is a simple Gaussian in this example), and the grid length scale is roughly 0.01 (grad(f) seems to be on the order of 100, when I tried running the code myself).
What did you expect to happen?
I expected values of curl(grad(f)) to be closer to 0. Or, maybe not? Do derivatives on unstructured grids have large residuals from discretization? If yes, then the only change needed would be to update that documentation page to clarify.
Can you provide a MCVE to repoduce the bug?
Version
v2026.4.2
How did you install UXarray?
Source
What happened?
The uxarray docs page about vector calculus mentions that curl(grad(f)) should be approximately 0 for any scalar field f. However, the example shown demonstrates that it is not close to 0 (probably, depending on what "close" means here). Rather, the example shows that the values range from -4.51 to 4.35. It looks like the data is roughly 1 in order of magnitude (f is a simple Gaussian in this example), and the grid length scale is roughly 0.01 (grad(f) seems to be on the order of 100, when I tried running the code myself).
What did you expect to happen?
I expected values of curl(grad(f)) to be closer to 0. Or, maybe not? Do derivatives on unstructured grids have large residuals from discretization? If yes, then the only change needed would be to update that documentation page to clarify.
Can you provide a MCVE to repoduce the bug?