Skip to content

docs: clarify curl(grad(f)) residual is discretization error#1523

Open
rajeeja wants to merge 2 commits into
mainfrom
docs/fix-curl-grad-explanation
Open

docs: clarify curl(grad(f)) residual is discretization error#1523
rajeeja wants to merge 2 commits into
mainfrom
docs/fix-curl-grad-explanation

Conversation

@rajeeja

@rajeeja rajeeja commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Fixes #1522.

The docs showed curl(grad(f)) values of O(1–10) with the caption "Should ≈ 0", with no explanation. This confused a user into filing a bug report.

Changes:

  • Explain that curl(grad(f)) = 0 holds exactly only in the continuous setting; UXarray's gradient and curl are independent finite-volume stencils that don't form a discrete de Rham complex
  • Note the residual is O(Δx) discretization error that shrinks with grid refinement
  • Remove the misleading Identity verified: {max_curl_grad < 1e-10} boolean (which was False anyway for a non-trivial field)

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: curl(grad(f)) != 0

1 participant